#-*- coding: utf-8 -*- #逻辑回归 自动建模 import numpy as np import pandas as pd from sklearn.linear_model import LogisticRegression as LR from sklearn.linear_model import RandomizedLogisticRegression as RLR #参数初始化 filename = '../data/bankloan.xls' data = pd
import numpy as np import matplotlib.pyplot as plt from sklearn import datasets from sklearn.model_selection import train_test_split from sklearn.tree import DecisionTreeClassifier,DecisionTreeRegressor def creat_data(n): np.random.seed(0) X = 5 * np
python3 学习机器学习api 使用了三种集成回归模型 git: https://github.com/linyi0604/MachineLearning 代码: from sklearn.datasets import load_boston from sklearn.cross_validation import train_test_split from sklearn.preprocessing import StandardScaler from sklearn.ensemble
python3 学习使用api 支持向量机的两种核函数模型进行预测 git: https://github.com/linyi0604/MachineLearning from sklearn.datasets import load_boston from sklearn.cross_validation import train_test_split from sklearn.preprocessing import StandardScaler from sklearn.svm impor
x <- c(,,,,,,,,,) # build X(predictor) y <- c(,,,,,,,,,) # build Y(dependent variable) mode(x) # view the type of x plot(x,y) # plot the graph model <- lm(y ~ x) # build the linear model abline(model) # add the line in graph 数据是自己编的,所以图有点假. summa