Question

Given the training data in Question 1 below| (on buying RRSP8), predict the class of the following new example using k-neares

Sector of activity Self-Employed Credit-rating Person ID Class: Buys-RRSP Income farming medium fair 1 no no farming fair low

Given the training data in Question 1 below| (on buying RRSP8), predict the class of the following new example using k-nearest-neighbor classification fork = 5: sector = oil industry, income = medium, self-employed = yes, credit-rating fair. For distance measure, use the following similarity measure: similarity(tupleAtupleB)-4-.(w"S(ab/4), where S(ab) is 1 if parameter a equals parameter b and o otherwise The parameters atand biare either Sector, income, self-employed, or credit-rating. The weights wiare all 1, except for income, which is 2. Please show your calculations or explain the steps. Note: the similarity measure is the opposite of the distance measure.
Sector of activity Self-Employed Credit-rating Person ID Class: Buys-RRSP Income farming medium fair 1 no no farming fair low 2 yes no oil industry medium fair no no oil industry low fair yes 4 yes oil industry medium excellent 5 yes yes banking medium excellent yes no oil industry high fair 7 no no oil industry high excellent no no banking high fair yes no farming low excellent 10 yes yes banking low excellent 11 yes yes farming medium fair 12 yes no high banking fair 13 yes yes farming medium excellent 14 no yes
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution

And We have to predict., sector = oil industry income = medium. self-employed = yes, credit rating fair


Also the similarity measure is given as : similarity (tuple A, tuple B) =Wi (S(ai, b)) i=1


where s(a, b)= 1 if parameter "a" equals parameter "b".. and =0 otherwise The parameters a(i), b(i).. are ether Sector , income, self-employed, or credit-rating. The weights w(i) are all 1. except for income. which is 2.


NOTE: For calculating similarity measure we just use the given formula and corresponding value of s and W. depend, on the case if they match our training set and the query or not

Person Sector of Activity Self Income Credit Similarity employed Rating ID Measure Value 0+2 0+1 3 1 farming medium No Fair 0Person Sector Credit Similarity Rank Income Self- Can we Y=Category ID of Rating include it Measure Highest Of Nearest employexcellent banking low 0+0+1+0 13 NO Yes yes = 1 12 farming medium fair 0+2+1 1 14 NO No yes = 1 8 13 banking high fair 0+0+1+

So we can see that we have 3 No and 2 yes so our final answer class label will be "No".

(Note: here we had to choose one among several choices for the fifth neighbour so we selected one randomly. and there will be a change of answer if we had chose another one. So in such case we just select a random one and make our decision of the class)

Add a comment
Know the answer?
Add Answer to:
Given the training data in Question 1 below| (on buying RRSP8), predict the class of the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Given the training data in Question 1 below| (on buying RRSP8), predict the class of the following new example using k...

    Given the training data in Question 1 below| (on buying RRSP8), predict the class of the following new example using k-nearest-neighbor classification fork = 5: sector = oil industry, income = medium, self-employed = yes, credit-rating fair. For distance measure, use the following similarity measure: similarity(tupleAtupleB)-4-.(w"S(ab/4), where S(ab) is 1 if parameter a equals parameter b and o otherwise The parameters atand biare either Sector, income, self-employed, or credit-rating. The weights wiare all 1, except for income, which is 2....

  • Question 3 Given the following data points, use the K-Nearest Neighbours (kNN) (k=5) to find the class for age<=30, income=medium, student=yes, credit-rating=fair. Show your calculations and the fi...

    Question 3 Given the following data points, use the K-Nearest Neighbours (kNN) (k=5) to find the class for age<=30, income=medium, student=yes, credit-rating=fair. Show your calculations and the final clusters. For similarity measure use a simple match of attribute values: Similarity(A,B)= equals bi and 0 otherwise. ai and b i are either age, income, student or credit_rating. Weights are all 1 except for income it is 2. 5%, *c(a,,b,)/4 ,h ) is 1 ifai where cla -1 studentcredit rating dass RID...

  • Given the training set below: Age Income Student Credit_rating Buys_computer <=30 high no fair no <=30...

    Given the training set below: Age Income Student Credit_rating Buys_computer <=30 high no fair no <=30 high no excellent no 31…40 high no fair no >40 medium no fair yes <=30 low no fair yes >40 high no fair no >40 low yes fair yes >40 low yes excellent no 31…40 low yes excellent yes <=30 medium no fair no <=30 low yes fair yes >40 medium yes fair yes <=30 medium yes excellent no 31…40 medium no excellent no...

  • Group of answer choices (Select all that apply) 1. Age: 37; Income: medium; Student: no; Credit_rating:...

    Group of answer choices (Select all that apply) 1. Age: 37; Income: medium; Student: no; Credit_rating: excellent; 2. Age: 45; Income: low; Student: yes; Credit_rating: excellent; 3. Age: 32; Income: high; Student: no; Credit_rating: fair; 4. Age: 30; Income: medium; Student: no; Credit_rating: excellent; 5. Age: 40; Income: low; Student: yes; Credit_rating: fair; 6. Age: 39; Income: medium; Student: yes; Credit_rating: fair; Given the decision tree in the image, which of the following are rules extracted from it? (Select all...

  • Group of answer choices 1. IF Age=31..40 AND Income=medium THEN Buys_computer=yes; 2. IF Age<=30 AND Income=low...

    Group of answer choices 1. IF Age=31..40 AND Income=medium THEN Buys_computer=yes; 2. IF Age<=30 AND Income=low THEN Buys_computer=no; 3. IF Age<=30 AND Student=yes THEN Buys_computer=no; 4. IF Age<=30 AND Credit_rating=excellent THEN Buys_computer=yes; 5. IF Age>40 AND Credit_rating=excellent THEN Buys_computer=no; 6. IF Age=31..40 THEN Buys_computer=yes; Given the decision tree in the image, which of the following are rules extracted from it? (Select all that apply) age? <=30 31..40 >40 student? income? credit rating? no yes excellent low medium, high fair no...

  • And there was a buy-sell arrangement which laid out the conditions under which either shareholder could...

    And there was a buy-sell arrangement which laid out the conditions under which either shareholder could buy out the other. Paul knew that this offer would strengthen his financial picture…but did he really want a partner?It was going to be a long night. read the case study above and answer this question what would you do if you were Paul with regards to financing, and why? ntroductloh Paul McTaggart sat at his desk. Behind him, the computer screen flickered with...

  • Discussion questions 1. What is the link between internal marketing and service quality in the ai...

    Discussion questions 1. What is the link between internal marketing and service quality in the airline industry? 2. What internal marketing programmes could British Airways put into place to avoid further internal unrest? What potential is there to extend auch programmes to external partners? 3. What challenges may BA face in implementing an internal marketing programme to deliver value to its customers? (1981)ǐn the context ofbank marketing ths theme has bon pururd by other, nashri oriented towards the identification of...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT