How can I use Grid search on these parameters?
9 次查看(过去 30 天)
显示 更早的评论
How can I use Grid search on following parameters?
-MaxNumSplits
-MinLeafSize
-SplitCriterion
-NumVariablesTosample
% decision tree model
t = ClassificationTree.fit(Xtrain,Ytrain,'CategoricalPredictors',catPred);
0 个评论
回答(1 个)
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!