2017年4月16日

python 简单逻辑回归实例

摘要: import sys reload(sys) sys.setdefaultencoding('utf-8') from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.linear_model.logistic import LogisticRegression x = [] x.append('fuc... 阅读全文

posted @ 2017-04-16 22:19 Kermit.Li 阅读(1221) 评论(0) 推荐(0) 编辑

python k-means聚类实例

摘要: port sys reload(sys) sys.setdefaultencoding('utf-8') import matplotlib.pyplot as plt import numpy as np culster1 = np.random.uniform(0.5, 1.5, (2, 20)) culster2 = np.random.uniform(1.5, 2.5, (2, 2... 阅读全文

posted @ 2017-04-16 22:04 Kermit.Li 阅读(5542) 评论(0) 推荐(0) 编辑

python 做回归

摘要: 1 一元线性回归 线性回归是一种简单的模型,但受到广泛应用,比如预测商品价格,成本评估等,都可以用一元线性模型。y = f(x) 叫做一元函数,回归意思就是根据已知数据复原某些值,线性回归(regression)就是用线性的模型做回归复原。 基本思想:已知一批(x, y)来复原另外未知的值,例如(1 阅读全文

posted @ 2017-04-16 11:33 Kermit.Li 阅读(8895) 评论(0) 推荐(0) 编辑

导航