Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Build a Preprocessing Workflow | Transformers and Preprocessing Workflows
Mastering scikit-learn API and Workflows

bookChallenge: Build a Preprocessing Workflow

Opgave

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.

Løsning

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 2. Kapitel 4
single

single

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

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

Stryg for at vise menuen

Opgave

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.

Løsning

Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 2. Kapitel 4
single

single

some-alt