Reader small image

You're reading from  Machine Learning with R Quick Start Guide

Product typeBook
Published inMar 2019
Reading LevelIntermediate
PublisherPackt
ISBN-139781838644338
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Iván Pastor Sanz
Iván Pastor Sanz
author image
Iván Pastor Sanz

Ivn Pastor Sanz is a lead data scientist and machine learning enthusiast with extensive experience in finance, risk management, and credit risk modeling. Ivn has always endeavored to find solutions to make banking more comprehensible, accessible, and fair. Thus, in his thesis to obtain his PhD in economics, Ivn tried to identify the origins of the 2008 financial crisis and suggest ways to avoid a similar crisis in the future.
Read more about Iván Pastor Sanz

Right arrow

Testing a random forest model

A random forest is an ensemble of decision trees. In a decision tree, the training sample, which is based on the independent variables, will be split into two or more homogeneous sets. This algorithm deals with both categorical and continuous variables. The best attribute is selected using a recursive selection method and is split to form the leaf nodes. This continues until a criterion that's meant to stop the loop is met. Every tree that's created by the expansion of leaf nodes is considered to be a weak learner. This weak learner is built on top of the rows and columns of the subsets. The higher the number of trees, the lower the variance. Both classification and regression random forests calculate the average prediction of all of the trees to make a final prediction.

When a random forest is trained, some different parameters can be set...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Machine Learning with R Quick Start Guide
Published in: Mar 2019Publisher: PacktISBN-13: 9781838644338

Author (1)

author image
Iván Pastor Sanz

Ivn Pastor Sanz is a lead data scientist and machine learning enthusiast with extensive experience in finance, risk management, and credit risk modeling. Ivn has always endeavored to find solutions to make banking more comprehensible, accessible, and fair. Thus, in his thesis to obtain his PhD in economics, Ivn tried to identify the origins of the 2008 financial crisis and suggest ways to avoid a similar crisis in the future.
Read more about Iván Pastor Sanz