Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Note: Provide justifications/calculations/steps along with each answer to illustrate how you arrived at the answer. State your arguments clearly, in logical sequence and present a

Note: Provide justifications/calculations/steps along with each answer to illustrate how you arrived at the

answer. State your arguments clearly, in logical sequence and present a well commented code. You will not

receive credit for giving an answer without sufficient explanation.

Questions

Q1: Read the breast cancer dataset from sklearn as per the following details

(from sklearn.datasets import load_breast_cancer)

(a) Check the data by converting the built-in data set to a Pandas dataframe.

(b) Split the data into training and test sets (a ratio of 75:25).

(c) Build a logistic regression model on the above data.

(d) Plot the ROC and calculate AUC for the training data and find the best threshold.

(e) Based on this threshold, classify your test data.

Q2: Extract the stock market data from Yahoo finance for a set of any 15 companies of four different

sectors during 01.04.2017 to 31.09.2021. Make use of the following attributes on the data:

Highest price of the day

Minimum price of the day

Opening price of the day

Closing Price of the day

Take the average of these four attributes as an average movement of the day. Now apply k-Means

clustering to cluster the chosen 15 companies as per their respective sectors.

Q3: Explore the application of k-means clustering in color compression of a color image. To explore it,

read an image having multiple colors where a large number of colors will be unused, and many of the

pixels in the image will have similar or even identical colors. Cluster these several colors into a 16

different clusters and show the compressed image.

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_2

Step: 3

blur-text-image_3

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

Modern Database Management

Authors: Heikki Topi, Jeffrey A Hoffer, Ramesh Venkataraman

13th Edition

0134773659, 978-0134773650

More Books

Students also viewed these Databases questions

Question

=+4 What are non-union workers representations?

Answered: 1 week ago