Skip to content

Commit c11e9bb

Browse files
committed
XML documentation for FastTree binary classification.
1 parent cc40049 commit c11e9bb

File tree

2 files changed

+45
-5
lines changed

2 files changed

+45
-5
lines changed

src/Microsoft.ML.FastTree/FastTreeClassification.cs

+41-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,47 @@ private static IPredictorProducing<float> Create(IHostEnvironment env, ModelLoad
100100
/// <summary>
101101
/// The <see cref="IEstimator{TTransformer}"/> for training a decision tree binary classification model using FastTree.
102102
/// </summary>
103-
/// <include file='doc.xml' path='doc/members/member[@name="FastTree_remarks"]/*' />
103+
/// <remarks>
104+
/// <format type="text/markdown"><![CDATA[
105+
/// To create this trainer, use [FastTree](xref:Microsoft.ML.TreeExtensions.FastTree(Microsoft.ML.BinaryClassificationCatalog.BinaryClassificationTrainers,System.String,System.String,System.String,System.Int32,System.Int32,System.Int32,System.Double))
106+
/// or [FastTree(Options)](xref:"Microsoft.ML.TreeExtensions.FastTree(Microsoft.ML.BinaryClassificationCatalog.BinaryClassificationTrainers,Microsoft.ML.Trainers.FastTree.FastTreeBinaryTrainer.Options)).
107+
///
108+
/// [!include[io](~/../docs/samples/docs/api-reference/io-columns-binary-classification.md)]
109+
///
110+
/// ### Trainer Characteristics
111+
/// | | |
112+
/// | -- | -- |
113+
/// | Machine learning task | Binary classification |
114+
/// | Is normalization required? | Yes |
115+
/// | Is caching required? | No |
116+
/// | Required NuGet in addition to Microsoft.ML | None |
117+
///
118+
/// ### Training Algorithm Details
119+
/// FastTree is an efficient implementation of the [MART](https://arxiv.org/abs/1505.01866) gradient boosting algorithm.
120+
/// Gradient boosting is a machine learning technique for regression problems.
121+
/// It builds each regression tree in a step-wise fashion, using a predefined loss function to measure the error for each step and corrects for it in the next.
122+
/// So this prediction model is actually an ensemble of weaker prediction models.In regression problems, boosting builds a series of such trees in a step-wise fashion and then selects the optimal tree using an arbitrary differentiable loss function.
123+
///
124+
/// MART learns an ensemble of regression trees, which is a decision tree with scalar values in its leaves.
125+
/// A decision(or regression) tree is a binary tree-like flow chart, where at each interior node one decides which of the two child nodes to continue to based on one of the feature values from the input.
126+
/// At each leaf node, a value is returned.In the interior nodes, the decision is based on the test 'x &lt;= v' where x is the value of the feature in the input sample and v is one of the possible values of this feature.
127+
/// The functions that can be produced by a regression tree are all the piece-wise constant functions.
128+
///
129+
/// The ensemble of trees is produced by computing, in each step, a regression tree that approximates the gradient of the loss function, and adding it to the previous tree with coefficients that minimize the loss of the new tree.
130+
/// The output of the ensemble produced by MART on a given instance is the sum of the tree outputs.
131+
/// In case of a binary classification problem, the output is converted to a probability by using some form of calibration.
132+
/// In case of a regression problem, the output is the predicted value of the function.
133+
/// In case of a ranking problem, the instances are ordered by the output value of the ensemble.
134+
///
135+
/// For more information see:
136+
/// [Wikipedia: Gradient boosting (Gradient tree boosting)](https://en.wikipedia.org/wiki/Gradient_boosting#Gradient_tree_boosting).
137+
/// [Greedy function approximation: A gradient boosting machine.](https://projecteuclid.org/DPubS?service=UI&amp;version=1.0&amp;verb=Display&amp;handle=euclid.aos/1013203451)
138+
/// ]]>
139+
/// </format>
140+
/// </remarks>
141+
/// <seealso cref="Microsoft.ML.TreeExtensions.FastTree(Microsoft.ML.BinaryClassificationCatalog.BinaryClassificationTrainers,System.String,System.String,System.String,System.Int32,System.Int32,System.Int32,System.Double)"/>
142+
/// <seealso cref="Microsoft.ML.TreeExtensions.FastTree(Microsoft.ML.BinaryClassificationCatalog.BinaryClassificationTrainers,Microsoft.ML.Trainers.FastTree.FastTreeBinaryTrainer.Options)"/>
143+
/// <seealso cref="Options"/>
104144
public sealed partial class FastTreeBinaryTrainer :
105145
BoostingFastTreeTrainerBase<FastTreeBinaryTrainer.Options,
106146
BinaryPredictionTransformer<CalibratedModelParametersBase<FastTreeBinaryModelParameters, PlattCalibrator>>,

src/Microsoft.ML.FastTree/TreeTrainersCatalog.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ public static FastTreeRegressionTrainer FastTree(this RegressionCatalog.Regressi
6868
}
6969

7070
/// <summary>
71-
/// Predict a target using a decision tree binary classification model trained with the <see cref="FastTreeBinaryTrainer"/>.
71+
/// Creates a <see cref="FastTreeBinaryTrainer"/>, which predicts a target using a decision tree binary classification model.
7272
/// </summary>
7373
/// <param name="catalog">The <see cref="BinaryClassificationCatalog"/>.</param>
74-
/// <param name="labelColumnName">The name of the label column.</param>
75-
/// <param name="featureColumnName">The name of the feature column.</param>
74+
/// <param name="labelColumnName">The name of the label column. The column data must be <see cref="System.Boolean"/></param>
75+
/// <param name="featureColumnName">The name of the feature column. The column data must be a known-sized vector of <see cref="System.Single"/></param>
7676
/// <param name="exampleWeightColumnName">The name of the example weight column (optional).</param>
7777
/// <param name="numberOfTrees">Total number of decision trees to create in the ensemble.</param>
7878
/// <param name="numberOfLeaves">The maximum number of leaves per decision tree.</param>
@@ -100,7 +100,7 @@ public static FastTreeBinaryTrainer FastTree(this BinaryClassificationCatalog.Bi
100100
}
101101

102102
/// <summary>
103-
/// Predict a target using a decision tree binary classification model trained with the <see cref="FastTreeBinaryTrainer"/> and advanced options.
103+
/// Creates a <see cref="FastTreeBinaryTrainer"/>, which predicts a target using a decision tree binary classification model using advanced options.
104104
/// </summary>
105105
/// <param name="catalog">The <see cref="BinaryClassificationCatalog"/>.</param>
106106
/// <param name="options">Trainer options.</param>

0 commit comments

Comments
 (0)