Can I use TreeBagger (regression) with five outputs
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Majd
am 28 Jul. 2021
Bearbeitet: Sahil Jain
am 12 Aug. 2021
I have data consists of 2 input variables and 5 output variables both inputs and outputs has 65 rows. I need to use Random Forest (TreeBagger-regression) but I got error since I have multiple outputs. Any one has any recommendations. Thanks.
0 Kommentare
Akzeptierte Antwort
Sahil Jain
am 12 Aug. 2021
Bearbeitet: Sahil Jain
am 12 Aug. 2021
Hi. "TreeBagger" currently does not support multiple outputs. As a workaround, a different random forest can be made for each output variable using the following code:
% Input/Predictor
X = rand(65,2);
% Output/Response
Y = rand(65,5);
% Create bag of decision trees of all output
numTrees = 10;
B1 = TreeBagger(numTrees,X,Y(:,1));
B2 = TreeBagger(numTrees,X,Y(:,2));
B3 = TreeBagger(numTrees,X,Y(:,3));
B4 = TreeBagger(numTrees,X,Y(:,4));
B5 = TreeBagger(numTrees,X,Y(:,5));
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Regression Tree Ensembles finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!