MATLAB Answers

0

How work app compiler with train regression model

Juan Carlos Pozuelos Buezo さんによって質問されました 2019 年 11 月 6 日
最新アクティビティ robin thomas さんによって 回答されました 約12時間 前
Hi.
Hi everyone, I made an application to predict the load demand. For this, I used a function of the train regression model of the regression learning toolbox, and put this function in the application designer, to generate an application with the application compiler toolbox. That idea is that this application can be used with co-workers without matlab.
About the train crisis, I do not make a previously trained model, instead of, I want that users to always use the application of the application regression train and make a new model to predict.
The question is: in the application designer, I use the [trainingModel] = trainRegressionModel (trainingData) function; .... and it works perfect. But I don't know if this works in the application on compiler application. The Matlab runtime motor can do it? Or need a one model pre trained?
I don't have the application compiler, and before buying it

  0 件のコメント

サインイン to comment.

製品


リリース

R2019b

2 件の回答

Kojiro Saito
Answer by Kojiro Saito on 6 Nov 2019
 Accepted Answer

MATLAB Compiler does support training regression models such as fitlm or other regression functions in Statistics and Machine Learning Toolbox and trainNetwork which trains deep neural network regression model in Deep Learing Toolbox. Here is a list of toolboxes which are supported by MATLAB Compiler.
As the list says, UIs are not supported. That means we cannot compile the code which call Regression Leaner App. But MATLAB functions which were exported from Regression Learner App can be compiled.
Before purchasing MATLAB Compiler, you can try a trial license from the following link. It's better to confirm you can achieve your goal.

  3 件のコメント

Thanks.
Today i could test the Matlab Compiler and the application in runtime works, but the time for get solution is to much. when i run de application in app designer, y get the result in 15 minutes, but y runtime i had to wait 2 horus!!!.
know i think that to create the model into the runtime is not a good idea. maybe is better carge a model pre trayned before. how i can call the model ("traiendModel" from ensamble Bagged trees) into app desinger?, and then, how i can call de model from runtime?.
thanks again.
It's better to use mat file. After export trainedModel into workspace, you can save it to mat file.
save trainedModel
Then, trainedModel.mat file will be created.
In your App Designer codes, you can load it by the following.
load('trainedModel.mat')
And, when standalone application is created from MATLAB Compiler, this mat file will be added to execution file automatically.

サインイン to comment.


Answer by robin thomas 9 minutes ago

I am getting the below error in matlab command line;
function ypred = mypredict(tbl)
Error: Function definition not supported in this context. Create functions in code file.
what is 'tbl'?

  0 件のコメント

サインイン to comment.



Translated by