Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Challenge: Classification Metrics | Classification Metrics
Practice
Projects
Quizzes & Challenges
Visat
Challenges
/
Evaluation Metrics in Machine Learning with Python
Osio 1. Luku 7
single

single

bookChallenge: Classification Metrics

Pyyhkäise näyttääksesi valikon

Breast Cancer Dataset Overview

The breast_cancer dataset from scikit-learn is a widely used binary classification dataset for predicting whether a tumor is malignant or benign based on various features computed from digitized images of fine needle aspirate (FNA) of breast masses.

Data Overview

  • Number of samples: 569;
  • Number of features: 30;
  • Target variable: target (0 = malignant, 1 = benign);
  • Task: Predict whether a tumor is malignant or benign based on the features above.
Tehtävä

Swipe to start coding

You are given a simple binary classification dataset. Your task is to:

  1. Train a Logistic Regression model using scikit-learn.

  2. Evaluate it with the following metrics:

    • Accuracy.
    • Precision.
    • Recall.
    • F1 Score.
    • ROC–AUC Score.
    • Confusion Matrix.
  3. Perform 5-fold cross-validation and report the mean accuracy.

Finally, print all results clearly formatted, as shown below.

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 1. Luku 7
single

single

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

some-alt