Question
**Numpy, pandas, and SKLearn packages allowed** Select the pima diabetes dataset with binary target values from https://machinelearningmastery.com/standard-machine-learning-datasets/ Use pandas to read CSV file as dataframe.
**Numpy, pandas, and SKLearn packages allowed**
- Select the pima diabetes dataset with binary target values from
https://machinelearningmastery.com/standard-machine-learning-datasets/
- Use pandas to read CSV file as dataframe. (1pt)
e.g. The following code helps import pima diabetes dataset
col_names = ['pregnant', 'glucose', 'bp', 'skin', 'insulin', 'bmi', 'pedigree', 'age', 'label']
# load dataset
pima = pd.read_csv("pima-indians-diabetes-database.csv", header=None, names=col_names)
- Select 5 (if not possible then select 4) features from the chosen dataset. (1pt)
List all features you selected in your report.
For example, the following code will select two features
feature_cols = ['pregnant', 'age']
X = pima[feature_cols]
- Use train _test_split from sklearn.model_selection to split test and training data by 40% testing + 60% training. (1pt)
- Fit your model with training data and test your model after fitting.
- Calculate and print out
the confusion matrix (1pt)
precision score, recall score, F score (3pts)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started