2013年12月12日

摘要: http://blog.163.com/lnhenrylee@126/blog/static/2414832520123269713813/ 阅读全文
posted @ 2013-12-12 09:15 江小鱼2015 阅读(173) 评论(0) 推荐(0) 编辑

2013年12月2日

摘要: http://www.cnblogs.com/jerrylead/archive/2011/04/18/2020209.html真实的训练数据总是存在各种各样的问题:1、[冗余] 比如拿到一个汽车的样本,里面既有以“千米/每小时”度量的最大速度特征,也有“英里/小时”的最大速度特征,显然这两个特征有... 阅读全文
posted @ 2013-12-02 21:09 江小鱼2015 阅读(377) 评论(0) 推荐(0) 编辑

2013年11月30日

摘要: __author__ = 'HM'f = open('data.txt','r')first_line = f.readline().split()attributes = first_line[:-1]attr_len = len(attributes)classname = first_line... 阅读全文
posted @ 2013-11-30 19:08 江小鱼2015 阅读(357) 评论(0) 推荐(0) 编辑

2013年11月29日

摘要: __author__ = 'HM'from treelib import *import mathimport uuid#-------------------------------------------------------------------#data and variant defi... 阅读全文
posted @ 2013-11-29 21:08 江小鱼2015 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 1. 改变量的名字:选中要改的变量名->右键->refactor(重构) 版权声明:本文为博主原创文章,未经博主允许不得转载。 阅读全文
posted @ 2013-11-29 19:35 江小鱼2015 阅读(232) 评论(0) 推荐(0) 编辑

2013年11月25日

摘要: 【总结】优化python程序的流程(自顶向下):1.先用cProfile找出最耗时的函数,2.然后在这个函数前面加@profile 用line_profiler(+kernprof)找出最耗时的行,3.最后用timeit测试下这个行的运行效率。下面是具体介绍各个部分:----------------... 阅读全文
posted @ 2013-11-25 19:46 江小鱼2015 阅读(216) 评论(0) 推荐(0) 编辑
摘要: from heapq import heappop,heappusha = [1,3,5,7,2,34,0,2]heap = []for i in a: heappush(heap,i)for x in range(len(a)): print heappop(heap) ... 阅读全文
posted @ 2013-11-25 19:31 江小鱼2015 阅读(181) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/FengYan/archive/2012/05/06/2480664.html#Ver1.0#Zero @2012.5.2#import mathimport randomimport cPickle as pickle#calculate the ov... 阅读全文
posted @ 2013-11-25 09:58 江小鱼2015 阅读(219) 评论(0) 推荐(0) 编辑

2013年11月16日

摘要: http://blog.csdn.net/v_july_v 阅读全文
posted @ 2013-11-16 14:47 江小鱼2015 阅读(116) 评论(0) 推荐(0) 编辑
摘要: http://python123.com/thread-42-1-1.html 阅读全文
posted @ 2013-11-16 14:46 江小鱼2015 阅读(96) 评论(0) 推荐(0) 编辑

导航