How to set multiple output in fitrnet function?

6 visualizaciones (últimos 30 días)
Yijun GUO
Yijun GUO el 23 de Jul. de 2021
Comentada: Abhinav Pandey el 13 de Feb. de 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 comentarios
dpb
dpb el 23 de Jul. de 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 el 13 de Feb. de 2022
Did you find a solution for this?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Statistics and Machine Learning Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by