-->

Thursday, March 22, 2018

Random forests or random decision forests are an ensemble learning method for classification, regression and other tasks, that operate by constructing a multitude of decision trees at training time and outputting the class that is the mode of the classes (classification) or mean prediction (regression) of the individual trees. Random decision forests correct for decision trees' habit of overfitting to their training set.

The first algorithm for random decision forests was created by Tin Kam Ho using the random subspace method, which, in Ho's formulation, is a way to implement the "stochastic discrimination" approach to classification proposed by Eugene Kleinberg.

An extension of the algorithm was developed by Leo Breiman and Adele Cutler, and "Random Forests" is their trademark. The extension combines Breiman's "bagging" idea and random selection of features, introduced first by Ho and later independently by Amit and Geman in order to construct a collection of decision trees with controlled variance.

History




StatQuest: Random Forests Part 2: Missing data and clustering - Last time we talked about how to create, use and evaluate random forests. Now it's time to see how they can deal with missing data and how they can be used to cluster samples, even when the...

The general method of random decision forests was first proposed by Ho in 1995, who established that forests of trees splitting with oblique hyperplanes, if randomly restricted to be sensitive to only selected feature dimensions, can gain accuracy as they grow without suffering from overtraining. A subsequent work along the same lines concluded that other splitting methods, as long as they are randomly forced to be insensitive to some feature dimensions, behave similarly. Note that this observation of a more complex classifier (a larger forest) getting more accurate nearly monotonically is in sharp contrast to the common belief that the complexity of a classifier can only grow to a certain level of accuracy before being hurt by overfitting. The explanation of the forest method's resistance to overtraining can be found in Kleinberg's theory of stochastic discrimination.

The early development of Breiman's notion of random forests was influenced by the work of Amit and Geman who introduced the idea of searching over a random subset of the available decisions when splitting a node, in the context of growing a single tree. The idea of random subspace selection from Ho was also influential in the design of random forests. In this method a forest of trees is grown, and variation among the trees is introduced by projecting the training data into a randomly chosen subspace before fitting each tree or each node. Finally, the idea of randomized node optimization, where the decision at each node is selected by a randomized procedure, rather than a deterministic optimization was first introduced by Dietterich.

The introduction of random forests proper was first made in a paper by Leo Breiman. This paper describes a method of building a forest of uncorrelated trees using a CART like procedure, combined with randomized node optimization and bagging. In addition, this paper combines several ingredients, some previously known and some novel, which form the basis of the modern practice of random forests, in particular:

  1. Using out-of-bag error as an estimate of the generalization error.
  2. Measuring variable importance through permutation.

The report also offers the first theoretical result for random forests in the form of a bound on the generalization error which depends on the strength of the trees in the forest and their correlation.

Algorithm


Dinsdale et al. Supplemental Material
Dinsdale et al. Supplemental Material. Source : dinsdalelab.sdsu.edu

Preliminaries: decision tree learning

Decision trees are a popular method for various machine learning tasks. Tree learning "come[s] closest to meeting the requirements for serving as an off-the-shelf procedure for data mining", say Hastie et al., "because it is invariant under scaling and various other transformations of feature values, is robust to inclusion of irrelevant features, and produces inspectable models. However, they are seldom accurate".

In particular, trees that are grown very deep tend to learn highly irregular patterns: they overfit their training sets, i.e. have low bias, but very high variance. Random forests are a way of averaging multiple deep decision trees, trained on different parts of the same training set, with the goal of reducing the variance. This comes at the expense of a small increase in the bias and some loss of interpretability, but generally greatly boosts the performance in the final model.

Tree bagging

The training algorithm for random forests applies the general technique of bootstrap aggregating, or bagging, to tree learners. Given a training set X = x1, ..., xn with responses Y = y1, ..., yn, bagging repeatedly (B times) selects a random sample with replacement of the training set and fits trees to these samples:

For b = 1, ..., B:
  1. Sample, with replacement, n training examples from X, Y; call these Xb, Yb.
  2. Train a classification or regression tree fb on Xb, Yb.

After training, predictions for unseen samples x' can be made by averaging the predictions from all the individual regression trees on x':

f ^ = 1 B âˆ' b = 1 B f b ( x ′ ) {\displaystyle {\hat {f}}={\frac {1}{B}}\sum _{b=1}^{B}f_{b}(x')}

or by taking the majority vote in the case of classification trees.

This bootstrapping procedure leads to better model performance because it decreases the variance of the model, without increasing the bias. This means that while the predictions of a single tree are highly sensitive to noise in its training set, the average of many trees is not, as long as the trees are not correlated. Simply training many trees on a single training set would give strongly correlated trees (or even the same tree many times, if the training algorithm is deterministic); bootstrap sampling is a way of de-correlating the trees by showing them different training sets.

Additionally, an estimate of the uncertainty of the prediction can be made as the standard deviation of the predictions from all the individual regression trees on x':

σ = âˆ' b = 1 B ( f b ( x ′ ) âˆ' f ^ ) 2 B âˆ' 1 . {\displaystyle \sigma ={\sqrt {\frac {\sum _{b=1}^{B}(f_{b}(x')-{\hat {f}})^{2}}{B-1}}}.}

The number of samples/trees, B, is a free parameter. Typically, a few hundred to several thousand trees are used, depending on the size and nature of the training set. An optimal number of trees B can be found using cross-validation, or by observing the out-of-bag error: the mean prediction error on each training sample xáµ¢, using only the trees that did not have xáµ¢ in their bootstrap sample. The training and test error tend to level off after some number of trees have been fit.

From bagging to random forests

The above procedure describes the original bagging algorithm for trees. Random forests differ in only one way from this general scheme: they use a modified tree learning algorithm that selects, at each candidate split in the learning process, a random subset of the features. This process is sometimes called "feature bagging". The reason for doing this is the correlation of the trees in an ordinary bootstrap sample: if one or a few features are very strong predictors for the response variable (target output), these features will be selected in many of the B trees, causing them to become correlated. An analysis of how bagging and random subspace projection contribute to accuracy gains under different conditions is given by Ho.

Typically, for a classification problem with p features, √p (rounded down) features are used in each split. For regression problems the inventors recommend p/3 (rounded down) with a minimum node size of 5 as the default.

ExtraTrees

Adding one further step of randomization yields extremely randomized trees, or ExtraTrees. These are trained using bagging and the random subspace method, like in an ordinary random forest, but additionally the top-down splitting in the tree learner is randomized. Instead of computing the locally optimal feature/split combination (based on, e.g., information gain or the Gini impurity), for each feature under consideration, a random value is selected for the split. This value is selected from the feature's empirical range (in the tree's training set, i.e., the bootstrap sample).

Properties


Random Forest Clustering of Machine Package Configurations in ...
Random Forest Clustering of Machine Package Configurations in .... Source : erikerlandson.github.io

Variable importance

Random forests can be used to rank the importance of variables in a regression or classification problem in a natural way. The following technique was described in Breiman's original paper and is implemented in the R package randomForest.

The first step in measuring the variable importance in a data set D n = { ( X i , Y i ) } i = 1 n {\displaystyle {\mathcal {D}}_{n}=\{(X_{i},Y_{i})\}_{i=1}^{n}} is to fit a random forest to the data. During the fitting process the out-of-bag error for each data point is recorded and averaged over the forest (errors on an independent test set can be substituted if bagging is not used during training).

To measure the importance of the j {\displaystyle j} -th feature after training, the values of the j {\displaystyle j} -th feature are permuted among the training data and the out-of-bag error is again computed on this perturbed data set. The importance score for the j {\displaystyle j} -th feature is computed by averaging the difference in out-of-bag error before and after the permutation over all trees. The score is normalized by the standard deviation of these differences.

Features which produce large values for this score are ranked as more important than features which produce small values. The statistical definition of the variable importance measure was given and analyzed by Zhu et al.

This method of determining variable importance has some drawbacks. For data including categorical variables with different number of levels, random forests are biased in favor of those attributes with more levels. Methods such as partial permutations and growing unbiased trees can be used to solve the problem. If the data contain groups of correlated features of similar relevance for the output, then smaller groups are favored over larger groups.

Relationship to nearest neighbors

A relationship between random forests and the k-nearest neighbor algorithm (k-NN) was pointed out by Lin and Jeon in 2002. It turns out that both can be viewed as so-called weighted neighborhoods schemes. These are models built from a training set { ( x i , y i ) } i = 1 n {\displaystyle \{(x_{i},y_{i})\}_{i=1}^{n}} that make predictions y ^ {\displaystyle {\hat {y}}} for new points x' by looking at the "neighborhood" of the point, formalized by a weight function W:

y ^ = âˆ' i = 1 n W ( x i , x ′ ) y i . {\displaystyle {\hat {y}}=\sum _{i=1}^{n}W(x_{i},x')\,y_{i}.}

Here, W ( x i , x ′ ) {\displaystyle W(x_{i},x')} is the non-negative weight of the i'th training point relative to the new point x' in the same tree. For any particular x', the weights for points x i {\displaystyle x_{i}} must sum to one. Weight functions are given as follows:

  • In k-NN, the weights are W ( x i , x ′ ) = 1 k {\displaystyle W(x_{i},x')={\frac {1}{k}}} if xi is one of the k points closest to x', and zero otherwise.
  • In a tree, W ( x i , x ′ ) = 1 k ′ {\displaystyle W(x_{i},x')={\frac {1}{k'}}} if xi is one of the k' points in the same leaf as x', and zero otherwise.

Since a forest averages the predictions of a set of m trees with individual weight functions W j {\displaystyle W_{j}} , its predictions are

y ^ = 1 m âˆ' j = 1 m âˆ' i = 1 n W j ( x i , x ′ ) y i = âˆ' i = 1 n ( 1 m âˆ' j = 1 m W j ( x i , x ′ ) ) y i . {\displaystyle {\hat {y}}={\frac {1}{m}}\sum _{j=1}^{m}\sum _{i=1}^{n}W_{j}(x_{i},x')\,y_{i}=\sum _{i=1}^{n}\left({\frac {1}{m}}\sum _{j=1}^{m}W_{j}(x_{i},x')\right)\,y_{i}.}

This shows that the whole forest is again a weighted neighborhood scheme, with weights that average those of the individual trees. The neighbors of x' in this interpretation are the points x i {\displaystyle x_{i}} sharing the same leaf in any tree j {\displaystyle j} . In this way, the neighborhood of x' depends in a complex way on the structure of the trees, and thus on the structure of the training set. Lin and Jeon show that the shape of the neighborhood used by a random forest adapts to the local importance of each feature.

Unsupervised learning with random forests


Practical Tutorial on Random Forest and Parameter Tuning in R ...
Practical Tutorial on Random Forest and Parameter Tuning in R .... Source : www.hackerearth.com

As part of their construction, random forest predictors naturally lead to a dissimilarity measure between the observations. One can also define a random forest dissimilarity measure between unlabeled data: the idea is to construct a random forest predictor that distinguishes the “observed” data from suitably generated synthetic data. The observed data are the original unlabeled data and the synthetic data are drawn from a reference distribution. A random forest dissimilarity can be attractive because it handles mixed variable types well, is invariant to monotonic transformations of the input variables, and is robust to outlying observations. The random forest dissimilarity easily deals with a large number of semi-continuous variables due to its intrinsic variable selection; for example, the "Addcl 1" random forest dissimilarity weighs the contribution of each variable according to how dependent it is on other variables. The random forest dissimilarity has been used in a variety of applications, e.g. to find clusters of patients based on tissue marker data.

Variants


Random Forest Clustering of Machine Package Configurations in ...
Random Forest Clustering of Machine Package Configurations in .... Source : erikerlandson.github.io

Instead of decision trees, linear models have been proposed and evaluated as base estimators in random forests, in particular multinomial logistic regression and naive Bayes classifiers.

Kernel random forest


visualization | Orange Blog
visualization | Orange Blog. Source : blog.biolab.si

In machine learning, kernel random forests establish the connection between random forests and kernel methods. By slightly modifying their definition, random forests can be rewritten as kernel methods, which are more interpretable and easier to analyze.

History

Leo Breiman was the first person to notice the link between random forest and kernel methods. He pointed out that random forests which are grown using i.i.d. random vectors in the tree construction are equivalent to a kernel acting on the true margin. Lin and Jeon established the connection between random forests and adaptive nearest neighbor, implying that random forests can be seen as adaptive kernel estimates. Davies and Ghahramani proposed Random Forest Kernel and show that it can empirically outperform state-of-art kernel methods. Scornet first defined KeRF estimates and gave the explicit link between KeRF estimates and random forest. He also gave explicit expressions for kernels based on centered random forest and uniform random forest, two simplified models of random forest. He named these two KeRFs Centered KeRF and Uniform KeRF, and proved upper bounds on their rates of consistency.

Notations and definitions

Preliminaries: Centered forests

Centered forest is a simplified model for Breiman's original random forest, which uniformly selects an attribute among all attributes and performs splits at the center of the cell along the pre-chosen attribute. The algorithm stops when a fully binary tree of level k {\displaystyle k} is built, where k ∈ N {\displaystyle k\in \mathbb {N} } is a parameter of the algorithm.

Uniform forest

Uniform forest is another simplified model for Breiman's original random forest, which uniformly selects a feature among all features and performs splits at a point uniformly drawn on the side of the cell, along the preselected feature.

From random forest to KeRF

Given a training sample D n = { ( X i , Y i ) } i = 1 n {\displaystyle {\mathcal {D}}_{n}=\{(\mathbf {X} _{i},Y_{i})\}_{i=1}^{n}} of [ 0 , 1 ] p × R {\displaystyle [0,1]^{p}\times \mathbb {R} } -valued independent random variables distributed as the independent prototype pair ( X , Y ) {\displaystyle (\mathbf {X} ,Y)} , where E ⁡ [ Y 2 ] < ∞ {\displaystyle \operatorname {E} [Y^{2}]<\infty } . We aim at predicting the response Y {\displaystyle Y} , associated with the random variable X {\displaystyle \mathbf {X} } , by estimating the regression function m ( x ) = E ⁡ [ Y ∣ X = x ] {\displaystyle m(\mathbf {x} )=\operatorname {E} [Y\mid \mathbf {X} =\mathbf {x} ]} . A random regression forest is an ensemble of M {\displaystyle M} randomized regression trees. Denote m n ( x , Θ j ) {\displaystyle m_{n}(\mathbf {x} ,\mathbf {\Theta } _{j})} the predicted value at point x {\displaystyle \mathbf {x} } by the j {\displaystyle j} -th tree, where Θ 1 , … , Θ M {\displaystyle \mathbf {\Theta } _{1},\ldots ,\mathbf {\Theta } _{M}} are independent random variables, distributed as a generic random variable Θ {\displaystyle \mathbf {\Theta } } , independent of the sample D n {\displaystyle {\mathcal {D}}_{n}} . This random variable can be used to describe the randomness induced by node splitting and the sampling procedure for tree construction. The trees are combined to form the finite forest estimate m M , n ( x , Θ 1 , … , Θ M ) = 1 M âˆ' j = 1 M m n ( x , Θ j ) {\displaystyle m_{M,n}(\mathbf {x} ,\Theta _{1},\ldots ,\Theta _{M})={\frac {1}{M}}\sum _{j=1}^{M}m_{n}(\mathbf {x} ,\Theta _{j})} . For regression trees, we have m n = âˆ' i = 1 n Y i 1 X i ∈ A n ( x , Θ j ) N n ( x , Θ j ) {\displaystyle m_{n}=\sum _{i=1}^{n}{\frac {Y_{i}\mathbf {1} _{\mathbf {X} _{i}\in A_{n}(\mathbf {x} ,\Theta _{j})}}{N_{n}(\mathbf {x} ,\Theta _{j})}}} , where A n ( x , Θ j ) {\displaystyle A_{n}(\mathbf {x} ,\Theta _{j})} is the cell containing x {\displaystyle \mathbf {x} } , designed with randomness Θ j {\displaystyle \Theta _{j}} and dataset D n {\displaystyle {\mathcal {D}}_{n}} , and N n ( x , Θ j ) = âˆ' i = 1 n 1 X i ∈ A n ( x , Θ j ) {\displaystyle N_{n}(\mathbf {x} ,\Theta _{j})=\sum _{i=1}^{n}\mathbf {1} _{\mathbf {X} _{i}\in A_{n}(\mathbf {x} ,\Theta _{j})}} .

Thus random forest estimates satisfy, for all x ∈ [ 0 , 1 ] d {\displaystyle \mathbf {x} \in [0,1]^{d}} , m M , n ( x , Θ 1 , … , Θ M ) = 1 M âˆ' j = 1 M ( âˆ' i = 1 n Y i 1 X i ∈ A n ( x , Θ j ) N n ( x , Θ j ) ) {\displaystyle m_{M,n}(\mathbf {x} ,\Theta _{1},\ldots ,\Theta _{M})={\frac {1}{M}}\sum _{j=1}^{M}\left(\sum _{i=1}^{n}{\frac {Y_{i}\mathbf {1} _{\mathbf {X} _{i}\in A_{n}(\mathbf {x} ,\Theta _{j})}}{N_{n}(\mathbf {x} ,\Theta _{j})}}\right)} . Random regression forest has two level of averaging, first over the samples in the target cell of a tree, then over all trees. Thus the contributions of observations that are in cells with a high density of data points are smaller than that of observations which belong to less populated cells. In order to improve the random forest methods and compensate the misestimation, Scornet defined KeRF by

m ~ M , n ( x , Θ 1 , … , Θ M ) = 1 âˆ' j = 1 M N n ( x , Θ j ) âˆ' j = 1 M âˆ' i = 1 n Y i 1 X i ∈ A n ( x , Θ j ) , {\displaystyle {\tilde {m}}_{M,n}(\mathbf {x} ,\Theta _{1},\ldots ,\Theta _{M})={\frac {1}{\sum _{j=1}^{M}N_{n}(\mathbf {x} ,\Theta _{j})}}\sum _{j=1}^{M}\sum _{i=1}^{n}Y_{i}\mathbf {1} _{\mathbf {X} _{i}\in A_{n}(\mathbf {x} ,\Theta _{j})},}

which is equal to the mean of the Y i {\displaystyle Y_{i}} 's falling in the cells containing x {\displaystyle \mathbf {x} } in the forest. If we define the connection function of the M {\displaystyle M} finite forest as K M , n ( x , z ) = 1 M âˆ' j = 1 M 1 z ∈ A n ( x , Θ j ) {\displaystyle K_{M,n}(\mathbf {x} ,\mathbf {z} )={\frac {1}{M}}\sum _{j=1}^{M}\mathbf {1} _{\mathbf {z} \in A_{n}(\mathbf {x} ,\Theta _{j})}} , i.e. the proportion of cells shared between x {\displaystyle \mathbf {x} } and z {\displaystyle \mathbf {z} } , then almost surely we have m ~ M , n ( x , Θ 1 , … , Θ M ) = âˆ' i = 1 n Y i K M , n ( x , x i ) âˆ' â„" = 1 n K M , n ( x , x â„" ) {\displaystyle {\tilde {m}}_{M,n}(\mathbf {x} ,\Theta _{1},\ldots ,\Theta _{M})={\frac {\sum _{i=1}^{n}Y_{i}K_{M,n}(\mathbf {x} ,\mathbf {x} _{i})}{\sum _{\ell =1}^{n}K_{M,n}(\mathbf {x} ,\mathbf {x} _{\ell })}}} , which defines the KeRF.

Centered KeRF

The construction of Centered KeRF of level k {\displaystyle k} is the same as for centered forest, except that predictions are made by m ~ M , n ( x , Θ 1 , … , Θ M ) {\displaystyle {\tilde {m}}_{M,n}(\mathbf {x} ,\Theta _{1},\ldots ,\Theta _{M})} , the corresponding kernel function, or connection function is

K k c c ( x , z ) = âˆ' k 1 , … , k d , âˆ' j = 1 d k j = k k ! k 1 ! ⋯ k d ! ( 1 d ) k ∏ j = 1 d 1 ⌈ 2 k j x j ⌉ = ⌈ 2 k j z j ⌉ ,  for all  x , z ∈ [ 0 , 1 ] d . {\displaystyle {\begin{aligned}K_{k}^{cc}(\mathbf {x} ,\mathbf {z} )=\sum _{k_{1},\ldots ,k_{d},\sum _{j=1}^{d}k_{j}=k}&{\frac {k!}{k_{1}!\cdots k_{d}!}}\left({\frac {1}{d}}\right)^{k}\prod _{j=1}^{d}\mathbf {1} _{\lceil 2^{k_{j}}x_{j}\rceil =\lceil 2^{k_{j}}z_{j}\rceil },\\&{\text{ for all }}\mathbf {x} ,\mathbf {z} \in [0,1]^{d}.\end{aligned}}}

Uniform KeRF

Uniform KeRF is built in the same way as uniform forest, except that predictions are made by m ~ M , n ( x , Θ 1 , … , Θ M ) {\displaystyle {\tilde {m}}_{M,n}(\mathbf {x} ,\Theta _{1},\ldots ,\Theta _{M})} , the corresponding kernel function, or connection function is

K k u f ( 0 , x ) = âˆ' k 1 , … , k d , âˆ' j = 1 d k j = k k ! k 1 ! … k d ! ( 1 d ) k ∏ m = 1 d ( 1 âˆ' | x m | âˆ' j = 0 k m âˆ' 1 ( âˆ' ln ⁡ | x m | ) j j ! )  for all  x ∈ [ 0 , 1 ] d . {\displaystyle K_{k}^{uf}(\mathbf {0} ,\mathbf {x} )=\sum _{k_{1},\ldots ,k_{d},\sum _{j=1}^{d}k_{j}=k}{\frac {k!}{k_{1}!\ldots k_{d}!}}\left({\frac {1}{d}}\right)^{k}\prod _{m=1}^{d}\left(1-|x_{m}|\sum _{j=0}^{k_{m}-1}{\frac {(-\ln |x_{m}|)^{j}}{j!}}\right){\text{ for all }}\mathbf {x} \in [0,1]^{d}.}

Properties

Relation between KeRF and random forest

Predictions given by KeRF and random forests are close if the number of points in each cell is controlled:

Assume that there exist sequences ( a n ) , ( b n ) {\displaystyle (a_{n}),(b_{n})} such that, almost surely,

a n ≤ N n ( x , Θ ) ≤ b n  and  a n ≤ 1 M âˆ' m = 1 M N n x , Θ m ≤ b n . {\displaystyle a_{n}\leq N_{n}(\mathbf {x} ,\Theta )\leq b_{n}{\text{ and }}a_{n}\leq {\frac {1}{M}}\sum _{m=1}^{M}N_{n}{\mathbf {x} ,\Theta _{m}}\leq b_{n}.}

Then almost surely,

| m M , n ( x ) âˆ' m ~ M , n ( x ) | ≤ b n âˆ' a n a n m ~ M , n ( x ) . {\displaystyle |m_{M,n}(\mathbf {x} )-{\tilde {m}}_{M,n}(\mathbf {x} )|\leq {\frac {b_{n}-a_{n}}{a_{n}}}{\tilde {m}}_{M,n}(\mathbf {x} ).}

Relation between infinite KeRF and infinite random forest

When the number of trees M {\displaystyle M} goes to infinity, then we have infinite random forest and infinite KeRF. Their estimates are close if the number of observations in each cell is bounded:

Assume that there exist sequences ( ε n ) , ( a n ) , ( b n ) {\displaystyle (\varepsilon _{n}),(a_{n}),(b_{n})} such that, almost surely

  • E ⁡ [ N n ( x , Θ ) ] ≥ 1 , {\displaystyle \operatorname {E} [N_{n}(\mathbf {x} ,\Theta )]\geq 1,}
  • P ⁡ [ a n ≤ N n ( x , Θ ) ≤ b n ∣ D n ] ≥ 1 âˆ' ε n / 2 , {\displaystyle \operatorname {P} [a_{n}\leq N_{n}(\mathbf {x} ,\Theta )\leq b_{n}\mid {\mathcal {D}}_{n}]\geq 1-\varepsilon _{n}/2,}
  • P ⁡ [ a n ≤ E Θ ⁡ [ N n ( x , Θ ) ] ≤ b n ∣ D n ] ≥ 1 âˆ' ε n / 2 , {\displaystyle \operatorname {P} [a_{n}\leq \operatorname {E} _{\Theta }[N_{n}(\mathbf {x} ,\Theta )]\leq b_{n}\mid {\mathcal {D}}_{n}]\geq 1-\varepsilon _{n}/2,}

Then almost surely,

| m ∞ , n ( x âˆ' m ~ ∞ , n ( x ) | ≤ b n âˆ' a n a n m ~ ∞ , n ( x ) + n ε n ( max 1 ≤ i ≤ n Y i ) . {\displaystyle |m_{\infty ,n}(\mathbf {x} -{\tilde {m}}_{\infty ,n}(\mathbf {x} )|\leq {\frac {b_{n}-a_{n}}{a_{n}}}{\tilde {m}}_{\infty ,n}(\mathbf {x} )+n\varepsilon _{n}\left(\max _{1\leq i\leq n}Y_{i}\right).}

Consistency results

Assume that Y = m ( X ) + ε {\displaystyle Y=m(\mathbf {X} )+\varepsilon } , where ε {\displaystyle \varepsilon } is a centered Gaussian noise, independent of X {\displaystyle \mathbf {X} } , with finite variance σ 2 < ∞ {\displaystyle \sigma ^{2}<\infty } . Moreover, X {\displaystyle \mathbf {X} } is uniformly distributed on [ 0 , 1 ] d {\displaystyle [0,1]^{d}} and m {\displaystyle m} is Lipschitz. Scornet proved upper bounds on the rates of consistency for centered KeRF and uniform KeRF.

Consistency of centered KeRF

Providing k â†' ∞ {\displaystyle k\rightarrow \infty } and n / 2 k â†' ∞ {\displaystyle n/2^{k}\rightarrow \infty } , there exists a constant C 1 > 0 {\displaystyle C_{1}>0} such that, for all n {\displaystyle n} , E [ m ~ n c c ( X ) âˆ' m ( X ) ] 2 ≤ C 1 n âˆ' 1 / ( 3 + d log ⁡ 2 ) ( log ⁡ n ) 2 {\displaystyle \mathbb {E} [{\tilde {m}}_{n}^{cc}(\mathbf {X} )-m(\mathbf {X} )]^{2}\leq C_{1}n^{-1/(3+d\log 2)}(\log n)^{2}} .

Consistency of uniform KeRF

Providing k â†' ∞ {\displaystyle k\rightarrow \infty } and n / 2 k â†' ∞ {\displaystyle n/2^{k}\rightarrow \infty } , there exists a constant C > 0 {\displaystyle C>0} such that, E [ m ~ n u f ( X ) âˆ' m ( X ) ] 2 ≤ C n âˆ' 2 / ( 6 + 3 d log ⁡ 2 ) ( log ⁡ n ) 2 {\displaystyle \mathbb {E} [{\tilde {m}}_{n}^{uf}(\mathbf {X} )-m(\mathbf {X} )]^{2}\leq Cn^{-2/(6+3d\log 2)}(\log n)^{2}} .

RF in scientific works


Plotting trees from Random Forest models with ggraph | R-bloggers
Plotting trees from Random Forest models with ggraph | R-bloggers. Source : www.r-bloggers.com

The algorithm is often used in scientific works because of its advantages. For example, it can be used for quality assessment of Wikipedia articles.

Open source implementations


Machine Learning For Cancer Classification - Part 2 - Building A ...
Machine Learning For Cancer Classification - Part 2 - Building A .... Source : www.biostars.org

  • The Original RF by Breiman and Cutler written in Fortran 77.
  • ALGLIB contains a modification of the random forest in C#, C++, Pascal, VBA.
  • party Implementation based on the conditional inference trees in R.
  • randomForest for classification and regression in R.
  • Python implementation with examples in scikit-learn.
  • Orange data mining suite includes random forest learner and can visualize the trained forest.
  • Matlab implementation.
  • SQP software uses random forest algorithm to predict the quality of survey questions, depending on formal and linguistic characteristics of the question.
  • Weka RandomForest in Java library and GUI.
  • ranger A C++ implementation of random forest for classification, regression, probability and survival. Includes interface for R.

See also


Plotting trees from Random Forest models with ggraph | R-bloggers
Plotting trees from Random Forest models with ggraph | R-bloggers. Source : www.r-bloggers.com

  • Decision tree learning
  • Gradient boosting
  • Randomized algorithm
  • Ensemble learning
  • Boosting
  • Non-parametric statistics
  • Kernel random forest

References



Further reading



External links



  • Random Forests classifier description (Leo Breiman's site)
  • Liaw, Andy & Wiener, Matthew "Classification and Regression by randomForest" R News (2002) Vol. 2/3 p. 18 (Discussion of the use of the random forest package for R)


 
Sponsored Links