Deploying with Weka Models
1 次查看(过去 30 天)
显示 更早的评论
Hi!
My problem is that when i deploy my Program along with weka models. The resulting error is that it cant read the weka model file.
Here is the structure of the Files
ModelLoadmodel.m
Contains The ff code
javaaddpath('weka.jar');
addpath('SurfModels');
loadedModel = wekaLoadModel('RandomForestK40Surf.model');
The Folder wherein all of these file contains has a structure of
-WekaLoadmodel.m
-SurfRandomForestK40.model
-Folder"WekaLab" which has a
- WekaLoadModel.m
- Weka.jar
When i try to use the commandline function of
loadedModel = wekaLoadModel('RandomForestK40Surf.model');
The loadedModel is successfully loaded but when i deploy it using deploytool and the output is Error reading model file
The WekaLoadmodel.m Contains
if ~exist(filename, 'file')
error('WEKALAB:wekaLoadModel:FileNotFound', 'No file found at %s', filename);
end
%%Code
try
modelObj = weka.core.SerializationHelper.read(filename);
catch err
error('WEKALAB:wekaLoadModel:ReadError', 'Error reading model file at %s', filename);
end
end
It came from https://www.mathworks.com/matlabcentral/fileexchange/58675-wekalab--bridging-weka-and-matlab . Is there some sort of problem when loading other file extension in matlab deploytool?
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!