How to use random forest method

조회 수: 12 (최근 30일)
Kanakaiah Jakkula
Kanakaiah Jakkula 2018년 3월 2일
댓글: Jan Startek 2021년 3월 17일
Hi, Below is my training data (v1,v2,v3 are process variables, and Y is the response variable,
Based on training data, given set of new v1,v2,v3, and predict Y. I want to make prediction using "Random forest tree bag" (decisiotn tree regression) method.
Training data:
v1 v2 v3 Y
16.00 21.05 25.01 8
14.44 22.79 27.02 1
14.69 21.83 25.10 1
15.32 21.09 28.35 4
15.22 23.38 28.11 2
14.6 22.77 27.8 3
15.52 22.33 27.78 0
15.30 22.28 28.18 0
15.47 20.94 28.14 5
14.04 23.41 25.22 9
15.67 20.89 28.97 8
14.14 20.73 26.22 6
14.80 20.87 25.82 2
14.63 22.33 27.03 0
15.66 22.22 28.22 1
14.40 20.73 28.13 7
14.09 21.04 26.25 5
14.61 23.48 26.24 4
14.63 22.33 27.03 0
15.53 22.79 28.37 6
14.51 22.78 28.8 5
15.76 23.27 26.62 3
15.42 21.68 27.59 0
Make prediction for below two set of test data, what Y
test data:
v1 v2 v3
15.29 21.39 27.07
14.53 23.18 26.31

답변 (1개)

Bernhard Suhm
Bernhard Suhm 2018년 4월 2일
You could read your data into the Classification Learner app (New Session - from File), and then train a "Bagged Tree" on it (that's how we refer to random forests). However, given how small this data set is, the performance will be terrible.
  댓글 수: 3
Javaid Iqbal
Javaid Iqbal 2018년 7월 4일
Sir may you please help me regarding SVM classification. When I use predict test data I'm unable predict thr right solutions.
yfit=trainedModel.predictFcn(T);
I got result yfit=0 as predicted but when it should give yfit=1 result for tru value but this showing same yfit=0
Jan Startek
Jan Startek 2021년 3월 17일
Does Bagged Tree really use a ranfom forest algorithm ( Breiman random forest? ). My point is I don't see where in the code a random variable selection for each node in grown trees is perforemd. TreeBagger (https://se.mathworks.com/help/stats/treebagger.html#bvf7_tc-1) seems to have such an option with the use of "'NumPredictorsToSample'" however I can't find an analogus option in TreeBagger.
My question boils down to, is there a random variable selection performed at each split in the grown trees in the Bagged Trees algorithm in clasifiactionLearner?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Classification Ensembles에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by