필터 지우기
필터 지우기

How work app compiler with train regression model

조회 수: 1 (최근 30일)
Juan Carlos Pozuelos Buezo
Juan Carlos Pozuelos Buezo 2019년 11월 6일
편집: Kojiro Saito 2019년 12월 16일
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

채택된 답변

Kojiro Saito
Kojiro Saito 2019년 11월 6일
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
Kojiro Saito
Kojiro Saito 2019년 11월 6일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

robin thomas
robin thomas 2019년 12월 10일
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'?
  댓글 수: 1
Kojiro Saito
Kojiro Saito 2019년 12월 16일
편집: Kojiro Saito 2019년 12월 16일
You need to create a file (.m) for defining functions. In your case, create mypredict.m and paste your function codes into the file. I suppose the input argument "tbl" would be table data.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Support Vector Machine Regression에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by