Skip to content

Commit b8bd51f

Browse files
authored
XML documentation for Ordinary Least Squares trainer. (#3405)
* XML documentation for Ordinary Least Squares trainer. * PR feedback. * PR feedback.
1 parent 5a7bf13 commit b8bd51f

File tree

2 files changed

+26
-7
lines changed

2 files changed

+26
-7
lines changed

src/Microsoft.ML.Mkl.Components/MklComponentsCatalog.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ namespace Microsoft.ML
1515
public static class MklComponentsCatalog
1616
{
1717
/// <summary>
18-
/// Predict a target using a linear regression model trained with the <see cref="OlsTrainer"/>.
18+
/// Create <see cref="OlsTrainer"/>, which predicts a target using a linear regression model.
1919
/// </summary>
2020
/// <param name="catalog">The <see cref="RegressionCatalog"/>.</param>
21-
/// <param name="labelColumnName">The name of the label column.</param>
22-
/// <param name="featureColumnName">The name of the feature column.</param>
21+
/// <param name="labelColumnName">The name of the label column. The column data must be <see cref="System.Single"/>.</param>
22+
/// <param name="featureColumnName">The name of the feature column. The column data must be a known-sized vector of <see cref="System.Single"/>.</param>
2323
/// <param name="exampleWeightColumnName">The name of the example weight column (optional).</param>
2424
/// <example>
2525
/// <format type="text/markdown">
@@ -46,7 +46,7 @@ public static OlsTrainer Ols(this RegressionCatalog.RegressionTrainers catalog,
4646
}
4747

4848
/// <summary>
49-
/// Predict a target using a linear regression model trained with the <see cref="OlsTrainer"/>.
49+
/// Create <see cref="OlsTrainer"/> with advanced options, which predicts a target using a linear regression model.
5050
/// </summary>
5151
/// <param name="catalog">The <see cref="RegressionCatalog"/>.</param>
5252
/// <param name="options">Algorithm advanced options. See <see cref="OlsTrainer.Options"/>.</param>

src/Microsoft.ML.Mkl.Components/OlsLinearRegression.cs

+22-3
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,35 @@ namespace Microsoft.ML.Trainers
3636
/// ordinary least squares (OLS) for estimating the parameters of the linear regression model.
3737
/// </summary>
3838
/// <remarks>
39-
/// <a href='https://en.wikipedia.org/wiki/Ordinary_least_squares'>Ordinary least squares (OLS)</a> is a parameterized regression method.
39+
/// <format type="text/markdown"><![CDATA[
40+
/// To create this trainer, use [Ols](xref:Microsoft.ML.MklComponentsCatalog.Ols(Microsoft.ML.RegressionCatalog.RegressionTrainers,System.String,System.String,System.String))
41+
/// or [Ols(Options)](xref:Microsoft.ML.MklComponentsCatalog.Ols(Microsoft.ML.RegressionCatalog.RegressionTrainers,Microsoft.ML.Trainers.OlsTrainer.Options)).
42+
///
43+
/// [!include[io](~/../docs/samples/docs/api-reference/io-columns-regression.md)]
44+
///
45+
/// ### Trainer Characteristics
46+
/// | | |
47+
/// | -- | -- |
48+
/// | Machine learning task | Regression |
49+
/// | Is normalization required? | Yes |
50+
/// | Is caching required? | No |
51+
/// | Required NuGet in addition to Microsoft.ML | Microsoft.ML.Mkl.Components |
52+
///
53+
/// ### Training Algorithm Details
54+
/// [Ordinary least squares (OLS)](https://en.wikipedia.org/wiki/Ordinary_least_squares) is a parameterized regression method.
4055
/// It assumes that the conditional mean of the dependent variable follows a linear function of the dependent variables.
41-
/// The regression parameters can be estimated by minimizing the squares of the difference between observed values and the predictions.
56+
/// The regression parameters can be estimated by minimizing the squares of the difference between observed values and the predictions
57+
/// ]]>
58+
/// </format>
4259
/// </remarks>
4360
/// <seealso cref="MklComponentsCatalog.Ols(RegressionCatalog.RegressionTrainers, string, string, string)"/>
4461
/// <seealso cref="MklComponentsCatalog.Ols(RegressionCatalog.RegressionTrainers, OlsTrainer.Options)"/>
62+
/// <seealso cref="Options"/>
4563
public sealed class OlsTrainer : TrainerEstimatorBase<RegressionPredictionTransformer<OlsModelParameters>, OlsModelParameters>
4664
{
4765
/// <summary>
48-
/// Options for the <see cref="OlsTrainer"/>.
66+
/// Options for the <see cref="OlsTrainer"/> as used in
67+
/// [Ols(Options)](xref:Microsoft.ML.MklComponentsCatalog.Ols(Microsoft.ML.RegressionCatalog.RegressionTrainers,Microsoft.ML.Trainers.OlsTrainer.Options))
4968
/// </summary>
5069
public sealed class Options : TrainerInputBaseWithWeight
5170
{

0 commit comments

Comments
 (0)