Секція 1. Розділ 4
single
Challenge: Build a Baseline Pipeline
Свайпніть щоб показати меню
Завдання
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.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 4
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат