Open GoogleCodeExporter opened 9 years ago
Hi Thomas
sorry for my late reply.
thanks for your helpful comment
will something like the attached m file help? you will need to use graphviz
(http://www.graphviz.org/) to visualize the tree. After installing graphviz,
file->new and paste the output. then its F5 to get something like the attached
figure.
i think the code correctly predicts the tree, though i will debug a bit more
and see if there is an error or anything.
you will be able to get per tree prediction if you look at 2nd and the 3rd
output [Y_new, votes, prediction_per_tree] = classRF_predict(X,model,
extra_options)
that way its possible to write code to know if permuting a feature increases
the error rate (aka feature importance)
please do tell me if you need more information.
Original comment by abhirana
on 23 Jul 2011 at 10:57
Attachments:
Hi Abhishek Jaiantilal
Thank you for a comprehensive answer. It was easy to install and apply when
logging the command window in MATLAB, however I had trouble plotting the tree
as vector format, even though the it's set to output as pdf.
But I got what I needed!
Thank you once again.
/Thomas
Original comment by ThomasJJ...@gmail.com
on 8 Aug 2011 at 12:44
[deleted comment]
Hello Sir,
I tried to graphically view one of the tree of RF trained with mixed data (ie.
both categorical(feature 1-10) having in total 8 categories in each features
and numerical (features 11-20)) using above given code.
And the tree obtained is classifying as features 6<=13 or feature 6>13.
Similarly for feature 8 classifying on the value 12. (the obtained tree is
attached)
the categorical feature only had values between 1-8 then why it is classifying
on the value grater than 8.
Thank You
Original comment by Shalini1...@iiitd.ac.in
on 27 Jun 2013 at 7:53
Attachments:
sorry about my reply
if possible could you post the code//data that you used
tree modeling was designed using numerical features. maybe that is the reason.
Original comment by abhirana
on 3 Jul 2013 at 11:21
Original issue reported on code.google.com by
ThomasJJ...@gmail.com
on 9 Jul 2011 at 2:00