Seção 1. Capítulo 4
single
Challenge: Build a Baseline Pipeline
Deslize para mostrar o menu
Tarefa
Swipe to start coding
You need to create a machine learning pipeline that standardizes input features and fits a classification model.
- Load the Iris dataset.
- Split it into training and test sets.
- Create a pipeline that:
- Uses
StandardScalerto standardize the data; - Uses
RandomForestClassifieras the model.
- Uses
- Fit the pipeline on the training data.
- Predict on the test data.
- Calculate accuracy using
accuracy_scoreand assign it to the variableaccuracy.
Make sure to print the value of accuracy at the end.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 1. Capítulo 4
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo