自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(24)
  • 收藏
  • 关注

转载 ConfigParser

http://blog.csdn.net/cindy9902/article/details/7915743http://blog.sina.com.cn/s/blog_65a8ab5d0101ffqq.html1.    基本的读取配置文件-read(filename) 直接读取ini文件内容-sections() 得到所有的section,并以列表的形式返回-options

2015-06-18 15:32:23 365

转载 Python遍历文件

os.walk()返回一个三元素的tuple:当前路径、子文件夹名称、文件列表。import osdef fun( path ): for root, dirs, files in os.walk( path ): for fn in files: print root, fn>>> fun( r'C:\TDDOWNLOAD' )C:\TDD

2015-06-08 11:01:45 333

转载 Python Date & Time

Python Date & Time

2015-06-05 17:48:14 397

原创 iterator in python

In python, iterator in for loop couldn’t be changed.example:b = range(10)print b##for i in b: i += iprint b##use list comprehensions!!!for i, num in enumerate(b): b[i] = num + 1print b##

2015-06-05 17:28:49 289

转载 static与内部类

static修饰一个内部类,这个类就相当于是一个外部定义的类,所以static的内部类中可以声明static成员,但是,非static的内部类中的成员是不可以声明为static的。static的内部内不能再使用外层封装类的非static成员变量。所以static嵌套类很少使用。

2015-06-04 11:38:33 293

转载 类的单态设计模式

所谓类的单态设计模式,就是采取一定的方法保证在整个的软件系统中,对某个类只能存在一个对象实例,并且该类只提供一个取得其对象实例的方法。 如果要让类在一个虚拟机中只能产生一个对象,首先必须将类的构造方法的访问权限设置为private,这样就不能用new操作符在类的外部产生类的对象了,但在类内部仍可以产生该类的对象。因为在类的外部开始还无法得到类的对象,只能调用 该类的某个静态方法以返回类内部创建的对

2015-06-04 11:29:19 314

原创 static field and method in java

Called class members: class attributes and class methods.We can use ClassName.StaticField and ClassName.StaticMethod to access them.They don’t belong to any instance, so we can’t use this.StaticMember,

2015-06-04 11:26:25 353

转载 表达式和语句

在程序设计语言中,语句指的是执行单元,通常以行为单位,表达式指的是可用于计算的式子,即可能产生一个值的式子。语句可以包含有表达式,表达式也可以单独形成一个语句。 例如: 在: aa=35;bb=1+aa;或者: aa=function (){return 35};bb=1+aa();中的1+aa()就是表达式。 或者: function aa(var aa){alert aa+1;}bb

2015-06-04 10:34:26 335

原创 相似与相关

相似:看了还看 相关:买了还买

2015-06-04 09:15:53 348

原创 Grid Search简介

http://scikit-learn.org/stable/modules/grid_search.html在机器学习模型选择中,有一些参数需要手动设定(如SVM的C,lasso的alpha),但是需要先验信息。如何确定一个最优的模型参数呢?可用Grid Search进行搜索。假设有两个参数(a和b)需要确定。那么先确定a和b的可能范围,这样,在a和b的坐标轴上,a和b的各个可能值组成了一个个网格

2015-06-02 16:56:21 1668

原创 Stratified k-fold

StratifiedKFold is a variation of k-fold which returns stratified folds: each set contains approximately the same percentage of samples of each target class as the complete set.

2015-06-02 16:22:03 664

转载 ridge regression

多元线性回归http://wenku.baidu.com/view/d61ac186bceb19e8b8f6bac8.html http://wenku.baidu.com/view/6bb1c1d1195f312b3169a5b1.html http://wenku.baidu.com/view/502aa5e5524de518964b7dfd.html http://wenku.baidu

2015-06-01 22:28:01 427

转载 Multicollinearity

Multicollinearity in wikipedia多重共线性

2015-06-01 11:57:29 657

转载 电商术语

电子商务里面的 GMV (Gross Merchandise Volume) 的定义是什么?和销售额的区别是什么?GMV (Gross Merchandise Volume) GMV=1销售额+2取消订单金额+3拒收订单金额+4退货订单金额*。GMV是流水,只要你下了订单,生成订单号,就算了GMV。而这个订单转化为平台的实际收入还会有2、3、4这些流失量。一般只有平台类的电商网站才喜欢这么说法,

2015-06-01 10:52:33 7674

转载 k fold cross validation

import numpy as npX_folds = np.array_split(X_digits, 3)y_folds = np.array_split(y_digits, 3)scores = list()for k in range(3): # We use 'list' to copy, in order to 'pop' later on X_train = l

2015-06-01 09:16:11 458

原创 .T in numpy

import numpy as npX = np.c_[ .5, 1] XT = X.T X array([[ 0.5, 1. ]]) XT array([[ 0.5], [ 1. ]])

2015-05-31 20:11:04 483

原创 estimated parameters that ends with underscore in scikit

All the estimated parameters are attributes of the estimator object ending by an underscore: > estimator.estimated_param_

2015-05-31 19:57:30 270

原创 reshape in numpy

http://stackoverflow.com/questions/6627647/reshaping-a-numpy-array-in-pythonhttp://docs.scipy.org/doc/numpy/reference/generated/numpy.reshape.html

2015-05-31 19:55:36 887

原创 Lloyd's algorithm and Vorlonoi Diagram

Lloyd’s algorithmhttp://en.wikipedia.org/wiki/Lloyd%27s_algorithmVorlonoi Diagramhttp://blog.csdn.net/andrewhoujun/article/details/38268563 http://mathworld.wolfram.com/VoronoiDiagram.html http://www

2015-05-31 19:34:08 1009

原创 Scikit Source Code Reading(2015.05.31)

Today’s JobToday’s job is main about the source reading of plot_color_quantization.py and k_means_.py under scikit-learn-0.15.2\sklearn\cluster in scikit-learn-0.15.2. Gainspairwise_distances_argmin:

2015-05-31 19:31:15 771

原创 Fields in python

Quesion DescriptionWhile reading scikit source code, got confused by following codes in line 149, 150 in classification.py under scikit-learn-0.15.2\sklearn\neighbors in scikit-learn-0.15.2. classes_ =

2015-05-29 23:35:34 783

转载 python的moudles文件中__all__作用

__all__ in python package

2015-05-29 15:21:57 482

原创 Scikit Source Code Reading(2015.05.29)

Today’s JobToday’s job is main about the source reading of plot_classification.py. QuesionsKD Tree aglorithmBall Tree aglorithmBrute aglorithmLeaf-SizeWhy agl_check = ball_tree?csr format Why dy

2015-05-29 14:08:18 575

原创 Gleanings of Python

Gleanings of Python

2015-05-29 13:39:13 320

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除