Question: Use Python and please follow the steps as shown in the image Problem 2) Threshold-based Classifier - We have a two-class classification problem (i.e., C1

 Use Python and please follow the steps as shown in the

Use Python and please follow the steps as shown in the image

Problem 2) Threshold-based Classifier - We have a two-class classification problem (i.e., C1 and C2). Each data sample is represented by two attributes (x, y). The three data samples in class C1 1 are {(1, 1), (3, 2), (2,3)} and {(1, 2), (2, 2), (2, 1)} in class C2. Perform the followings in Python: a) Plot the data samples. The data points in classes C1 and C2 must 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 thz and thy. c) Your code calculates and prints the classification 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 Ci, 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) Use a for loop to repeat part c for a total of three times and enter different sets of thresholds each time. e) Based on your observation from the results above, report a suitable set of thresholds that will give the highest possible accuracy. Report your suggested thresholds and the corresponding classification accuracy

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!