Sunteți pe pagina 1din 3

Random forest uses ensemble approach which combines a series of k

learned models (or base classifiers), M1, M2, : : : , Mk, with the aim of
creating an improved composite classification model, say M*
A given dataset, D, is used to create k training sets, D1, D2, : : : , Dk where
Di (1 i k -1) is used to generate classifier Mi. Given a new data tuple to
classify, the base classifiers each vote
by returning a class prediction
Votes of base classifiers are used by the ensemble to return the class
prediction

Rationale behind using Random Forest The combination of learning models


increases classification accuracy (bagging). The main idea of bagging is to
average noisy and unbiased models to create a model with low variance i.e.

Increasing classifier accuracy: Ensemble methods generate a set of


classification models,
M1, M2, : : : , Mk. Given a new data tuple to classify, each classifier votes
for the class label
of that tuple. The ensemble combines the votes to return a class prediction

Decision

boundary by (a) a single decision tree and (b) an ensemble of


decision trees for a
linearly separable problem (i.e., where the actual decision boundary is a
straight line). The
decision tree struggles with approximating a linear boundary. The decision
boundary of the
ensemble is closer to the true boundary
Source:

Random Forest algorithm works as a large collection of De-correlated


decision treesthe word forest signifies lots of decision trees and use them
for classification.

Say there is a matrix S of training samples, used to create classification fA1


fBA.fNA be the entries in each row while fA1 fA2fAn be the entries in each
column; A1 signifies feature A of 1st sample, and similarly BN signifies feature
B of Nth sample, also let C1 C2CN be another column having training class
with lots of features. Te aim is to use random forest to classify here. From the
sample set we create a lot of subsets with lot of random values, say instead
of taking all values from S we make S1 having values fA12 FA15. fA35 in a
column; we do this for all the columns and hence automatically for rows as
well, with these values we can create decision tree number 1, then with
another similar S2 we create DT number 2 and so on up till DT number m
with M sample. Overall we have lots of DTs which gives us different variations
of the main classification data, we can now use the different DTs to rank
different classifiers. Let us consider 4 decision trees out of m that we
considered and see how do we do class prediction. Our forest now has 4
Decision trees, now if we have a new element x to classify we will ask DT1,
DT2,DT3 and DT4 as if what is the prediction? Say the answers came out to
be Class 1, Class 3, Class1, Class 2 respectively. So now we have 4 decision
trees created using sub sample of the entire data set, and now we can
account for the number of votes for each class, the max votes in our case are
for Class 1 and so the new element x now belongs to class 1.

S-ar putea să vă placă și