how to solve this problem in line 163,164,167.

1 visualización (últimos 30 días)
Hujjat raza
Hujjat raza el 2 de Feb. de 2019
Comentada: Hujjat raza el 19 de Feb. de 2019
i have used an attached data set and trained the regression model using the regression learner toolbox. But when i export the model and type this two line in command window:
T=readtable('google_review_ratings');
yfit = trainedModel.predictFcn(T)
I get the following errors:
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));
the code is as follows ( its lengthy one)
EDIT: copyright code removed.
kindly provide a solution. i will be very grateful to you.
  2 comentarios
Stephen23
Stephen23 el 3 de Feb. de 2019
@Hujjat raza: please do not post copyright code on this forum.
Hujjat raza
Hujjat raza el 19 de Feb. de 2019
i am sorry Stephen, but is there a solution to it?

Iniciar sesión para comentar.

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by