find the evaluation metrices for KNN and SVM and display the best classification
Answer: K Nearest Neighbour
<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
classification gets evaluated based on its accuracy of prediction of result
so for knn
total sample size=53+0+9+158=220
correctly predicted = 211
so accuracy percentage= (total_accurate/total_sample)*100=(211/220)*100=95.91%
i.e error in accuracy while using KNN is 4.091 %
for SVM
total sample size=46+3+13+158=220
correctly predicted = 46+158=204
so accuracy percentage= (total_accurate/total_sample)*100=(204/220)*100=92.723%
i.e error in accuracy while using KNN is 7.273 %
so error rate for KNN is less so best classification in this scenario is KNN
<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>
note: if u want to evaluate above algo based on different criterion let me know
happy learning and please upvote
find the evaluation metrices for KNN and SVM and display the best classification 1.For the following...
Classification in Python: Classification In this assignment, you will practice using the kNN (k-Nearest Neighbors) algorithm to solve a classification problem. The kNN is a simple and robust classifier, which is used in different applications. The goal is to train kNN algorithm to distinguish the species from one another. The dataset can be downloaded from UCI Machine Learning Repository: https://archive.ics.uci.edu/ml/machine-learning-databases/iris/ (Links to an external site.)Links to an external site.. Download `iris.data` file from the Data Folder. The Data Set description...
3112 1617 Q4 Q4 (4 marks) (a) What is machine learning? (b) Discuss the difference between classification and clustering. Give one example algorithm (6 marks) for classification and clustering respectively For Q4(c)-Q4(f, consider the figure below which shows the examples (instances) with different Yellow Red Purple Orange Height Blue Red Violet Green Width (c) Is k-Nearest Neighbors (KNN) a classification method or clustering method? mark) (d) What is the outcome of KNN for the query point based on I-nearest neighbor?...
Find the regression equation, letting the first variable be the predictor (x) variable. Using the listed actress/actor ages in various years, find the best predicted age of the Best Actor winner given that the age of the Best Actress winner that year is 58 years. Is the result within 5 years of the actual Best Actor winner, whose age was 44 years? Best Actress 27 31 30 64 34 32 46 29 61 22 43 53 Best Actor 41 38...
1) 2) The data show the chest size and weight of several bears. Find the regression equation, letting chest size be the independent (x) variable. Then find the best predicted weight of a bear with a chest size of 58 inches. Is the result close to the actual weight of 632 pounds? Use a significance level of 0.05. Chest size (inches) 46 57 53 41 Weight (pounds) 384 580 542 358 306 320 Click the icon to view the critical...
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 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 follow following scripts: Script for part A:Script for Part B: Matlab Exercises 1. Find the determinant (command: det(A)) and the condition number (command: cond(A)) of the Hilbert matrix H of order k (command: hilb(k)), for k = 1,2, ..., 10. Plot the determinant and the condition number as a function of k using a logarithmic scale for the vertical axis. Hint: The template to help you with this homework assignment is homework/hw15.m. 2. Determine if y is in the...
1. 2. 3. Use the given data to find the equation of the regression line. Examine the scatterplot and identify a characteristic of the data that is ignored by the regression line. X 5 14 13.31 13 13.66 12 13.74 10 13.05 9 12.30 4 4.31 6 8.34 8 11.25 11 13.54 7 9.94 y 6.46 = 3.00 + 0.80 (Round to two decimal places as needed.) The data show the chest size and weight of several bears. Find the...
Consider the following data set that contains information about a sample of ten 2015 Subaru Outback offered for sale. Vehicle Condition Color Mileage Price x1000miles) S1000) 1 poor silver 13 30 2 average white 22 3 average blue 29 28 4 average green 46 27 5 average silver 47 26 6 average red 50 24 7 good silver 53 23 8 excellent green 56 22 9 poor red 64 21 10 excellent blue 65 20 The scatter plot that summarizes...
Need help with this question on matlab. Show code please! Salmon_dat.csv 272395 286156 391573 461443 401998 313120 240763 297488 446152 480276 420555 277697 357375 331788 420879 332479 320947 359853 300917 403286 416419 345028 256049 281980 286625 278560 344422 317956 219688 259337 208197 189419 272884 360673 248860 306981 401711 867728 870035 921314 846026 570413 493708 275954 518942 480284 809799 677171 589937 1129664 1152642 Exercise 1: Salmon Runs Download the file salmon-dat.csv included with the homework. This file con- tains the annual...