Skip to content

XML documentation for Ordinary Least Squares trainer. #3405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Microsoft.ML.Mkl.Components/MklComponentsCatalog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ namespace Microsoft.ML
public static class MklComponentsCatalog
{
/// <summary>
/// Predict a target using a linear regression model trained with the <see cref="OlsTrainer"/>.
/// Create <see cref="OlsTrainer"/>, which predicts a target using a linear regression model.
/// </summary>
/// <param name="catalog">The <see cref="RegressionCatalog"/>.</param>
/// <param name="labelColumnName">The name of the label column.</param>
/// <param name="featureColumnName">The name of the feature column.</param>
/// <param name="labelColumnName">The name of the label column. The column data must be <see cref="System.Single"/>.</param>
/// <param name="featureColumnName">The name of the feature column. The column data must be a known-sized vector of <see cref="System.Single"/>.</param>
/// <param name="exampleWeightColumnName">The name of the example weight column (optional).</param>
/// <example>
/// <format type="text/markdown">
Expand All @@ -46,7 +46,7 @@ public static OlsTrainer Ols(this RegressionCatalog.RegressionTrainers catalog,
}

/// <summary>
/// Predict a target using a linear regression model trained with the <see cref="OlsTrainer"/>.
/// Create <see cref="OlsTrainer"/> with advanced options, which predicts a target using a linear regression model.
/// </summary>
/// <param name="catalog">The <see cref="RegressionCatalog"/>.</param>
/// <param name="options">Algorithm advanced options. See <see cref="OlsTrainer.Options"/>.</param>
Expand Down
25 changes: 22 additions & 3 deletions src/Microsoft.ML.Mkl.Components/OlsLinearRegression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,35 @@ namespace Microsoft.ML.Trainers
/// ordinary least squares (OLS) for estimating the parameters of the linear regression model.
/// </summary>
/// <remarks>
/// <a href='https://en.wikipedia.org/wiki/Ordinary_least_squares'>Ordinary least squares (OLS)</a> is a parameterized regression method.
/// <format type="text/markdown"><![CDATA[
/// To create this trainer, use [Ols](xref:Microsoft.ML.MklComponentsCatalog.Ols(Microsoft.ML.RegressionCatalog.RegressionTrainers,System.String,System.String,System.String))
/// or [Ols(Options)](xref:Microsoft.ML.MklComponentsCatalog.Ols(Microsoft.ML.RegressionCatalog.RegressionTrainers,Microsoft.ML.Trainers.OlsTrainer.Options)).
///
/// [!include[io](~/../docs/samples/docs/api-reference/io-columns-regression.md)]
///
/// ### Trainer Characteristics
/// | | |
/// | -- | -- |
/// | Machine learning task | Regression |
/// | Is normalization required? | Yes |
/// | Is caching required? | No |
/// | Required NuGet in addition to Microsoft.ML | Microsoft.ML.Mkl.Components |
///
/// ### Training Algorithm Details
/// [Ordinary least squares (OLS)](https://en.wikipedia.org/wiki/Ordinary_least_squares) is a parameterized regression method.
/// It assumes that the conditional mean of the dependent variable follows a linear function of the dependent variables.
/// The regression parameters can be estimated by minimizing the squares of the difference between observed values and the predictions.
/// The regression parameters can be estimated by minimizing the squares of the difference between observed values and the predictions
/// ]]>
/// </format>
/// </remarks>
/// <seealso cref="MklComponentsCatalog.Ols(RegressionCatalog.RegressionTrainers, string, string, string)"/>
/// <seealso cref="MklComponentsCatalog.Ols(RegressionCatalog.RegressionTrainers, OlsTrainer.Options)"/>
/// <seealso cref="Options"/>
public sealed class OlsTrainer : TrainerEstimatorBase<RegressionPredictionTransformer<OlsModelParameters>, OlsModelParameters>
{
/// <summary>
/// Options for the <see cref="OlsTrainer"/>.
/// Options for the <see cref="OlsTrainer"/> as used in
/// [Ols(Options)](xref:Microsoft.ML.MklComponentsCatalog.Ols(Microsoft.ML.RegressionCatalog.RegressionTrainers,Microsoft.ML.Trainers.OlsTrainer.Options))
/// </summary>
public sealed class Options : TrainerInputBaseWithWeight
{
Expand Down