0
0
ML Pythonprogramming~10 mins

ML workflow (collect, prepare, train, evaluate, deploy) in ML Python - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to start the ML workflow by collecting data.

ML Python
data = [1]('data.csv')
Drag options to blanks, or click blank then click option'
Aload_data
Bpd.read_csv
Ctrain_model
Devaluate
Attempts:
3 left
2fill in blank
medium

Complete the code to prepare the data by filling missing values.

ML Python
data['age'] = data['age'].[1](data['age'].mean())
Drag options to blanks, or click blank then click option'
Afillna
Bdropna
Creplace
Dmean
Attempts:
3 left
3fill in blank
hard

Fix the error in training the model by choosing the correct method to fit the data.

ML Python
model = LogisticRegression()
model.[1](X_train, y_train)
Drag options to blanks, or click blank then click option'
Afit
Btransform
Cscore
Dpredict
Attempts:
3 left
4fill in blank
hard

Fill both blanks to evaluate the model's accuracy.

ML Python
from sklearn.metrics import [1]
accuracy = [2](y_test, y_pred)
Drag options to blanks, or click blank then click option'
Aaccuracy_score
Bmean_squared_error
Dr2_score
Attempts:
3 left
5fill in blank
hard

Fill all three blanks to deploy the trained model by saving it to a file.

ML Python
import joblib

joblib.[1](model, '[2]')
loaded_model = joblib.[3]('[2]')
Drag options to blanks, or click blank then click option'
Adump
Bmodel.pkl
Cload
Dsave
Attempts:
3 left