From be5c7e83fe2702cc65d94ef513c2dca3d43d85b0 Mon Sep 17 00:00:00 2001 From: Pub Date: Wed, 3 Jun 2020 09:32:01 -0700 Subject: [PATCH] Update MVRFdo.m --- MVRFdo.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MVRFdo.m b/MVRFdo.m index a1ac3bf..ef99598 100644 --- a/MVRFdo.m +++ b/MVRFdo.m @@ -31,9 +31,10 @@ % the way the data is treated would be more clear. Note that % by playing with Xlen and by giving the desired portion of the input sample data % you can control the length of train and test sets. - fprintf("predicting error %d\n",i); + fprintf("training model for error %d\n",i); Mreg = TreeBagger(20,Xtrain_rf,Ytrain_rf(:,i),'NumPredictorsToSample', 400, 'MinLeafSize',60,'Method','regression'); - Ypred_i = predict(Mreg,Xtest_rf); + % training for error i finished. it is possible to train all 500 models first (1 for each error) and then infer after the loop. + Ypred_i = predict(Mreg,Xtest_rf); Ypred_rf(:,i)=Ypred_i; end