Skip to content

Commit 09b72da

Browse files
authored
XML documentation for FastForest binary classification. (#3399)
* XML documentation for FastForest binary classification. * PR feedback. * ws. * PR feedback. * PR feedback. * PR feedback. * PR feedback.
1 parent 4d5bf08 commit 09b72da

File tree

3 files changed

+51
-6
lines changed

3 files changed

+51
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
### Training Algorithm Details
2+
Decision trees are non-parametric models that perform a sequence of simple tests
3+
on inputs. This decision procedure maps them to outputs found in the training
4+
dataset whose inputs were similar to the instance being processed. A decision is
5+
made at each node of the binary tree data structure based on a measure of
6+
similarity that maps each instance recursively through the branches of the tree
7+
until the appropriate leaf node is reached and the output decision returned.
8+
9+
Decision trees have several advantages:
10+
* They are efficient in both computation and memory usage during training and
11+
prediction.
12+
* They can represent non-linear decision boundaries.
13+
* They perform integrated feature selection and classification.
14+
* They are resilient in the presence of noisy features.
15+
16+
Fast forest is a random forest implementation. The model consists of an ensemble
17+
of decision trees. Each tree in a decision forest outputs a Gaussian
18+
distribution by way of prediction. An aggregation is performed over the ensemble
19+
of trees to find a Gaussian distribution closest to the combined distribution
20+
for all trees in the model. This decision forest classifier consists of an
21+
ensemble of decision trees.
22+
23+
Generally, ensemble models provide better coverage and accuracy than single
24+
decision trees. Each tree in a decision forest outputs a Gaussian distribution.
25+
26+
For more see:
27+
* [Wikipedia: Random forest](https://en.wikipedia.org/wiki/Random_forest)
28+
* [Quantile regression
29+
forest](http://jmlr.org/papers/volume7/meinshausen06a/meinshausen06a.pdf)
30+
* [From Stumps to Trees to
31+
Forests](https://blogs.technet.microsoft.com/machinelearning/2014/09/10/from-stumps-to-trees-to-forests/)

src/Microsoft.ML.FastTree/RandomForestClassification.cs

+16-2
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,26 @@ private static IPredictorProducing<float> Create(IHostEnvironment env, ModelLoad
113113
/// <summary>
114114
/// The <see cref="IEstimator{TTransformer}"/> for training a decision tree binary classification model using Fast Forest.
115115
/// </summary>
116-
/// <include file='doc.xml' path='doc/members/member[@name="FastForest_remarks"]/*' />
116+
/// <remarks>
117+
/// <format type="text/markdown"><![CDATA[
118+
/// To create this trainer, use [FastForest](xref:Microsoft.ML.TreeExtensions.FastForest(Microsoft.ML.BinaryClassificationCatalog.BinaryClassificationTrainers,System.String,System.String,System.String,System.Int32,System.Int32,System.Int32))
119+
/// or [FastForest(Options)](xref:Microsoft.ML.TreeExtensions.FastForest(Microsoft.ML.BinaryClassificationCatalog.BinaryClassificationTrainers,Microsoft.ML.Trainers.FastTree.FastForestBinaryTrainer.Options)).
120+
///
121+
/// [!include[io](~/../docs/samples/docs/api-reference/io-columns-binary-classification.md)]
122+
///
123+
/// [!include[algorithm](~/../docs/samples/docs/api-reference/algo-details-fastforest.md)]
124+
/// ]]>
125+
/// </format>
126+
/// </remarks>
127+
/// <seealso cref="Microsoft.ML.TreeExtensions.FastForest(Microsoft.ML.BinaryClassificationCatalog.BinaryClassificationTrainers,System.String,System.String,System.String,System.Int32,System.Int32,System.Int32)"/>
128+
/// <seealso cref="Microsoft.ML.TreeExtensions.FastForest(Microsoft.ML.BinaryClassificationCatalog.BinaryClassificationTrainers,Microsoft.ML.Trainers.FastTree.FastForestBinaryTrainer.Options)"/>
129+
/// <seealso cref="Options"/>
117130
public sealed partial class FastForestBinaryTrainer :
118131
RandomForestTrainerBase<FastForestBinaryTrainer.Options, BinaryPredictionTransformer<FastForestBinaryModelParameters>, FastForestBinaryModelParameters>
119132
{
120133
/// <summary>
121-
/// Options for the <see cref="FastForestBinaryTrainer"/>.
134+
/// Options for the <see cref="FastForestBinaryTrainer"/> as used in
135+
/// [FastForest(Options)](xref:Microsoft.ML.TreeExtensions.FastForest(Microsoft.ML.BinaryClassificationCatalog.BinaryClassificationTrainers,Microsoft.ML.Trainers.FastTree.FastForestBinaryTrainer.Options)).
122136
/// </summary>
123137
public sealed class Options : FastForestOptionsBase
124138
{

src/Microsoft.ML.FastTree/TreeTrainersCatalog.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -384,11 +384,11 @@ public static FastForestRegressionTrainer FastForest(this RegressionCatalog.Regr
384384
}
385385

386386
/// <summary>
387-
/// Predict a target using a decision tree regression model trained with the <see cref="FastForestBinaryTrainer"/>.
387+
/// Create <see cref="FastForestBinaryTrainer"/>, which predicts a target using a decision tree regression model.
388388
/// </summary>
389389
/// <param name="catalog">The <see cref="BinaryClassificationCatalog"/>.</param>
390-
/// <param name="labelColumnName">The name of the label column.</param>
391-
/// <param name="featureColumnName">The name of the feature column.</param>
390+
/// <param name="labelColumnName">The name of the label column. The column data must be <see cref="System.Boolean"/>.</param>
391+
/// <param name="featureColumnName">The name of the feature column. The column data must be a known-sized vector of <see cref="System.Single"/>.</param>
392392
/// <param name="exampleWeightColumnName">The name of the example weight column (optional).</param>
393393
/// <param name="numberOfTrees">Total number of decision trees to create in the ensemble.</param>
394394
/// <param name="numberOfLeaves">The maximum number of leaves per decision tree.</param>
@@ -414,7 +414,7 @@ public static FastForestBinaryTrainer FastForest(this BinaryClassificationCatalo
414414
}
415415

416416
/// <summary>
417-
/// Predict a target using a decision tree regression model trained with the <see cref="FastForestBinaryTrainer"/> and advanced options.
417+
/// Create <see cref="FastForestBinaryTrainer"/> with advanced options, which predicts a target using a decision tree regression model.
418418
/// </summary>
419419
/// <param name="catalog">The <see cref="BinaryClassificationCatalog"/>.</param>
420420
/// <param name="options">Trainer options.</param>

0 commit comments

Comments
 (0)