How to set multiple output in fitrnet function?
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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
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?
Réponses (0)
Voir également
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!