Loading

上一页 1 2 3 4 5 6 7 8 ··· 15 下一页
摘要: 评分卡案例 数据预处理 %matplotlib inline # 导入库 import pandas as pd import numpy as np from sklearn.linear_model import LogisticRegression as LR # 加载数据 data = pd 阅读全文
posted @ 2023-04-17 16:43 ThankCAT 阅读(50) 评论(0) 推荐(0) 编辑
摘要: from sklearn.datasets import load_breast_cancer from sklearn.feature_selection import SelectFromModel from sklearn.linear_model import LogisticRegress 阅读全文
posted @ 2023-04-12 16:59 ThankCAT 阅读(51) 评论(0) 推荐(0) 编辑
摘要: from sklearn.neighbors import KNeighborsClassifier as KNN from sklearn.decomposition import PCA from sklearn.ensemble import RandomForestClassifier as 阅读全文
posted @ 2023-04-10 22:12 ThankCAT 阅读(17) 评论(0) 推荐(0) 编辑
摘要: import pandas as pd import numpy as np import matplotlib.pyplot as plt # 准备数据 data = pd.read_csv("./digit recognizor.csv") x = data.iloc[:,1:] # 特征矩阵 阅读全文
posted @ 2023-04-08 21:08 ThankCAT 阅读(22) 评论(0) 推荐(0) 编辑
摘要: import pandas as pd data = pd.read_csv("./digit recognizor.csv") x = data.iloc[:,1:] y = data.iloc[:,0] x.shape (42000, 784) 方差过滤 VarianceThreshold fr 阅读全文
posted @ 2023-04-08 21:07 ThankCAT 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 二值化与分段 sklearn.preprocessing.Binarizer from sklearn.preprocessing import Binarizer import pandas as pd data = pd.read_csv("./data_full", index_col=0) 阅读全文
posted @ 2023-04-08 21:07 ThankCAT 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 处理缺失值 import pandas as pd import numpy as np df = pd.read_csv("./Narrativedata.csv", index_col=0) df.info() <class 'pandas.core.frame.DataFrame'> Int6 阅读全文
posted @ 2023-04-08 21:06 ThankCAT 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 数据归一化 import numpy as np import pandas as pd from sklearn.preprocessing import MinMaxScaler data = np.arange(36) data = data.reshape(6,6) data = pd.Da 阅读全文
posted @ 2023-04-07 22:27 ThankCAT 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 随机森林在乳腺癌数据上的调参 导入需要的库 from sklearn.datasets import load_breast_cancer from sklearn.model_selection import GridSearchCV, cross_val_score from sklearn.e 阅读全文
posted @ 2023-04-06 22:39 ThankCAT 阅读(42) 评论(0) 推荐(0) 编辑
摘要: import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.ensemble import RandomForestRegressor from sklearn.impute import S 阅读全文
posted @ 2023-04-06 01:30 ThankCAT 阅读(28) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 15 下一页