Question: Use the breast cancer dataset from scikit-learn to perform a classification task. Write a function that loads the dataset and performs the following steps: 1.
Use the breast cancer dataset from scikit-learn to perform a classification task. Write a function that loads the dataset and performs the following steps:
1. Split the data into training and testing sets.
2. Train a logistic regression model on the training data.
3. Use the trained model to make predictions on the testing data.
4. Evaluate the model using the accuracy, precision, recall, and F-1 metrics.
5. Extra credit: Use the 10-fold evaluation to replace the step1, and redo steps 2-4.
Hint: You can use the load_breast_cancer function from scikit-learn to load the dataset, the LogisticRegression class from scikit-learn to train the logistic regression model.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
