Error loading TreeBagger from .MAT file in deployed app.
Show older comments
Hiya =)
I've been browsing the forums looking for information on this... When run in MatLab my app works fine. But when it is deployed, I get this message:
Warning: Variable 'model' originally saved as a TreeBagger cannot be instantiated as an object and will be read in as a uint32.
I have a deployed app that trains models and stores them out using save() with '-struct' semantics. Another deployed app loads and uses these models regularly.
Note that my TreeBagger is actually a field within the struct (maybe this is significant):
model.meta % a whole bunch of info
model.model % the TreeBagger object
I have come across the following article that may explain the behaviour. It discusses saving (but not loading?) of user-defined objects:
This is where I am confused. The TreeBagger object is not really user-defined as such. It's part of a rather expensive toolbox, and would presumably define its own saveobj and loadobj methods if it needed to...
Do I need to follow the linked article and hack the TreeBagger class, or is there a simple solution?
Thanks in advance!
-g-
2 Comments
Geoff
on 2 Feb 2012
Walter Roberson
on 2 Feb 2012
You should probably open a support case.
Accepted Answer
More Answers (1)
Categories
Find more on Classification Ensembles 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!