Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: Build a Preprocessing Workflow | Transformers and Preprocessing Workflows
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Mastering scikit-learn API and Workflows

bookChallenge: Build a Preprocessing Workflow

Tâche

Swipe to start coding

You are building a basic preprocessing workflow using scikit-learn.

  1. Use SimpleImputer(strategy="mean") for numeric columns.
  2. Use OneHotEncoder(sparse=False) for categorical columns.
  3. Apply both transformations using a ColumnTransformer named preprocessor.
  4. Fit and transform the DataFrame df.
  5. Store the result in the variable result.

Solution

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. 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

Suggested prompts:

Can you explain that in more detail?

What are the main benefits or drawbacks?

Can you give me an example?

close

bookChallenge: Build a Preprocessing Workflow

Glissez pour afficher le menu

Tâche

Swipe to start coding

You are building a basic preprocessing workflow using scikit-learn.

  1. Use SimpleImputer(strategy="mean") for numeric columns.
  2. Use OneHotEncoder(sparse=False) for categorical columns.
  3. Apply both transformations using a ColumnTransformer named preprocessor.
  4. Fit and transform the DataFrame df.
  5. Store the result in the variable result.

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 2. Chapitre 4
single

single

some-alt