Tuesday, April 21, 2020

Random Forest Algorithm






Introduction    

As the name suggest, this algorithm creates the forest with a number of trees.I would like to highlight one benefit of random forest algorithm that excites me, that it can be used for both classification and regression.

What is random forest application?

First,Random Forest Algorithm is a supervised classification algorithm.we can see it from its name,which is to create a forest by some way and make it random.there is a direct relationship between the number of the trees between forest and the  results it can get the larger number of trees,the more accurate the result.


Why Random Forest Algorithm

Over fitting is one critical and crucial problem that may make the results worse, but for Random Forest algorithm, if there are enough trees in the forest, the classifier won’t over fit the model. The third benefit is the classifier of Random Forest can handle missing values, and the last advantage is that the Random Forest classifier can be modeled for categorical values

Random forest algorithm real life examples:

Suppose Lily wants to go to different places that she may like for his two week vacation and she asks her friend for advice.Her friend will ask that where she has traveled already.Also she will ask had she enjoyed that places.based on Lily's answer her friend will give her suggestion.Here her friend form the decision tree.If Lily wants to ask more friends to get their opinion because one friend will not be enough to select verify the place.Her friends will select different places according to her experience therefore,she will fix the place of highest voted place for her visiting.This is the typical random forest algorithm approach.

Random Forest creation pseudocode:

    1.Randomly select “K” features from total “m” features where k << m
    2. Among the “K” features, calculate the node “d” using the best split point
    3.Split the node into daughter nodes using the best split
    4.Repeat the a to c steps until “l” number of nodes has been reached
    5.Build forest by repeating steps a to d for “n” number times to create “n” number of trees

This image shows the process of randomly selecting features:

In the next stage, with the random forest classifier created, we will make the prediction. The random forest prediction pseudocode is shown below:

    1.Takes the test features and use the rules of each randomly created decision tree to predict the outcome and stores the predicted outcome (target)
    2.Calculate the votes for each predicted target
    3.Consider the high voted predicted target as the final prediction from the random forest algorithm

The process is easy to understand, but it’s somehow efficient.



Random Forest Algorithm Applications:


  For the application in banking:Random Forest Algorithm is used to find loyal customers,which customers who can take out plenty of loans and pay interest to the bank properly and fund customers,which means customers who have bad records like failure to pay back a loan on time or have dangerous actions.

   For the application in medicine: random forest algorithm can be used to both identify the correct combination of components in medicine and to identify diseases by analyzing the patient's medical records.

    For the application of stock market: random forest algorithm can be used to identify a stock's behavior and the expected  loss or profit.
    For the application of e commerce: Random forest algorithm can be used for predicting whether the customer will like the recommend products based on the experience of similar customers.

Random forest algorithm is easy to understand and efficient.


 SOURCE:https://dataaspirant.com/2017/05/22/random-forest-algorithm-machine-learing/

No comments:

Post a Comment

Designing a brochure