Why does a "CompactRegressionEnsemble" Object Saved in MATLAB R2023b Cause Warnings When Loaded in MATLAB R2023a?
Show older comments
I've noticed an issue where a "CompactRegressionEnsemble" object, created and saved with MATLAB R2023b, is exhibiting numerous warnings and errors when it is loaded in MATLAB R2023a.
To reproduce this issue, I performed the following steps in MATLAB R2023b:
>> x = rand(1000,5);
>> y = rand(1000,1)<0.5;
>> tree = fitrensemble(x,double(y));
>> ok = compact(tree);
>> save('ok.mat','ok')
Subsequently, the 'ok.mat' file was loaded in MATLAB R2023a, leading to the following warning:
>> load('ok.mat')
Warning: While loading an object of class 'classreg.learning.regr.CompactRegressionTree': When constructing an instance of class 'classreg.learning.regr.CompactRegressionTree', the constructor must preserve the class of the returned object.
Accepted Answer
More Answers (0)
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!