Skip to content

Commit 1e097c2

Browse files
authored
XML documentation for FastTree Ranking trainer. (#3430)
* XML documentation for FastTree Ranking trainer. * PR feedback. * PR feedback.
1 parent 20390ec commit 1e097c2

File tree

3 files changed

+28
-6
lines changed

3 files changed

+28
-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

+22-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,28 @@ 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? | No |
56+
/// | Is caching required? | No |
57+
/// | Required NuGet in addition to Microsoft.ML | Microsoft.ML.FastTree |
58+
///
59+
/// [!include[algorithm](~/../docs/samples/docs/api-reference/algo-details-fasttree.md)]
60+
/// ]]>
61+
/// </format>
62+
/// </remarks>
63+
/// <seealso cref="TreeExtensions.FastTree(RankingCatalog.RankingTrainers, string, string, string, string, int, int, int, double)"/>
64+
/// <seealso cref="TreeExtensions.FastTree(RegressionCatalog.RegressionTrainers, FastTreeRegressionTrainer.Options)"/>
65+
/// <seealso cref="Options"/>
4566
public sealed partial class FastTreeRankingTrainer
4667
: BoostingFastTreeTrainerBase<FastTreeRankingTrainer.Options, RankingPredictionTransformer<FastTreeRankingModelParameters>, FastTreeRankingModelParameters>
4768
{

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+
/// Create a <see cref="FastTreeRankingTrainer"/>, which ranks a series of inputs based on their relevancee, using 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+
/// Create a <see cref="FastTreeRankingTrainer"/> with advanced options, which ranks a series of inputs based on their relevance, using a decision tree ranking model.
160160
/// </summary>
161161
/// <param name="catalog">The <see cref="RankingCatalog"/>.</param>
162162
/// <param name="options">Trainer options.</param>

0 commit comments

Comments
 (0)