필터 지우기
필터 지우기

Parameter Optimization using Simulated Annealing

조회 수: 2 (최근 30일)
MByk
MByk 2017년 12월 18일
댓글: MByk 2017년 12월 18일
I am new to optimization and trying to understand the basics, so sorry if it is a dumb question. Is it possible to tune parameters (which is a search problem) of a classifier using simulated annealing or other optimization technique, just for an example optimum value of "k" in KNN (I know there is an automatic hyperparameter optimization for KNN)?

채택된 답변

Alan Weiss
Alan Weiss 2017년 12월 18일
편집: Alan Weiss 2017년 12월 18일
Sure, you can do anything you want. It might not be a good idea, but feel free.
Write an objective function that is, say, the cross-validation error rate for a particular parameter. If you have k as your parameter, and a cross-valudation partition c, then you might have
fun = @(k)kfoldLoss(fitcknn(X,y,'CVPartition',c,...
'NumNeighbors',k));
The only problem with this is that k is an integer variable, and most optimizers (including simulannealbnd) work only with continuous parameters. But you could use mixed-integer ga to optimize this.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
  댓글 수: 1
MByk
MByk 2017년 12월 18일
Thank you very much greatly appreciated.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulated Annealing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by