How can I create a standalone application using my model from Regression Learner?
조회 수: 1 (최근 30일)
이전 댓글 표시
I have created a model using the Regression Learner on Matlab and am using the GPR algorithm, I wanted to create a standalone application to predict load consumption using this model, so used the help button and it said to use this function:
function ypred = mypredict(tbl)
%#function fitrgp
load('mymodel.mat');
ypred = trainedModel.predictFcn(tbl);
end
I used this and it said that I need to specify variables to load from the file, so I changed it to:
function ypred = mypredict(tbl)
%#function fitrgp
trainedModel= load('mymodel.mat');
ypred = trainedModel.predictFcn(tbl);
end
However, now it says that I do not have enough input arguments for the
ypred= trainedModel.predictFcn(tbl)
line.
Does anyone know what I have done wrong?
Thanks!
댓글 수: 0
답변 (1개)
Sean de Wolski
2021년 5월 2일
You need to get the data into the compiled app. Typically with compiling to an executable this would be by passing in a file name and having it read the file into a table and then write the results back to a file. Alternatively, you could put a simple user interface around it with a UI table.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Gaussian Process Regression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!