Optimize Fitted KNN Classifier
1 回表示 (過去 30 日間)
古いコメントを表示
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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/249144/image.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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/249145/image.png)
0 件のコメント
回答 (1 件)
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!
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!