How to set multiple output in fitrnet function?

6 vues (au cours des 30 derniers jours)
Yijun GUO
Yijun GUO le 23 Juil 2021
Commenté : Abhinav Pandey le 13 Fév 2022
Hello, I tried to use fitrnet cuntion in R2021a. It works well when I set only one output. But if the output data is 2D vector, error occurs. The raw code is following:
load carbig
X = [Acceleration Cylinders Displacement Horsepower Model_Year];
Y = [MPG Weight];
rng("default") % For reproducibility of the partition
c = cvpartition(length(Y),"Holdout",0.20);
trainingIdx = training(c); % Indices for the training set
XTrain = X(trainingIdx,:);
YTrain = Y(trainingIdx,:);
testIdx = test(c); % Indices for the test set
XTest = X(testIdx,:);
YTest = Y(testIdx,:);
Mdl = fitrnet(XTrain,YTrain,"Standardize",true, ...
"LayerSizes",[30 10])
I can set two output using newff function in previous version. How can I deal with it? Thanks
  2 commentaires
dpb
dpb le 23 Juil 2021
I don't have the subject TB but there's no indication in present documentation of the regression net fitrnet being anything but a single response variable model
A search of current documentation didn't find any such function as newff that would do any such thing, either.
Which release and toolbox contained the function -- you sure you weren't using something from FEX or from some other source?
Abhinav Pandey
Abhinav Pandey le 13 Fév 2022
Did you find a solution for this?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Statistics and Machine Learning Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by