上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 43 下一页
摘要: 微调后: Best score: 0.983Best parameters set: clf__C: 10 clf__penalty: 'l2' vect__max_df: 0.5 vect__max_features: None vect__ngram_range: (1, 2) vect__st 阅读全文
posted @ 2019-10-22 11:52 昕友软件开发 阅读(1046) 评论(0) 推荐(0) 编辑
摘要: AdaBoost precision recall f1-score support 0 0.83 0.85 0.84 634 1 0.84 0.82 0.83 616 accuracy 0.83 1250 macro avg 0.83 0.83 0.83 1250weighted avg 0.83 阅读全文
posted @ 2019-10-22 11:16 昕友软件开发 阅读(1844) 评论(0) 推荐(0) 编辑
摘要: from sklearn.metrics import confusion_matrix import matplotlib.pyplot as plt y_test = [0, 0, 0, 0, 0, 1, 1, 1, 1, 1] y_pred = [0, 1, 0, 0, 0, 0, 0, 1, 阅读全文
posted @ 2019-10-22 11:07 昕友软件开发 阅读(1648) 评论(0) 推荐(0) 编辑
摘要: import numpy as np import matplotlib.pyplot as plt from sklearn.linear_model import LinearRegression from sklearn.preprocessing import PolynomialFeatu 阅读全文
posted @ 2019-10-21 17:14 昕友软件开发 阅读(326) 评论(0) 推荐(0) 编辑
摘要: 结果是: Actual weights: [66, 87, 68, 74]Predicted weights: [62.4 76.8 66. 72.6]Predicted weights by StandardScaler: [69.4 76.8 59.2 59.2]Predicted weight 阅读全文
posted @ 2019-10-21 11:44 昕友软件开发 阅读(226) 评论(0) 推荐(0) 编辑
摘要: Ridge Test score: 0.622Test score: 0.875 用log变换一般是在连续值拉锯越来越大时使用。 阅读全文
posted @ 2019-10-18 16:02 昕友软件开发 阅读(377) 评论(0) 推荐(0) 编辑
摘要: 过程解析: 在大数据集的情况下还可以使用scikit-learn 提供了MiniBatchKMeans算法,大致思想就是对数据进行抽样,每次不使用所有的数据来计算,这就会导致准确率的损失。 MiniBatchKmeans 继承自Kmeans 因为MiniBathcKmeans 本质上还利用了Kmea 阅读全文
posted @ 2019-10-17 11:17 昕友软件开发 阅读(2347) 评论(0) 推荐(0) 编辑
摘要: import graphviz import mglearn from mpl_toolkits.mplot3d import Axes3D from sklearn.datasets import load_breast_cancer, make_blobs from sklearn.ensemb 阅读全文
posted @ 2019-10-16 17:17 昕友软件开发 阅读(354) 评论(0) 推荐(0) 编辑
摘要: import graphviz import mglearn from mpl_toolkits.mplot3d import Axes3D from sklearn.datasets import load_breast_cancer, make_blobs from sklearn.ensemb 阅读全文
posted @ 2019-10-16 11:45 昕友软件开发 阅读(752) 评论(0) 推荐(0) 编辑
摘要: 决策树: 默认深度,因为深度过大,造成过拟合,训练精度是1Accuracy on training set: 1.000Accuracy on test set: 0.937 设置为4,tree = DecisionTreeClassifier(max_depth=4,random_state=0) 阅读全文
posted @ 2019-10-15 16:57 昕友软件开发 阅读(689) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 43 下一页
欢迎访问我的开源项目:xyIM企业即时通讯