Optimize Fitted KNN Classifier

3 次查看(过去 30 天)
Hyeongcheol Lee
Hyeongcheol Lee 2019-11-20
I have questions about the "Optimize Fitted KNN Classifier" example (https://www.mathworks.com/help/stats/fitcknn.html).
Is there any rule to change values of "NumNeighbors" and "Distance" while iteration?
It just seems random.
캡처.PNG
And, I'm not sure the final model with below "NumNeighbors" and "Distance" is the best optimized model or not.
How can you assure the final model is the best optimized?
캡처2.PNG

回答(1 个)

Bhargavi Maganuru
Bhargavi Maganuru 2019-11-28
Values of NumNeighbors” and “Distance” are changing because of setting property OptimizeHyperparameters' to ‘auto’ which will try to optimize the “distance” and “NumNeighbours” parameters.
Refer to the following link for more information about OptimizeHyperparameters'
To pick best estimate, bayesian optimization acquisition function 'expected-improvement-plus' is used. It calculates best estimated feasible point using bestpoint function.
For more information about bestpoint refer the link
Hope this helps!
  1 个评论
Hyeongcheol Lee
Hyeongcheol Lee 2019-11-28
Hello, Bhargavi.
Thanks for your reply.
But, I'm still not sure about below two things.
  1. Is there any rule to change values of "NumNeighbors" and "Distance" while iteration? In other words, is there any rule to choose "Next point"?
캡처.PNG
2. In the example "Optimize Fitted KNN Classifier" in the below site, the iteration is only 30. So, if we do more iteration I think there is better optimization. So, my question is... how should I do to get real optimization point?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Problem-Based Optimization Setup 的更多信息

产品


版本

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by