Skip to content

Commit 610bdb6

Browse files
committed
XML documentation for FastTree Ranking trainer.
1 parent 7d26e61 commit 610bdb6

File tree

3 files changed

+47
-6
lines changed

3 files changed

+47
-6
lines changed

src/Microsoft.ML.FastTree/FastTreeArguments.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,8 @@ public Options()
213213
public sealed partial class FastTreeRankingTrainer
214214
{
215215
/// <summary>
216-
/// Options for the <see cref="FastTreeRankingTrainer"/>.
216+
/// Options for the <see cref="FastTreeRankingTrainer"/> as used in
217+
/// [FastTree(Options)](xref:Microsoft.ML.TreeExtensions.FastTree(Microsoft.ML.RankingCatalog.RankingTrainers,Microsoft.ML.Trainers.FastTree.FastTreeRankingTrainer.Options)).
217218
/// </summary>
218219
[TlcModule.Component(Name = LoadNameValue, FriendlyName = UserNameValue, Desc = Summary)]
219220
public sealed class Options : BoostedTreeOptions, IFastTreeTrainerFactory

src/Microsoft.ML.FastTree/FastTreeRanking.cs

+41-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,47 @@ namespace Microsoft.ML.Trainers.FastTree
4141
/// <summary>
4242
/// The <see cref="IEstimator{TTransformer}"/> for training a decision tree ranking model using FastTree.
4343
/// </summary>
44-
/// <include file='doc.xml' path='doc/members/member[@name="FastTree_remarks"]/*' />
44+
/// <remarks>
45+
/// <format type="text/markdown"><![CDATA[
46+
/// To create this trainer, use [FastTree](xref:Microsoft.ML.TreeExtensions.FastTree(Microsoft.ML.RankingCatalog.RankingTrainers,System.String,System.String,System.String,System.String,System.Int32,System.Int32,System.Int32,System.Double))
47+
/// or [FastTree(Options)](xref:Microsoft.ML.TreeExtensions.FastTree(Microsoft.ML.RankingCatalog.RankingTrainers,Microsoft.ML.Trainers.FastTree.FastTreeRankingTrainer.Options)).
48+
///
49+
/// [!include[io](~/../docs/samples/docs/api-reference/io-columns-ranking.md)]
50+
///
51+
/// ### Trainer Characteristics
52+
/// | | |
53+
/// | -- | -- |
54+
/// | Machine learning task | Ranking |
55+
/// | Is normalization required? | Yes |
56+
/// | Is caching required? | No |
57+
/// | Required NuGet in addition to Microsoft.ML | Microsoft.ML.FastTree |
58+
///
59+
/// ### Training Algorithm Details
60+
/// FastTree is an efficient implementation of the [MART](https://arxiv.org/abs/1505.01866) gradient boosting algorithm.
61+
/// Gradient boosting is a machine learning technique for regression problems.
62+
/// 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.
63+
/// 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.
64+
///
65+
/// MART learns an ensemble of regression trees, which is a decision tree with scalar values in its leaves.
66+
/// 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.
67+
/// 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.
68+
/// The functions that can be produced by a regression tree are all the piece-wise constant functions.
69+
///
70+
/// 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.
71+
/// The output of the ensemble produced by MART on a given instance is the sum of the tree outputs.
72+
/// In case of a binary classification problem, the output is converted to a probability by using some form of calibration.
73+
/// In case of a regression problem, the output is the predicted value of the function.
74+
/// In case of a ranking problem, the instances are ordered by the output value of the ensemble.
75+
///
76+
/// For more information see:
77+
/// [Wikipedia: Gradient boosting (Gradient tree boosting)](https://en.wikipedia.org/wiki/Gradient_boosting#Gradient_tree_boosting).
78+
/// [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)
79+
/// ]]>
80+
/// </format>
81+
/// </remarks>
82+
/// <seealso cref="Microsoft.ML.TreeExtensions.FastTree(Microsoft.ML.RankingCatalog.RankingTrainers,System.String,System.String,System.String,System.String,System.Int32,System.Int32,System.Int32,System.Double)"/>
83+
/// <seealso cref="Microsoft.ML.TreeExtensions.FastTree(Microsoft.ML.RankingCatalog.RankingTrainers,Microsoft.ML.Trainers.FastTree.FastTreeRankingTrainer.Options)"/>
84+
/// <seealso cref="Options"/>
4585
public sealed partial class FastTreeRankingTrainer
4686
: BoostingFastTreeTrainerBase<FastTreeRankingTrainer.Options, RankingPredictionTransformer<FastTreeRankingModelParameters>, FastTreeRankingModelParameters>
4787
{

src/Microsoft.ML.FastTree/TreeTrainersCatalog.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,11 @@ public static FastTreeBinaryTrainer FastTree(this BinaryClassificationCatalog.Bi
122122
}
123123

124124
/// <summary>
125-
/// Ranks a series of inputs based on their relevance, training a decision tree ranking model with the <see cref="FastTreeRankingTrainer"/>.
125+
/// Creates a <see cref="FastTreeRankingTrainer"/>, which ranks a series of inputs based on their relevance and training a decision tree ranking model.
126126
/// </summary>
127127
/// <param name="catalog">The <see cref="RankingCatalog"/>.</param>
128-
/// <param name="labelColumnName">The name of the label column.</param>
129-
/// <param name="featureColumnName">The name of the feature column.</param>
128+
/// <param name="labelColumnName">The name of the label column. The column data must be <see cref="System.Single"/>.</param>
129+
/// <param name="featureColumnName">The name of the feature column. The column data must be a known-sized vector of <see cref="System.Single"/></param>
130130
/// <param name="rowGroupColumnName">The name of the group column.</param>
131131
/// <param name="exampleWeightColumnName">The name of the example weight column (optional).</param>
132132
/// <param name="numberOfTrees">Total number of decision trees to create in the ensemble.</param>
@@ -156,7 +156,7 @@ public static FastTreeRankingTrainer FastTree(this RankingCatalog.RankingTrainer
156156
}
157157

158158
/// <summary>
159-
/// Ranks a series of inputs based on their relevance, training a decision tree ranking model with the <see cref="FastTreeRankingTrainer"/> and advanced options.
159+
/// Creates a <see cref="FastTreeRankingTrainer"/>, which ranks a series of inputs based on their relevance and training a decision tree ranking model with advanced options.
160160
/// </summary>
161161
/// <param name="catalog">The <see cref="RankingCatalog"/>.</param>
162162
/// <param name="options">Trainer options.</param>

0 commit comments

Comments
 (0)