setting OOBPredictorImportance to 'on' or true generates error

2 ビュー (過去 30 日間)
Jon Whitney
Jon Whitney 2016 年 2 月 2 日
コメント済み: Michael Garaszczuk 2017 年 11 月 18 日
I'm trying to use a random forest as a feature ranking tool, and the documentation for TreeBagger says that I should be able to turn on the OOBPredictorImportance by specifying it as a property, such as B = TreeBagger(50,training_set,training_labels,'FBoot',0.667, 'OOBPredictorImportance', 'on') but when I do I get the error: Invalid parameter name: OOBPredictorImportance. Am I missing something about specifying properties?

回答 (2 件)

Ilya
Ilya 2016 年 2 月 2 日
You are likely using an older release of MATLAB. Refer to the doc for that release or type 'help TreeBagger.TreeBagger' to see parameter names. The old name for that parameter was 'oobpred'.
  1 件のコメント
Jon Whitney
Jon Whitney 2016 年 2 月 2 日
Looks like you're right. Thanks!

サインインしてコメントする。


Hoi Yu Tang
Hoi Yu Tang 2017 年 7 月 6 日
I'm also getting this error, although I'm running 2017a and version 11.1 of the Statistics and Machine Learning Toolbox.
Rather confused!
(for what it's worth, the older argument 'oobpred' didn't work either)
  2 件のコメント
Hoi Yu Tang
Hoi Yu Tang 2017 年 7 月 21 日
Turns out my problem was arising due to trying to pass tall arrays into TreeBagger, which creates a CompactTreeBagger class which does not support the OOb prectiction/error methods.
Documentation HERE
Michael Garaszczuk
Michael Garaszczuk 2017 年 11 月 18 日
What changes did you make to solve this?

サインインしてコメントする。

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by