Error loading TreeBagger from .MAT file in deployed app.
显示 更早的评论
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-
采纳的回答
更多回答(1 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Classification Ensembles 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!