Зміст курсу
Logistic Regression Mastering
Logistic Regression Mastering
Model 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 themetrics
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.
Завдання
- Import
accuracy_score
fromsklearn.metrics
. - Pass
y_test
andy_pred
to the scoring function.
Congratulations on building your first ML Pipeline. In this project, you have learned how to:
- Import your Data;
- Visually inspect it;
- Preprocess it (clean and impute it);
- Train and evaluate your ML algorithm.
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?
Дякуємо за ваш відгук!
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 themetrics
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.
Завдання
- Import
accuracy_score
fromsklearn.metrics
. - Pass
y_test
andy_pred
to the scoring function.
Congratulations on building your first ML Pipeline. In this project, you have learned how to:
- Import your Data;
- Visually inspect it;
- Preprocess it (clean and impute it);
- Train and evaluate your ML algorithm.
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 1. Розділ 7