📜  sklearn 管道与交互 python 代码示例

📅  最后修改于: 2022-03-11 14:46:29.791000             🧑  作者: Mango

代码示例1
model_pipeline = Pipeline(steps=[
  ("dimension_reduction", PCA(n_components=10)),
  ("classifiers", RandomForestClassifier())
])

model_pipeline.fit(train_data.values, train_labels.values)
predictions = model_pipeline.predict(predict_data.values)