Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Model Evaluation | Logistic Regression Mastering
Logistic Regression Mastering

Model EvaluationModel Evaluation

Now that we have trained our Logistic Regression algorithm, the next step is to assess the performance. We will compare the true y values with the predicted ones.

Methods description

  • sklearn.metrics: This module from scikit-learn (sklearn) contains various metrics for evaluating machine learning models. It provides functions to assess the performance of classification, regression, and clustering algorithms;
  • accuracy_score: This is a method within the metrics module used to calculate the accuracy of classification models. It compares the predicted labels (y_pred) with the true labels (y_test) and returns the ratio of correctly classified samples to the total number of samples. In other words, it measures the proportion of correctly predicted outcomes.
Завдання виконано!

ЗавданняВиконано

  1. Import accuracy_score from sklearn.metrics.
  2. Pass y_test and y_pred to the scoring function.

Congratulations on building your first ML Pipeline. In this project, you have learned how to:

  1. Import your Data;
  2. Visually inspect it;
  3. Preprocess it (clean and impute it);
  4. Train and evaluate your ML algorithm.

Все було зрозуміло?

Секція 1. Розділ 7
course content

Зміст курсу

Logistic Regression Mastering

Model EvaluationModel Evaluation

Now that we have trained our Logistic Regression algorithm, the next step is to assess the performance. We will compare the true y values with the predicted ones.

Methods description

  • sklearn.metrics: This module from scikit-learn (sklearn) contains various metrics for evaluating machine learning models. It provides functions to assess the performance of classification, regression, and clustering algorithms;
  • accuracy_score: This is a method within the metrics module used to calculate the accuracy of classification models. It compares the predicted labels (y_pred) with the true labels (y_test) and returns the ratio of correctly classified samples to the total number of samples. In other words, it measures the proportion of correctly predicted outcomes.
Завдання виконано!

ЗавданняВиконано

  1. Import accuracy_score from sklearn.metrics.
  2. Pass y_test and y_pred to the scoring function.

Congratulations on building your first ML Pipeline. In this project, you have learned how to:

  1. Import your Data;
  2. Visually inspect it;
  3. Preprocess it (clean and impute it);
  4. Train and evaluate your ML algorithm.

Все було зрозуміло?

Секція 1. Розділ 7
some-alt