From e2ec6d10669e207abfd10180e81ff040f40ce38d Mon Sep 17 00:00:00 2001 From: xiaochaoroulalala <1206174039@qq.com> Date: Thu, 23 Nov 2023 22:27:40 +0800 Subject: [PATCH] 1.3 --- readme.md | 4 ++++ yugou_theoryBest.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 744fee6..941e5a8 100644 --- a/readme.md +++ b/readme.md @@ -27,3 +27,7 @@ 元学习器这里采用毛南设计好的adaboost分类器,通过将第一层基础模型的预测结果作为新的特征矩阵进行训练。 融合模型最终输出的预测结果就是元学习器输出的结果。 + +效果图: + +![image-20231123222727368](C:\Users\Lenovo\AppData\Roaming\Typora\typora-user-images\image-20231123222727368.png) diff --git a/yugou_theoryBest.py b/yugou_theoryBest.py index e2ab2c2..e24c2c8 100644 --- a/yugou_theoryBest.py +++ b/yugou_theoryBest.py @@ -124,7 +124,7 @@ # 元模型 meta_model = AdaBoostClassifier(base_estimator=base_classifier, n_estimators=50, learning_rate=0.1, random_state=0) # 划分数据集 -X_train_base, X_stack, y_train_base, y_stack = train_test_split(X_train, y_train, test_size=0.2, random_state=0) +X_train_base, X_stack, y_train_base, y_stack = train_test_split(X_train, y_train, test_size=0.3, random_state=0) # 使用基础模型在一部分训练集上训练 mlp_model.fit(X_train_base, y_train_base) logit_model.fit(X_train_base, y_train_base)