- 博客(18)
- 收藏
- 关注
转载 再探决策树算法之利用sklearn进行决策树实战
sklearn模块提供了决策树的解决方案,不用自己去造轮子了(不会造,感觉略复杂): 下面是笔记: Sklearn.tree参数介绍及使用建议 参数介绍及使用建议官网: http://scikit-learn.org/stable/modules/generated/sklearn.tree.DecisionTreeClassifier.html class sklearn.tree...
2017-03-30 17:18:00
164
转载 决策树算法初探
看了些决策树算法的blog,粗略了解了决策树算法是个怎么一回事:决策树的核心点在于找到分裂的属性点,按照熵增益(ID3)最大,或者熵增益率(C4.5)最大来选分裂的属性点。后续包括一些剪枝等等小操作。 里面最基本的是要计算熵,那么就写一个计算熵值得脚本吧。直接上代码: #-*- coding:utf-8 -*- import numpy as np # Python 实现熵的...
2017-03-30 14:21:00
104
转载 通过KNN算法,确定球星的风格(很水)
KNN算法,故名思议,K个最邻近值的分类算法。监督学习中的一种,典型的懒人算法,通过计算所有的预测样本到学习样本的距离,选取其中K个最小值加入样本组中,样本组中的样本隶属于那个分类的个数最多,那么我们就预测我们的预测样本是属于这个类型的。 学习来源某个pdf(别人的学习笔记): 第四章 KNN(k最邻近分类算法) 最邻近分类算法) 最邻近分类算法) 最邻近分类算法) 最邻近分类算...
2017-03-29 17:14:00
132
转载 定制化自己的itchat
上篇文章很详实,可以实现一个低级的微信自动回复机器人,听说还有用图灵的,那就变成高级机器人了。 初级目标: 自动回复好友的信息。 #-*- coding:utf-8 -*- #微信的库 import itchat #导入想要处理的content内容 from itchat.content import * import re import time #这...
2017-03-09 18:58:00
93
转载 itchat初探
逛知乎逛到了一篇itchat写微信机器人的文章,挺不错的,先照抄过来(侵删):然后定制化自己的。 Python微信库:itchat时间2016-09-19 23:10:18滥情's Blog原文http://www.nulll.me/index.php/archives/72.html主题Python在论坛上看到了用Python登录微信并实现自动签到,才了解到一个新的Pyt...
2017-03-09 18:39:00
199
转载 初窥wordcloud之老司机带你定制词云图片
抓紧上车啦 #-*-coding:utf-8 -*- from os import path from wordcloud import WordCloud, STOPWORDS, ImageColorGenerator #用来画词云的。 import matplotlib.pyplot as plt #用来解析特殊的图片模板,numpy也可以的。 from sci...
2017-03-08 17:50:00
126
转载 初窥wordcloud之上车
直接上代码: 1 #-*-coding:utf-8 -*- 2 3 from os import path 4 from wordcloud import WordCloud, STOPWORDS, ImageColorGenerator 5 #用来画词云的。 6 import matplotlib.pyplot as plt 7 #用来解析特殊的...
2017-03-08 17:09:00
64
转载 初窥Python wordcloud之环境搭建
逛知乎时偶然发现有词云这么高大上的东西,便用了起来。 首先,安装。soeasy... pip install wordcloud 如果词云中要用定制的图案的话,需要用到numpy或者scipy去解析图片(我也不知道为啥?估计是把图片的像素变成数组或者矩阵) 但是window python2.7装scipy时失败了。提示一大堆错误。问了度娘后解决了问题。如下: 1.下载Nu...
2017-03-08 16:50:00
127
转载 A simple script to get all pictures
#-*- coding:utf-8 -*- import shutil import os from Tkinter import * import time import re def get_all_file(adr): all_adr=[] all_dir.append(adr) adr+='\\' if os...
2016-11-09 15:44:00
87
转载 Upgrade NE script with GUI but cannot support multithread, need to add soon
#-*- coding:utf-8 -*- __authour__='CC' from Tkinter import *import osimport telnetlibimport timeimport shutilimport socketimport paramikoimport globimport reimport threading def thread_it(func...
2016-11-08 13:14:00
111
转载 NE Upgrade python script. Need to write a Tkinter GUI for it
# -*- coding: utf-8 -*-#from ftplib import FTP __authour__='CC' import osimport telnetlibimport timeimport shutilimport socket#import pdbimport paramikofrom Tkinter import *import globimport re...
2016-11-07 17:31:00
82
转载 Python控制window进行简单的消息弹窗
有人提到可以用easygui 稍后尝试一下 转载于:https://www.cnblogs.com/AlwaysT-Mac/p/6038685.html
2016-11-07 14:10:00
955
转载 Write a script to check an interesting game 6174
# -*- coding: utf-8 -*-#from ftplib import FTPimport osdef sort_reverse(x,y): if x>y: return -1 if x<y: return 1 else: return 0 def play6174(num): a=num/10...
2016-11-03 15:20:00
208
转载 A python script to check NE syncfail and get log from CIPS
#! /usr/bin/env python # -*- coding: UTF-8 -*- """The script is to check whether NE is in syncfail, if it is syncfail, login into CIPS to get login. """import paramikoimport sshimport osimport...
2016-10-31 17:02:00
119
转载 Try to write a script to send e-mail but failed
#-*-coding: utf-8 -*- '''使用Python去发送邮件但是不成功,运行后,等待一段时间, 返回[Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established co...
2016-10-29 09:53:00
181
转载 My first python script for work
I write it yesterday to watch the NE process(rcpfd,cfgd) automatically, then i will write a window to implement it: #! /usr/bin/env python # -*- coding: UTF-8 -*- import paramikoimport sshi...
2016-10-29 09:52:00
88
转载 My first blog in cnblog
Learning, record and shareing. Being stronger. 转载于:https://www.cnblogs.com/AlwaysT-Mac/p/6006542.html
2016-10-28 09:34:00
107
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人