Getting problem in exporting model from Matlab Classification App

조회 수: 6 (최근 30일)
Prachi Suryawanshi
Prachi Suryawanshi 2017년 6월 1일
댓글: jiahui cai 2020년 6월 12일
I made a model of Logistic Regression which has 4 inputs and 2 outputs '0' and '1'. I am having trouble in exporting the model to predict new data. my input is
T={67.753 67.395 67.122 67.938}
yfit = trainedModel.predictFcn(T)
and Output
exporting_model
T =
1×4 cell array
[67.7530] [67.3950] [67.1220] [67.9380]
Function 'subsindex' is not defined for values of class 'cell'.
Error in mlearnapp.internal.model.DatasetSpecification>@(t)t(:,predictorNames) (line 163)
extractPredictorsFromTableFcn = @(t) t(:,predictorNames);
Error in mlearnapp.internal.model.DatasetSpecification>@(x)extractPredictorsFromTableFcn(splitMatricesInTableFcn(x))
(line 164)
predictorExtractionFcn = @(x) extractPredictorsFromTableFcn(splitMatricesInTableFcn(x));
Error in mlearnapp.internal.model.DatasetSpecification>@(x)exportableModel.predictFcn(predictorExtractionFcn(x)) (line
167)
newExportableModel.predictFcn = @(x) exportableModel.predictFcn(predictorExtractionFcn(x));
Error in exporting_model (line 2)
yfit = trainedModel.predictFcn(T)
Please help me with it

답변 (2개)

Walter Roberson
Walter Roberson 2017년 6월 1일
T = [67.753 67.395 67.122 67.938]
  댓글 수: 1
Prachi Suryawanshi
Prachi Suryawanshi 2017년 6월 2일
No I tried it before. It is not working either. Can you give me some commands which I can use to predict new data with the model that I have exported.

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


naishi feng
naishi feng 2017년 6월 6일
have u solved ur problem?i meet the same problem too,can u help me?thank u!!!!
  댓글 수: 3
Aziz Al-Abdali
Aziz Al-Abdali 2018년 5월 1일
Sorry but what did mean by mentioning the name of the variable on the top row? can you elaborate that please? Thanks in advance

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

카테고리

Help CenterFile Exchange에서 Classification Learner App에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by