Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Challenge: Build a Baseline Pipeline | Fundamentals of AutoML
Practice
Projects
Quizzes & Challenges
Quizzen
Challenges
/
Introduction to AutoML
Sectie 1. Hoofdstuk 4
single

single

bookChallenge: Build a Baseline Pipeline

Veeg om het menu te tonen

Taak

Swipe to start coding

You need to create a machine learning pipeline that standardizes input features and fits a classification model.

  1. Load the Iris dataset.
  2. Split it into training and test sets.
  3. Create a pipeline that:
    • Uses StandardScaler to standardize the data;
    • Uses RandomForestClassifier as the model.
  4. Fit the pipeline on the training data.
  5. Predict on the test data.
  6. Calculate accuracy using accuracy_score and assign it to the variable accuracy.

Make sure to print the value of accuracy at the end.

Oplossing

Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 1. Hoofdstuk 4
single

single

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

some-alt