1model_pipeline = Pipeline(steps=[
2 ("dimension_reduction", PCA(n_components=10)),
3 ("classifiers", RandomForestClassifier())
4])
5
6model_pipeline.fit(train_data.values, train_labels.values)
7predictions = model_pipeline.predict(predict_data.values)
8