Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

5. A dataset listing salary and age information for customers and whether they purchased a product is given below. a) Plot these 10 data vectors

image text in transcribed

5. A dataset listing salary and age information for customers and whether they purchased a product is given below. a) Plot these 10 data vectors in the above table using a 2D plane where vertical axis is for age and the horizontal axis is for salary. Also include the location of the query SALARY =56,000, AGE=35 which should be indicated by the "?". b) Determine the class label for the query data using the 1-NN classifier algorithm that employs the Euclidean distance. Compare and discuss your finding using the computation with that through visual observation for assessment of the nearest neighbor for the query instance. Any surprises? c) Identify and implement a fix to address this mismatch which you will notice in part b. The 1-NN classifier should determine the data point with ID \#1 (SALARY=53,700 and AGE=41) as the nearest neighbor as a result of the fix. Using the fix, recompute values of 10 data and query vectors. List the new values in a table. d) Plot the recomputed data and query vectors using the same template as in part a. e) Determine the class label using the 1-NN classifier for the query data using recomputed values. Compare and discuss your findings with those in part b

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions