Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

hello please help ill upvote Problem 2) Threshold-based Classifier - We have a two-class classification problem (i.e., Cl and C2). Each data sample is represented

image text in transcribedhello please help ill upvote
Problem 2) Threshold-based Classifier - We have a two-class classification problem (i.e., Cl and C2). Each data sample is represented by two attributes (x,y). The three data samples in class CI are {(2, 2), (3, 2), (2, 3); and {(1, 2), (1, 1), (2, 1); in class C2. Perform the followings in Python: a) Plot the data samples. The data points in classes CI and C2 have to be in two different colors and shapes. Label the axes and add legends as appropriate. b) The code asks the user to enter two thresholds th, and thy. c) Your code calculates and prints the training accuracy based on the user-entered thresholds. To do so, assume that for any data point (x,y) with x>th, and y>thy, the data sample belongs to class Cl, and C2 if otherwise. Using this rule and the user- entered thresholds, the code calculates the classification accuracy for the six data samples. The classification accuracy is defined as the number of correctly classified data points over the total number of data points (6 in here). d) The code asks the user to enter a new data sample by entering both x and y. e) Plot the new data sample on the plot in part (a). f) The code determines and prints the class (Cl or C2) of the new data sample using the user-entered thresholds. g) The user can enter new data points, and the code repeats parts (d)-(f) unless the user writes 'x' as the input. h) The code asks the user for new threshold values and starts from part (b) i) Select the best thresholds that will give the highest accuracy. Run part (c) using these thresholds. What classification accuracy did you achieve? Was it the highest possible accuracy for the given six data samples

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

Data Management Databases And Organizations

Authors: Watson Watson

5th Edition

0471715360, 978-0471715368

More Books

Students also viewed these Databases questions

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago