How to set multiple output in fitrnet function?

6 visualizzazioni (ultimi 30 giorni)
Yijun GUO
Yijun GUO il 23 Lug 2021
Commentato: Abhinav Pandey il 13 Feb 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 Commenti
dpb
dpb il 23 Lug 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 il 13 Feb 2022
Did you find a solution for this?

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Statistics and Machine Learning Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by