Brace indexing error using fitcensemble
1 回表示 (過去 30 日間)
古いコメントを表示
I am getting strange errors trying to use fitcensemble, so I refered to the manual, and ran the simple following example, which I found on the fitcensemble help page:
load census1994
Mdl1 = fitcensemble(adultdata,'salary')
these two simple lines of code should result in a classification ensemble but instead I get the following error:
Error using classreg.learning.internal.callBuiltinFitEnsemble
Error: File: callBuiltinFitEnsemble.m Line: 191 Column: 41
Brace indexing into the result of a function call is not supported. Assign the result of 'curvature' to a variable first, then brace index into it.
Error in classreg.learning.ensemble.Ensemble/fitBuiltinEnsemble (line 457)
classreg.learning.internal.callBuiltinFitEnsemble(this.Method,...
Error in classreg.learning.classif.ClassificationEnsemble (line 85)
this = fitBuiltinEnsemble(this,nlearn,dataSummary,classSummary);
Error in classreg.learning.FitTemplate/fit (line 292)
[varargout{1:nargout}] = this.MakeFitObject(X,Y,W,this.ModelParams,fitArgs{:});
Error in fitensemble (line 364)
obj = fit(temp,X,Y);
Error in fitcensemble (line 212)
obj = fitensemble(X, Y, Method, NumLearningCycles, Learners, ...
So I feel like the problem is not my code, but instead I wonder if the problem is with some of the recent updates?
I am using version: '24.1.0.2628055 (R2024a) Update 4'
on a 64-bit Windows® platform
0 件のコメント
採用された回答
Vinayak
2024 年 7 月 17 日
Hi Yoav,
The error you're encountering with fitcensemble seems to be related to the way MATLAB is handling the internal variable curvature in the callBuiltinFitEnsemble function. This issue might have arisen due to some recent updates or changes in your MATLAB environment.
To resolve this, you can try restoring the default MATLAB path and refreshing the toolbox cache. Running the following commands should help:
>> restoredefaultpath
>> rehash toolboxcache
This should fix the issue. If the problem persists, you might need to contact MathWorks Technical Support.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Classification Ensembles についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!