Complete the code to start the ML workflow by collecting data.
data = [1]('data.csv')
We use pd.read_csv to load data from a CSV file, which is the first step in the ML workflow: collecting data.
Complete the code to prepare the data by filling missing values.
data['age'] = data['age'].[1](data['age'].mean())
The fillna method replaces missing values with a specified value, here the mean age, which is part of data preparation.
Fix the error in training the model by choosing the correct method to fit the data.
model = LogisticRegression()
model.[1](X_train, y_train)The fit method trains the model using the training data, which is essential before making predictions.
Fill both blanks to evaluate the model's accuracy.
from sklearn.metrics import [1] accuracy = [2](y_test, y_pred)
We import accuracy_score and use it to calculate how often the model's predictions match the true labels.
Fill all three blanks to deploy the trained model by saving it to a file.
import joblib joblib.[1](model, '[2]') loaded_model = joblib.[3]('[2]')
We use joblib.dump to save the model to a file named model.pkl, then joblib.load to load it back for deployment.
