Deploying with Weka Models

4 次查看(过去 30 天)
Albert Rey Ruelan
Albert Rey Ruelan 2017-10-29
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 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by