Challenge: Creating a Complete ML Pipeline
Now let's create a proper pipeline with the final estimator. As a result, we will get a trained prediction pipeline that can be used for predicting new instances simply by calling the .predict()
method.
To train a predictor (model), you need y
to be encoded. This is done separately from the pipeline we build for X
. Remember that LabelEncoder
is used for encoding the target.
Swipe to start coding
You have the same penguins dataset. The task is to build a pipeline with KNeighborsClassifier
as a final estimator, train it, and predict values for the X
itself.
- Encode the
y
variable. - Create a pipeline containing
ct
,SimpleImputer
,StandardScaler
, andKNeighborsClassifier
. - Use
'most_frequent'
strategy withSimpleInputer
. - Train the
pipe
object using the featuresX
and the targety
.
Oplossing
Bedankt voor je feedback!
single
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.
Awesome!
Completion rate improved to 3.13Awesome!
Completion rate improved to 3.13
Challenge: Creating a Complete ML Pipeline
Now let's create a proper pipeline with the final estimator. As a result, we will get a trained prediction pipeline that can be used for predicting new instances simply by calling the .predict()
method.
To train a predictor (model), you need y
to be encoded. This is done separately from the pipeline we build for X
. Remember that LabelEncoder
is used for encoding the target.
Swipe to start coding
You have the same penguins dataset. The task is to build a pipeline with KNeighborsClassifier
as a final estimator, train it, and predict values for the X
itself.
- Encode the
y
variable. - Create a pipeline containing
ct
,SimpleImputer
,StandardScaler
, andKNeighborsClassifier
. - Use
'most_frequent'
strategy withSimpleInputer
. - Train the
pipe
object using the featuresX
and the targety
.
Oplossing
Bedankt voor je feedback!
single
Awesome!
Completion rate improved to 3.13
Challenge: Creating a Complete ML Pipeline
Veeg om het menu te tonen
Now let's create a proper pipeline with the final estimator. As a result, we will get a trained prediction pipeline that can be used for predicting new instances simply by calling the .predict()
method.
To train a predictor (model), you need y
to be encoded. This is done separately from the pipeline we build for X
. Remember that LabelEncoder
is used for encoding the target.
Swipe to start coding
You have the same penguins dataset. The task is to build a pipeline with KNeighborsClassifier
as a final estimator, train it, and predict values for the X
itself.
- Encode the
y
variable. - Create a pipeline containing
ct
,SimpleImputer
,StandardScaler
, andKNeighborsClassifier
. - Use
'most_frequent'
strategy withSimpleInputer
. - Train the
pipe
object using the featuresX
and the targety
.
Oplossing
Bedankt voor je feedback!