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

single

bookChallenge: Build a Baseline Pipeline

Glissez pour afficher le menu

Tâche

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.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 4
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

some-alt