如何解决StackingClassifier final_estimator网格搜索
我正在使用将RandomForest和BaggedLogisticRegression作为第一层estimators
,并将LogisticRegression用于final_estmator
的StackingClassifier。我使用以下参数运行RandomizedSearch:
params = {
'random_forest__max_depth': [3,7,10],'random_forest__n_estimators': [100,150],'logreg_bagged__base_estimator__max_iter': [10000],'logreg_bagged__base_estimator__C': [10000,20000,100000],'logreg_bagged__base_estimator__class_weight': [{0: neg,1: pos} for neg,pos in
[(1 - ((val + 1) * 0.01),(val + 1) * 0.01) for val in range(5)]
],'final_estimator__max_iter': [10000],'final_estimator__C': np.logspace(-4,4,4),'final_estimator__class_weight': [{0: neg,}
random_forest和logreg_bagged参数按预期运行,但是我似乎无法访问final_estimator参数以将它们包括在超参数调整中。有人知道将其包含在搜索空间中的方法吗?
这是模型图: Model_diagram
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。