LoslegenKostenlos loslegen

Evaluating a model

Throughout this course, you've been working on a project to classify heart disease using machine learning. You've successfully cleaned the dataset, performed feature engineering, and trained your model.

Here, you will employ the methods you have learned so far for model evaluation. You will evaluate a machine learning model using appropriate error metrics, visualize the evaluation results, and identify potential overfitting in preparation for deployment. By the end of this exercise, you will have gained a deeper understanding of model evaluation and visualization techniques.

  • The trained logistic regression model is loaded as model
  • KFold and cross_val_score are imported from sklearn.model_selection
  • confusion_matrix is imported from sklearn.metrics.
  • The variables heart_disease_df_X and heart_disease_df_y have been already imported.

Diese Übung ist Teil des Kurses

End-to-End Machine Learning

Kurs anzeigen

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Evaluate model using k-fold cross-validation
kf = ____(____=____)
Code bearbeiten und ausführen