How can I specify a Min LeafSize in a decision tree and also optimize it?

1 回表示 (過去 30 日間)
Rafael Cordero
Rafael Cordero 2021 年 7 月 22 日
コメント済み: Rafael Cordero 2021 年 7 月 23 日
Hello all,
I was wondering if it is possible to optimize the decision tree hyperparameter of MinLeafSize whilst imposing a limit on this MinLeafSize.
I.e.: I would like to optimize the MinLeafSize parameter, but I dont want it to be smaller than e.g. 50. Is this possible?
Thank you

採用された回答

Alan Weiss
Alan Weiss 2021 年 7 月 23 日
Take a look at the hyperparameter optimization argument of fitctree. You can fit the MinLeafSize parameter. To set the range you want, as the documentation states, "Set nondefault parameters by passing a vector of optimizableVariable objects that have nondefault values." Follow the example.
Alan Weiss
MATLAB mathematical toolbox documentation

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProblem-Based Optimization Setup についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by