I'm using the TreeBagger function of Matlab R2015a with the name-value pairs 'OOBPrediction', 'on'
and 'OOBPredictorImportance', 'on'
. Now I'm getting the following error message:
Invalid parameter name: OOBPrediction.
In the official Matlab documentation this name-value pair is listed.
What is wrong?
This actually seems to be something that has changed between MATLAB R2015a and R2015b.
If you consult the documentation inside your own MATLAB R2015a (using either help treebagger
or doc treebagger
), you will get an example where that parameter is used:
Example:
load fisheriris b = TreeBagger(50,meas,species,'oobpred','on') plot(oobError(b)) xlabel('number of grown trees') ylabel('out-of-bag classification error')
In the online documentation and in newer versions of MATLAB, you will find something like:
Example:
load fisheriris b = TreeBagger(50,meas,species,'OOBPrediction','on') plot(oobError(b)) xlabel('number of grown trees') ylabel('out-of-bag classification error')
Long story short:
oobpred
instead of OOBPrediction
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.