Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SOLVE BY PYHON PLEASE SOLVE BY PYTHON PLEASE !!! Out[4]: shape surface color type class 0 1 1 1 1 1 1 1 1 1

SOLVE BY PYHON PLEASE

image text in transcribedimage text in transcribedSOLVE BY PYTHON PLEASE !!!

Out[4]: shape surface color type class 0 1 1 1 1 1 1 1 1 1 2 1 1 2 1 B 3 1 1 2 1 B 4 1 1 1 1 B C1. [4 Marks] 1. [2] Build a Naive-Bayes classifier (categorical classifier) on the entire given data using Sci-kit learn. Use proper encoding (if needed). For the classifier, use alpha = 10-7. class prior as none, fit prior as none, and all other options to default. 2. [2] Compute the confusion matrix and the accuracy of the above classifier on the entire given data. In [ ]: #Answer for C1.1 In [ ]: #Answer for C1.2 C2. [5 Marks] Answer the following questions: 1. [2] Write two classification rules based on the following decision tree (execute the following cell to display the tree). 2. [3] Write an association rule for "shape -> surface", which has the highest support. Write the corresponding support and accuracy. Use 'Data_C' to identify the association rule. C3. [3 Marks] Draw the dendrogram for all the input columns of data given in 'Data_C' file. Use MAX distance rule, and Euclidean norm as the distance measure In [ ]: #Answer for C3 C4. [6 Marks] Consider the following distance matrix between clusters and points. P_(i) represents data point i, and P_(ij,..) represents a cluster containing points i, j,.... For example, P_(2,3,8) represents a cluster containing data points 2, 3, and 8. P_(1,10) P_(2,3,8) P_(4,6) P_(5,7) P_(9) 0 23 14 5 21 P_(1,10) P_(2,3,8) 23 0 22 11 9 P_(4,6) 14 22 0 12 18 5 11 12 0 22 P_(5,7) P_(9) 21 9 18 22 0 1. [2] Which pair is closest using in the above distance matrix. The pair could be two single points, a point and an existing cluster, or two clusters. Name the new cluster (closest pair) according to the P_(i,j,..) representation. 2. [2] Compute the distances from all the other points and clusters to the new cluster identified in C4.1. Use the MAX distance rule. 3. [2] Find three clusters from the distance matrix obtained after C4.2. Write as comment, the data points for each cluster in P_(ij,..) representation

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

The Database Relational Model A Retrospective Review And Analysis

Authors: C. J. Date

1st Edition

0201612941, 978-0201612943

Students also viewed these Databases questions