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
.
Рішення
Дякуємо за ваш відгук!
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
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
.
Рішення
Дякуємо за ваш відгук!
single
Awesome!
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
.
Рішення
Дякуємо за ваш відгук!