Before you read This is a demo or practice about how to use Simple-Linear-Regression in scikit-learn with python. Following is the package version that I use below: The Python version: 3.6.2 The Numpy version: 1.8.0rc1 The Scikit-Learn version: 0.19…
__author__ = '糖衣豆豆' #决策树 import pandas as pda fname="~/coding/python/data/lesson.csv" dataf=pda.read_csv(fname,encoding="gbk") x=dataf.iloc[:,1:5].as_matrix() y=dataf.iloc[:,5].as_matrix() for i in range(0,len(x)): for j in range(0,len…