10 2016 档案
python数据处理,线性度,灵敏度,线性拟合
摘要:# -*- coding: utf-8 -*-"""Created on Mon Oct 31 13:48:19 2016 @author: QING""" import numpy as npimport scipy as spfrom scipy.optimize import leastsq 阅读全文
posted @ 2016-10-31 14:58 Minstrel 阅读(1394) 评论(0) 推荐(0)
Pattern Classification(1)_perceptron(2)
摘要:首先导入产生的数据 pd_data = pd.read_csv('data.csv').ix[:,['x','y']] 方法一 使用 sklearn.linear_model.Perceptron函数 代码如下: # -*- coding: utf-8 -*-"""Created on Tue Oc 阅读全文
posted @ 2016-10-26 13:38 Minstrel 阅读(158) 评论(0) 推荐(0)
Pattern Classification(1)_perceptron
摘要:利用python产生数据,数据分布如图 产生数据并导出到文件‘data.csv’ import pandas as pdimport numpy as npfrom pandas import DataFrame,Seriesimport mathimport matplotlib.pyplot a 阅读全文
posted @ 2016-10-25 21:29 Minstrel 阅读(194) 评论(0) 推荐(0)
pandas数据加载,存储与文件格式(1)
摘要:pandas中的解析函数 read_csv() read_table() read_fwf()读取定宽列格式数据,没有分隔符。 read_clipboard()读取剪切板中数据 这些函数选项可以划分为以下几个大类: 索引,类型推断和数据转换,日期解析,迭代,不规整数据问题。 可以指定列名,也可以将指 阅读全文
posted @ 2016-10-25 13:45 Minstrel 阅读(314) 评论(0) 推荐(0)
pandas入门(3)
摘要:整数索引 如果需要可靠的,不考虑索引类型,基于位置的索引可以使用Series的iget_value方法和DataFrame的irow,icol方法 ser = Series(range(3),index=[2,-4,4]) serOut[57]: 2 0-4 1 4 2dtype: int64 se 阅读全文
posted @ 2016-10-25 09:41 Minstrel 阅读(100) 评论(0) 推荐(0)
pandas入门(2)
摘要:使用dataframe的列当做索引 frame = DataFrame({'a':range(7),'b':range(7,0,-1),'c':['one','one','one','two','two','two','two'],'d':[0,1,2,0,1,2,3]}) frame.set_in 阅读全文
posted @ 2016-10-25 09:33 Minstrel 阅读(108) 评论(0) 推荐(0)
pandas入门(1)
摘要:pandas层次化索引,在轴上拥有多个级别索引。 MultiIndex(Hierarchical indexing) import pandas as pd from pandas import Series,DataFrame import numpy as np data = Series(np 阅读全文
posted @ 2016-10-25 09:25 Minstrel 阅读(164) 评论(0) 推荐(0)