Skip to content

Commit

Permalink
Update MVRFdo.m
Browse files Browse the repository at this point in the history
  • Loading branch information
SayBender committed Jun 3, 2020
1 parent 8da0e94 commit be5c7e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions MVRFdo.m
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit be5c7e8

Please sign in to comment.