How to predict from exported regression Learner

1 回表示 (過去 30 日間)
Match
Match 2018 年 3 月 2 日
回答済み: Rohan Amarapurkar 2019 年 3 月 28 日
Hello, I am using the regression learner to train some data. But after exporting my model and want to predict from new data using the command:
yfit = test3.predictFcn(T):
where T is define as:
T={'200','123','240','50','17','0.2','2000','1900','250','180'}
I receive the following error message
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);
Can you help me, I am relattively new to his

回答 (1 件)

Rohan Amarapurkar
Rohan Amarapurkar 2019 年 3 月 28 日
Check whether the size of T matches that of the training data or not.
I think this could also be an indexing error as T is a cell. Try using T as a vector instead.

カテゴリ

Help Center および File ExchangeGaussian Process Regression についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by