【#第一文档网# 导语】以下是®第一文档网的小编为您整理的《机器学习小总结》,欢迎阅读!
pipe = Pipeline([
('mms', MinMaxScaler()), ('skb', SelectKBest(chi2)), ('pca', PCA()),
('decision', DecisionTreeClassifier()) ])
# 参数
parameters = {
"skb__k": [2,3,4],
"pca__n_components": [0.5,1.0],
"decision__criterion": ["gini", "entropy"],
"decision__max_depth": [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] }
x_train2, x_test2, y_train2, y_test2 = x_train1, x_test1, y_train1, y_test1
gscv = GridSearchCV(pipe, param_grid=parameters) gscv.fit(x_train2, y_train2)
算隐藏参数,最大似然,最大后验概率,em
本文来源:https://www.dy1993.cn/xfp.html