Deploying with Weka Models

2 vues (au cours des 30 derniers jours)
Albert Rey Ruelan
Albert Rey Ruelan le 29 Oct 2017
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?

Réponses (0)

Catégories

En savoir plus sur MATLAB Compiler dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by