Cannot set InBagFraction for treebagger regression

2 ビュー (過去 30 日間)
vascosupsi
vascosupsi 2017 年 2 月 2 日
回答済み: Yiwen Mei 2018 年 9 月 22 日
I am trying to train a random forest that performs a regression using the treebagger class. As I have a considerably high amount of data, I would like to set a InBagFraction<1 . My code is the following.
tree=TreeBagger(numTrees,X,Y,'method','regression','NumPredictorstoSample',numPTS,...
'oobvarimp', 'on', 'minleaf', minLS,'InBagFraction',0.1);
The function crashes with the following error:
Subscripted assignment dimension mismatch.
Error in TreeBagger/growTrees (line 797) bagger.InBagIndices(:,NTreesBefore+1:NTreesBefore+NumTrees) = slicedInBagIndices;
Error in TreeBagger (line 619) bagger = growTrees(bagger,NumTrees,'Options', parallelOptions, 'nprint', nprint);
Is it a bug ora am I doing something wrong?

回答 (1 件)

Yiwen Mei
Yiwen Mei 2018 年 9 月 22 日
I am facing the same problem.

カテゴリ

Help Center および File ExchangeRegression Tree Ensembles についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by