Skip to content

Commit 3d66d6f

Browse files
committed
XML documentation for GAM regression trainer.
1 parent fa95c00 commit 3d66d6f

File tree

2 files changed

+39
-6
lines changed

2 files changed

+39
-6
lines changed

src/Microsoft.ML.FastTree/GamRegression.cs

+35-2
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,44 @@ namespace Microsoft.ML.Trainers.FastTree
2626
/// <summary>
2727
/// The <see cref="IEstimator{TTransformer}"/> for training a regression model with generalized additive models (GAM).
2828
/// </summary>
29-
/// <include file='doc.xml' path='doc/members/member[@name="GAM_remarks"]/*' />
29+
/// <remarks>
30+
/// <format type="text/markdown"><![CDATA[
31+
/// To create this trainer, use [Gam](xref:Microsoft.ML.TreeExtensions.Gam(Microsoft.ML.RegressionCatalog.RegressionTrainers,System.String,System.String,System.String,System.Int32,System.Int32,System.Double))
32+
/// or [Gam(Options)](xref:Microsoft.ML.TreeExtensions.Gam(Microsoft.ML.RegressionCatalog.RegressionTrainers,Microsoft.ML.Trainers.FastTree.GamRegressionTrainer.Options)).
33+
///
34+
/// [!include[io](~/../docs/samples/docs/api-reference/io-columns-regression.md)]
35+
///
36+
/// ### Trainer Characteristics
37+
/// | | |
38+
/// | -- | -- |
39+
/// | Machine learning task | Regression |
40+
/// | Is normalization required? | Yes |
41+
/// | Is caching required? | No |
42+
/// | Required NuGet in addition to Microsoft.ML | Microsoft.ML.FastTree |
43+
///
44+
/// ### Training Algorithm Details
45+
/// Generalized Additive Models, or GAMs, model the data as a set of linearly independent features
46+
/// similar to a linear model.For each feature, the GAM trainer learns a non-linear function,
47+
/// called a "shape function", that computes the response as a function of the feature's value.
48+
/// (In contrast, a linear model fits a linear response(e.g.a line) to each feature.)
49+
/// To score an example, the outputs of all the shape functions are summed and the score is the total value.
50+
/// This GAM trainer is implemented using shallow gradient boosted trees(e.g.tree stumps) to learn nonparametric
51+
/// shape functions, and is based on the method described in Lou, Caruana, and Gehrke.
52+
/// [&quot; Intelligible Models for Classification and Regression.&quot;](http://www.cs.cornell.edu/~yinlou/papers/lou-kdd12.pdf) KDD&apos;12, Beijing, China. 2012.
53+
/// After training, an intercept is added to represent the average prediction over the training set,
54+
/// and the shape functions are normalized to represent the deviation from the average prediction.This results
55+
/// in models that are easily interpreted simply by inspecting the intercept and the shape functions.
56+
/// ]]>
57+
/// </format>
58+
/// </remarks>
59+
/// <seealso cref="Microsoft.ML.TreeExtensions.Gam(Microsoft.ML.RegressionCatalog.RegressionTrainers,System.String,System.String,System.String,System.Int32,System.Int32,System.Double)"/>
60+
/// <seealso cref="Microsoft.ML.TreeExtensions.Gam(Microsoft.ML.RegressionCatalog.RegressionTrainers,Microsoft.ML.Trainers.FastTree.GamRegressionTrainer.Options)"/>
61+
/// <seealso cref="Options"/>
3062
public sealed class GamRegressionTrainer : GamTrainerBase<GamRegressionTrainer.Options, RegressionPredictionTransformer<GamRegressionModelParameters>, GamRegressionModelParameters>
3163
{
3264
/// <summary>
33-
/// Options for the <see cref="GamRegressionTrainer"/>.
65+
/// Options for the <see cref="GamRegressionTrainer"/> as used in
66+
/// [Gam(Options)](xref:Microsoft.ML.TreeExtensions.Gam(Microsoft.ML.RegressionCatalog.RegressionTrainers,Microsoft.ML.Trainers.FastTree.GamRegressionTrainer.Options)).
3467
/// </summary>
3568
public partial class Options : OptionsBase
3669
{

src/Microsoft.ML.FastTree/TreeTrainersCatalog.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,11 @@ public static GamBinaryTrainer Gam(this BinaryClassificationCatalog.BinaryClassi
228228
}
229229

230230
/// <summary>
231-
/// Predict a target using generalized additive models (GAM) trained with the <see cref="GamRegressionTrainer"/>.
231+
/// Creates <see cref="GamRegressionTrainer"/>, which predicts a target using generalized additive models (GAM).
232232
/// </summary>
233233
/// <param name="catalog">The <see cref="RegressionCatalog"/>.</param>
234-
/// <param name="labelColumnName">The name of the label column.</param>
235-
/// <param name="featureColumnName">The name of the feature column.</param>
234+
/// <param name="labelColumnName">The name of the label column. The column data must be <see cref="System.Single"/>.</param>
235+
/// <param name="featureColumnName">The name of the feature column. The column data must be a known-sized vector of <see cref="System.Single"/>.</param>
236236
/// <param name="exampleWeightColumnName">The name of the example weight column (optional).</param>
237237
/// <param name="numberOfIterations">The number of iterations to use in learning the features.</param>
238238
/// <param name="maximumBinCountPerFeature">The maximum number of bins to use to approximate features.</param>
@@ -258,7 +258,7 @@ public static GamRegressionTrainer Gam(this RegressionCatalog.RegressionTrainers
258258
}
259259

260260
/// <summary>
261-
/// Predict a target using generalized additive models (GAM) trained with the <see cref="GamRegressionTrainer"/>.
261+
/// Creates <see cref="GamRegressionTrainer"/>, which predicts a target using generalized additive models (GAM) using advanced options.
262262
/// </summary>
263263
/// <param name="catalog">The <see cref="RegressionCatalog"/>.</param>
264264
/// <param name="options">Trainer options.</param>

0 commit comments

Comments
 (0)