How can I use Grid search on these parameters?

조회 수: 27 (최근 30일)
Yooya yooya
Yooya yooya 2020년 12월 11일
답변: Puru Kathuria 2020년 12월 22일
How can I use Grid search on following parameters?
-MaxNumSplits
-MinLeafSize
-SplitCriterion
-NumVariablesTosample
% decision tree model
t = ClassificationTree.fit(Xtrain,Ytrain,'CategoricalPredictors',catPred);

답변 (1개)

Puru Kathuria
Puru Kathuria 2020년 12월 22일
The following post explains how to do a grid search for SVM. You can do the same for decision tree by just changing the parameters.
Also, this link contains a function that does grid search on a neural network, you can also take inspiration from this function to perform the same on your decision tree.
The main idea is to use ndgrid and pass the parameters you want to optimize to ndgrid and form pairs to perform the exhaustive search using ndgrid.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by