逻辑回归(也会发生线性回归的过拟合)自带正则化。
优点:同岭回归一样可以解决过拟合问题。
from sklearn.datasets import load_boston
from sklearn.linear_model import LinearRegression, SGDRegressor, LogisticRegression
#LogisticRegressionCV属于交叉验证 LogisticRegression网格搜索
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from sklearn.metrics import mean_squared_error, classification_report
#分类模型评估里面sklearn.metrics 考虑召回率
from sklearn.linear_model import Ridge
import numpy as np
import pandas as pd
import joblib
def logis():
"""
逻辑回归分类进行癌症预测(根据细胞属性特征)
:return:None
"""
#构造列标签名字
column = ['Sample code number', 'Clump Thickness', 'Unid