Total members 11797 |It is currently Sat Sep 21, 2019 12:36 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





In this code we show you how to run random forest algorithm classifier in MATLAB :

Code:

TreeObject
=TreeBagger(50,TrainData,class,'method ','classification','NVarToSample','all');
 


First parameter is the number of decision tree to use , TrainData is the training data vector , class is the label for each vector, method parameter is used to differ between regression and classification training. NVarToSample used to set the algorithm to "random forest" .

Now after training , how to use this object for classification :
Code:
[YFIT,scores] = predict(TreeObject,TestVector)
 

YFIT : label the high fitted class label.
scores : contain the score for each label .




Author:
Mastermind
User avatar Posts: 2707
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : random forest algorithm classifier
 Cost Sensitive Classifier Random Forest Java in weka     -  
 Weka java code for Random Forest Cross Validation     -  
 naive Bayes classifier in MATLAB     -  
 Random to File     -  
 php Random quote     -  
 php Random image     -  
 Random To File     -  
 Pick one or more random entries out of an array     -  
 Generating Random Number in java     -  
 Applet Game To Shot a Random Ball     -  



Topic Tags

Matlab Classifier






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com