Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

**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**

  1. Select the pima diabetes dataset with binary target values from

https://machinelearningmastery.com/standard-machine-learning-datasets/

  1. 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)

  1. 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]

  1. Use train _test_split from sklearn.model_selection to split test and training data by 40% testing + 60% training. (1pt)

  1. Fit your model with training data and test your model after fitting.

  1. 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Informix Database Administrators Survival Guide

Authors: Joe Lumbley

1st Edition

0131243144, 978-0131243149

More Books

Students also viewed these Databases questions

Question

WHAT IS AUTOMATION TESTING?

Answered: 1 week ago

Question

=+ b. How would the change you describe in part

Answered: 1 week ago