I recently studied the k-nearest neighbor and decision trees, and I’m very interested to know about the difference between them, i.e. for the task, for example, to separate the objective function "return 1 if x2> x1, return 0 otherwise", then selecting the Nearest neighbor will be good here, since the decision tree will cause too many splits. Therefore, I am simply considering the question of when a scaled decision tree would be more suitable than a k-nearest neighbor?
Another question is only what is the K-nearest neighbor, I understand that when K = 1, then this is just a basic classification (classifies the instance to the class of the nearest neighbor). Can someone give me an idea on what classification the task of a 3-closest neighbor will definitely exceed the 1-closest neightbour classifier?
Thanks in advance!
k-NN vs decision tree
I always think that an image is the best way to get an intuition of an algorithm. The objective function that you offer will lead to the creation of a dataset like this:
x1 - x2 = 0. , , . , , , :
, , , , , , .
, , , , StackOverflow ( ).
, , , ,
k k-NN
, k k- , , k . , k , .
k-NN, . k = 1 k-NN :
k, , . , - :
k . , , , , ?
, , , , , , , ( ). , , , , , . , , (, , ..)
.
( , , , .)
, - , kNN, , k = 3 ( k = 1), , ( , ).
. , kNN, , , , , . - . . , " ", , . , (, ), , . , k = 3 , k = 1, , , , .
. , k = 3 , k = 1 , . , , , , , , , , .
, kNN - , , , ..
, .
Source: https://habr.com/ru/post/1772795/More articles:Поддерживает ли Weblogic отказоустойчивость объектов сеанса, которые не помечены как сериализуемые? - javaI want to improve my search at http://www.go4film.com - phpThe best way Azure Architect works to process data from ~ 10 queues - c #datatemplate style to match a Silverlight column header datgrid - silverlightHow to automatically log in using system credentials? - javaWCF / WPF Best Practices - WCF ChannelFactory and PRISM - wpfHow to wait for the Linux kernel stream (kthread) to exit? - cshowing link address in C # (WCF debugging) - c #C # update application - c #IIS issue, web application - iisAll Articles