SlideShare a Scribd company logo
1 of 13
Download to read offline
Random Forest
Subject: Machine Learning
Dr. Varun Kumar
Subject: Machine LearningDr. Varun Kumar Lecture 8 1 / 13
Outlines
1 Introduction
2 Why Random Forest ?
3 What is Random Forest ?
4 Random Forest Example
5 How Random Forest Works ?
6 References
Subject: Machine LearningDr. Varun Kumar Lecture 8 2 / 13
Introduction
Supervised machine learning
1 Regression
Linear regression
Logistic regression
2 Classification: It is process for dividing a data sets into a different
categories or groups by adding label.
Decision tree
Naive Bayes
Random forest
K nearest neighbor (KNN)
Subject: Machine LearningDr. Varun Kumar Lecture 8 3 / 13
Random Forest
⇒ Random forest is an ensemble classifier made using decision tree
models.
⇒ Ensemble model combines the results from different models.
⇒ Combination of multiple decision tree.
Subject: Machine LearningDr. Varun Kumar Lecture 8 4 / 13
Continued–
Subject: Machine LearningDr. Varun Kumar Lecture 8 5 / 13
Why random forest ?
Use case- Credit risk detection
Subject: Machine LearningDr. Varun Kumar Lecture 8 6 / 13
Continued–
1 To minimize the loss (Bank need a decision rule to predict for giving
an approval to the loan.)
2 An applicant demographic (income, debit/credit history and
socio-economic profiles are considered.)
3 Data science based assistance tool (Helps for modeling the behavioral
patterns of individual customer)
Variable Measurements
Marital status Married or unmarried
Gender Male or female
Age Varried
Status Default or not
Time of payment Varried
Employment Employed or un-employed
Home ownership With home or without home
Education level Secondary above or below
Subject: Machine LearningDr. Varun Kumar Lecture 8 7 / 13
What is random forest ?
⇒ Random forest is versatile algorithm and capable with
Regression
Classification
⇒ It is a type of ensemble learning method.
⇒ Commonly used predictive modeling and machine learning techniques.
Subject: Machine LearningDr. Varun Kumar Lecture 8 8 / 13
Random forest algorithm
T: Number of features
D: Number of trees to be constructed
Subject: Machine LearningDr. Varun Kumar Lecture 8 9 / 13
How random forest works
Days Outlook Humidity Wind Play
01 Sunny High Weak No
02 Sunny High Strong No
03 Overcast High Weak Yes
04 Rain High Weak Yes
05 Rain Normal Weak Yes
06 Rain Normal Strong No
07 Overcast Normal Strong Yes
08 Sunny High Weak No
09 Sunny Normal Weak Yes
10 Rain Normal Weak Yes
11 Sunny Normal Strong Yes
12 Overcast High Strong Yes
13 Overcast Normal Weak Yes
14 Rain High Strong ‘ No
Subject: Machine LearningDr. Varun Kumar Lecture 8 10 / 13
Continued–
Subject: Machine LearningDr. Varun Kumar Lecture 8 11 / 13
Features of random forest
1 Most accurate learning algorithm
2 Works well for both classification and regression problem.
3 Runs efficiently on large data base
4 Requires almost no input preparation
5 Performs implicit features selection
6 Can be easily grown in parallel
7 Methods for balancing error in unbalanced data set.
Important steps
⇒ Data acquisition
⇒ Divide data set → (1) Training data set (2) Testing data set
⇒ Implement model
⇒ Visualize
⇒ Model validation
Subject: Machine LearningDr. Varun Kumar Lecture 8 12 / 13
References
E. Alpaydin, Introduction to machine learning. MIT press, 2020.
T. M. Mitchell, The discipline of machine learning. Carnegie Mellon University,
School of Computer Science, Machine Learning , 2006, vol. 9.
J. Grus, Data science from scratch: first principles with python. O’Reilly Media,
2019.
Subject: Machine LearningDr. Varun Kumar Lecture 8 13 / 13

More Related Content

More from VARUN KUMAR

Distributed rc Model
Distributed rc ModelDistributed rc Model
Distributed rc ModelVARUN KUMAR
 
Electrical Wire Model
Electrical Wire ModelElectrical Wire Model
Electrical Wire ModelVARUN KUMAR
 
Interconnect Parameter in Digital VLSI Design
Interconnect Parameter in Digital VLSI DesignInterconnect Parameter in Digital VLSI Design
Interconnect Parameter in Digital VLSI DesignVARUN KUMAR
 
Introduction to Digital VLSI Design
Introduction to Digital VLSI DesignIntroduction to Digital VLSI Design
Introduction to Digital VLSI DesignVARUN KUMAR
 
Challenges of Massive MIMO System
Challenges of Massive MIMO SystemChallenges of Massive MIMO System
Challenges of Massive MIMO SystemVARUN KUMAR
 
E-democracy or Digital Democracy
E-democracy or Digital DemocracyE-democracy or Digital Democracy
E-democracy or Digital DemocracyVARUN KUMAR
 
Ethics of Parasitic Computing
Ethics of Parasitic ComputingEthics of Parasitic Computing
Ethics of Parasitic ComputingVARUN KUMAR
 
Action Lines of Geneva Plan of Action
Action Lines of Geneva Plan of ActionAction Lines of Geneva Plan of Action
Action Lines of Geneva Plan of ActionVARUN KUMAR
 
Geneva Plan of Action
Geneva Plan of ActionGeneva Plan of Action
Geneva Plan of ActionVARUN KUMAR
 
Fair Use in the Electronic Age
Fair Use in the Electronic AgeFair Use in the Electronic Age
Fair Use in the Electronic AgeVARUN KUMAR
 
Software as a Property
Software as a PropertySoftware as a Property
Software as a PropertyVARUN KUMAR
 
Orthogonal Polynomial
Orthogonal PolynomialOrthogonal Polynomial
Orthogonal PolynomialVARUN KUMAR
 
Patent Protection
Patent ProtectionPatent Protection
Patent ProtectionVARUN KUMAR
 
Copyright Vs Patent and Trade Secrecy Law
Copyright Vs Patent and Trade Secrecy LawCopyright Vs Patent and Trade Secrecy Law
Copyright Vs Patent and Trade Secrecy LawVARUN KUMAR
 
Property Right and Software
Property Right and SoftwareProperty Right and Software
Property Right and SoftwareVARUN KUMAR
 
Investigating Data Trials
Investigating Data TrialsInvestigating Data Trials
Investigating Data TrialsVARUN KUMAR
 
Gaussian Numerical Integration
Gaussian Numerical IntegrationGaussian Numerical Integration
Gaussian Numerical IntegrationVARUN KUMAR
 
Censorship and Controversy
Censorship and ControversyCensorship and Controversy
Censorship and ControversyVARUN KUMAR
 
Romberg's Integration
Romberg's IntegrationRomberg's Integration
Romberg's IntegrationVARUN KUMAR
 
Introduction to Censorship
Introduction to Censorship Introduction to Censorship
Introduction to Censorship VARUN KUMAR
 

More from VARUN KUMAR (20)

Distributed rc Model
Distributed rc ModelDistributed rc Model
Distributed rc Model
 
Electrical Wire Model
Electrical Wire ModelElectrical Wire Model
Electrical Wire Model
 
Interconnect Parameter in Digital VLSI Design
Interconnect Parameter in Digital VLSI DesignInterconnect Parameter in Digital VLSI Design
Interconnect Parameter in Digital VLSI Design
 
Introduction to Digital VLSI Design
Introduction to Digital VLSI DesignIntroduction to Digital VLSI Design
Introduction to Digital VLSI Design
 
Challenges of Massive MIMO System
Challenges of Massive MIMO SystemChallenges of Massive MIMO System
Challenges of Massive MIMO System
 
E-democracy or Digital Democracy
E-democracy or Digital DemocracyE-democracy or Digital Democracy
E-democracy or Digital Democracy
 
Ethics of Parasitic Computing
Ethics of Parasitic ComputingEthics of Parasitic Computing
Ethics of Parasitic Computing
 
Action Lines of Geneva Plan of Action
Action Lines of Geneva Plan of ActionAction Lines of Geneva Plan of Action
Action Lines of Geneva Plan of Action
 
Geneva Plan of Action
Geneva Plan of ActionGeneva Plan of Action
Geneva Plan of Action
 
Fair Use in the Electronic Age
Fair Use in the Electronic AgeFair Use in the Electronic Age
Fair Use in the Electronic Age
 
Software as a Property
Software as a PropertySoftware as a Property
Software as a Property
 
Orthogonal Polynomial
Orthogonal PolynomialOrthogonal Polynomial
Orthogonal Polynomial
 
Patent Protection
Patent ProtectionPatent Protection
Patent Protection
 
Copyright Vs Patent and Trade Secrecy Law
Copyright Vs Patent and Trade Secrecy LawCopyright Vs Patent and Trade Secrecy Law
Copyright Vs Patent and Trade Secrecy Law
 
Property Right and Software
Property Right and SoftwareProperty Right and Software
Property Right and Software
 
Investigating Data Trials
Investigating Data TrialsInvestigating Data Trials
Investigating Data Trials
 
Gaussian Numerical Integration
Gaussian Numerical IntegrationGaussian Numerical Integration
Gaussian Numerical Integration
 
Censorship and Controversy
Censorship and ControversyCensorship and Controversy
Censorship and Controversy
 
Romberg's Integration
Romberg's IntegrationRomberg's Integration
Romberg's Integration
 
Introduction to Censorship
Introduction to Censorship Introduction to Censorship
Introduction to Censorship
 

Recently uploaded

Online crime reporting system project.pdf
Online crime reporting system project.pdfOnline crime reporting system project.pdf
Online crime reporting system project.pdfKamal Acharya
 
Introduction to Arduino Programming: Features of Arduino
Introduction to Arduino Programming: Features of ArduinoIntroduction to Arduino Programming: Features of Arduino
Introduction to Arduino Programming: Features of ArduinoAbhimanyu Sangale
 
Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualBalamuruganV28
 
Interfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfInterfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfragupathi90
 
Multivibrator and its types defination and usges.pptx
Multivibrator and its types defination and usges.pptxMultivibrator and its types defination and usges.pptx
Multivibrator and its types defination and usges.pptxalijaker017
 
Fabrication Of Automatic Star Delta Starter Using Relay And GSM Module By Utk...
Fabrication Of Automatic Star Delta Starter Using Relay And GSM Module By Utk...Fabrication Of Automatic Star Delta Starter Using Relay And GSM Module By Utk...
Fabrication Of Automatic Star Delta Starter Using Relay And GSM Module By Utk...ShivamTiwari995432
 
Microkernel in Operating System | Operating System
Microkernel in Operating System | Operating SystemMicrokernel in Operating System | Operating System
Microkernel in Operating System | Operating SystemSampad Kar
 
Geometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfGeometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfJNTUA
 
Supermarket billing system project report..pdf
Supermarket billing system project report..pdfSupermarket billing system project report..pdf
Supermarket billing system project report..pdfKamal Acharya
 
Theory for How to calculation capacitor bank
Theory for How to calculation capacitor bankTheory for How to calculation capacitor bank
Theory for How to calculation capacitor banktawat puangthong
 
Low rpm Generator for efficient energy harnessing from a two stage wind turbine
Low rpm Generator for efficient energy harnessing from a two stage wind turbineLow rpm Generator for efficient energy harnessing from a two stage wind turbine
Low rpm Generator for efficient energy harnessing from a two stage wind turbineAftabkhan575376
 
Vip ℂall Girls Karkardooma Phone No 9999965857 High Profile ℂall Girl Delhi N...
Vip ℂall Girls Karkardooma Phone No 9999965857 High Profile ℂall Girl Delhi N...Vip ℂall Girls Karkardooma Phone No 9999965857 High Profile ℂall Girl Delhi N...
Vip ℂall Girls Karkardooma Phone No 9999965857 High Profile ℂall Girl Delhi N...jiyav969
 
BORESCOPE INSPECTION for engins CFM56.pdf
BORESCOPE INSPECTION for engins CFM56.pdfBORESCOPE INSPECTION for engins CFM56.pdf
BORESCOPE INSPECTION for engins CFM56.pdfomarzaboub1997
 
Electrical shop management system project report.pdf
Electrical shop management system project report.pdfElectrical shop management system project report.pdf
Electrical shop management system project report.pdfKamal Acharya
 
analog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxanalog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxKarpagam Institute of Teechnology
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdfAlexander Litvinenko
 
Insurance management system project report.pdf
Insurance management system project report.pdfInsurance management system project report.pdf
Insurance management system project report.pdfKamal Acharya
 
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...Nitin Sonavane
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfJNTUA
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..MaherOthman7
 

Recently uploaded (20)

Online crime reporting system project.pdf
Online crime reporting system project.pdfOnline crime reporting system project.pdf
Online crime reporting system project.pdf
 
Introduction to Arduino Programming: Features of Arduino
Introduction to Arduino Programming: Features of ArduinoIntroduction to Arduino Programming: Features of Arduino
Introduction to Arduino Programming: Features of Arduino
 
Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manual
 
Interfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfInterfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdf
 
Multivibrator and its types defination and usges.pptx
Multivibrator and its types defination and usges.pptxMultivibrator and its types defination and usges.pptx
Multivibrator and its types defination and usges.pptx
 
Fabrication Of Automatic Star Delta Starter Using Relay And GSM Module By Utk...
Fabrication Of Automatic Star Delta Starter Using Relay And GSM Module By Utk...Fabrication Of Automatic Star Delta Starter Using Relay And GSM Module By Utk...
Fabrication Of Automatic Star Delta Starter Using Relay And GSM Module By Utk...
 
Microkernel in Operating System | Operating System
Microkernel in Operating System | Operating SystemMicrokernel in Operating System | Operating System
Microkernel in Operating System | Operating System
 
Geometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfGeometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdf
 
Supermarket billing system project report..pdf
Supermarket billing system project report..pdfSupermarket billing system project report..pdf
Supermarket billing system project report..pdf
 
Theory for How to calculation capacitor bank
Theory for How to calculation capacitor bankTheory for How to calculation capacitor bank
Theory for How to calculation capacitor bank
 
Low rpm Generator for efficient energy harnessing from a two stage wind turbine
Low rpm Generator for efficient energy harnessing from a two stage wind turbineLow rpm Generator for efficient energy harnessing from a two stage wind turbine
Low rpm Generator for efficient energy harnessing from a two stage wind turbine
 
Vip ℂall Girls Karkardooma Phone No 9999965857 High Profile ℂall Girl Delhi N...
Vip ℂall Girls Karkardooma Phone No 9999965857 High Profile ℂall Girl Delhi N...Vip ℂall Girls Karkardooma Phone No 9999965857 High Profile ℂall Girl Delhi N...
Vip ℂall Girls Karkardooma Phone No 9999965857 High Profile ℂall Girl Delhi N...
 
BORESCOPE INSPECTION for engins CFM56.pdf
BORESCOPE INSPECTION for engins CFM56.pdfBORESCOPE INSPECTION for engins CFM56.pdf
BORESCOPE INSPECTION for engins CFM56.pdf
 
Electrical shop management system project report.pdf
Electrical shop management system project report.pdfElectrical shop management system project report.pdf
Electrical shop management system project report.pdf
 
analog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxanalog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptx
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
 
Insurance management system project report.pdf
Insurance management system project report.pdfInsurance management system project report.pdf
Insurance management system project report.pdf
 
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdf
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
 

Random forest (Machine learning)

  • 1. Random Forest Subject: Machine Learning Dr. Varun Kumar Subject: Machine LearningDr. Varun Kumar Lecture 8 1 / 13
  • 2. Outlines 1 Introduction 2 Why Random Forest ? 3 What is Random Forest ? 4 Random Forest Example 5 How Random Forest Works ? 6 References Subject: Machine LearningDr. Varun Kumar Lecture 8 2 / 13
  • 3. Introduction Supervised machine learning 1 Regression Linear regression Logistic regression 2 Classification: It is process for dividing a data sets into a different categories or groups by adding label. Decision tree Naive Bayes Random forest K nearest neighbor (KNN) Subject: Machine LearningDr. Varun Kumar Lecture 8 3 / 13
  • 4. Random Forest ⇒ Random forest is an ensemble classifier made using decision tree models. ⇒ Ensemble model combines the results from different models. ⇒ Combination of multiple decision tree. Subject: Machine LearningDr. Varun Kumar Lecture 8 4 / 13
  • 5. Continued– Subject: Machine LearningDr. Varun Kumar Lecture 8 5 / 13
  • 6. Why random forest ? Use case- Credit risk detection Subject: Machine LearningDr. Varun Kumar Lecture 8 6 / 13
  • 7. Continued– 1 To minimize the loss (Bank need a decision rule to predict for giving an approval to the loan.) 2 An applicant demographic (income, debit/credit history and socio-economic profiles are considered.) 3 Data science based assistance tool (Helps for modeling the behavioral patterns of individual customer) Variable Measurements Marital status Married or unmarried Gender Male or female Age Varried Status Default or not Time of payment Varried Employment Employed or un-employed Home ownership With home or without home Education level Secondary above or below Subject: Machine LearningDr. Varun Kumar Lecture 8 7 / 13
  • 8. What is random forest ? ⇒ Random forest is versatile algorithm and capable with Regression Classification ⇒ It is a type of ensemble learning method. ⇒ Commonly used predictive modeling and machine learning techniques. Subject: Machine LearningDr. Varun Kumar Lecture 8 8 / 13
  • 9. Random forest algorithm T: Number of features D: Number of trees to be constructed Subject: Machine LearningDr. Varun Kumar Lecture 8 9 / 13
  • 10. How random forest works Days Outlook Humidity Wind Play 01 Sunny High Weak No 02 Sunny High Strong No 03 Overcast High Weak Yes 04 Rain High Weak Yes 05 Rain Normal Weak Yes 06 Rain Normal Strong No 07 Overcast Normal Strong Yes 08 Sunny High Weak No 09 Sunny Normal Weak Yes 10 Rain Normal Weak Yes 11 Sunny Normal Strong Yes 12 Overcast High Strong Yes 13 Overcast Normal Weak Yes 14 Rain High Strong ‘ No Subject: Machine LearningDr. Varun Kumar Lecture 8 10 / 13
  • 11. Continued– Subject: Machine LearningDr. Varun Kumar Lecture 8 11 / 13
  • 12. Features of random forest 1 Most accurate learning algorithm 2 Works well for both classification and regression problem. 3 Runs efficiently on large data base 4 Requires almost no input preparation 5 Performs implicit features selection 6 Can be easily grown in parallel 7 Methods for balancing error in unbalanced data set. Important steps ⇒ Data acquisition ⇒ Divide data set → (1) Training data set (2) Testing data set ⇒ Implement model ⇒ Visualize ⇒ Model validation Subject: Machine LearningDr. Varun Kumar Lecture 8 12 / 13
  • 13. References E. Alpaydin, Introduction to machine learning. MIT press, 2020. T. M. Mitchell, The discipline of machine learning. Carnegie Mellon University, School of Computer Science, Machine Learning , 2006, vol. 9. J. Grus, Data science from scratch: first principles with python. O’Reilly Media, 2019. Subject: Machine LearningDr. Varun Kumar Lecture 8 13 / 13