Skip to content

Commit fe88eed

Browse files
committed
PR feedback.
1 parent f9e39c9 commit fe88eed

File tree

3 files changed

+32
-17
lines changed

3 files changed

+32
-17
lines changed
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
### Training Algorithm Details
2+
This trainer is based on the Stochastic Dual Coordinate Ascent (SDCA) method, a
3+
state-of-the-art optimization technique for convex objective functions. The
4+
algorithm can be scaled for use on large out-of-memory data sets due to a
5+
semi-asynchronized implementation that supports multi-threading.
6+
7+
Convergence is underwritten by periodically enforcing synchronization between
8+
primal and dual variables in a separate thread. Several choices of loss
9+
functions are also provided.
10+
11+
Note that SDCA is a stochastic and streaming optimization algorithm. The result
12+
depends on the order of training data because the stopping tolerance is not
13+
tight enough. In strongly-convex optimization, the optimal solution is unique
14+
and therefore everyone eventually reaches the same place. Even in
15+
non-strongly-convex cases, you will get equally-good solutions from run to run.
16+
For reproducible results, it is recommended that one sets 'Shuffle' to False and
17+
'NumThreads' to 1. Elastic net regularization can be specified by the 'L2Const'
18+
and 'L1Threshold' parameters. Note that the 'L2Const' has an effect on the rate
19+
of convergence. In general, the larger the 'L2Const', the faster SDCA converges.
20+
21+
For more information, see:
22+
* [Scaling Up Stochastic Dual Coordinate
23+
Ascent.](https://www.microsoft.com/en-us/research/wp-content/uploads/2016/06/main-3.pdf)
24+
* [Stochastic Dual Coordinate Ascent Methods for Regularized Loss
25+
Minimization.](http://www.jmlr.org/papers/volume14/shalev-shwartz13a/shalev-shwartz13a.pdf)

src/Microsoft.ML.StandardTrainers/Standard/SdcaRegression.cs

+3-13
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,12 @@ namespace Microsoft.ML.Trainers
3939
/// | Is caching required? | No |
4040
/// | Required NuGet in addition to Microsoft.ML | None |
4141
///
42-
/// ### Training Algorithm Details
43-
/// This trainer is based on the Stochastic Dual Coordinate Ascent (SDCA) method, a state-of-the-art optimization technique for convex objective functions.
44-
/// The algorithm can be scaled for use on large out-of-memory data sets due to a semi-asynchronized implementation that supports multi-threading.
45-
/// Convergence is underwritten by periodically enforcing synchronization between primal and dual updates in a separate thread.
46-
/// Several choices of loss functions are also provided.The SDCA method combines several of the best properties and capabilities of logistic regression and SVM algorithms.
47-
/// Note that SDCA is a stochastic and streaming optimization algorithm. The results depends on the order of the training data.
48-
/// For reproducible results, it is recommended that one sets 'Shuffle' to False and 'NumThreads' to 1.
49-
/// Elastic net regularization can be specified by the 'L2Const' and 'L1Threshold' parameters. Note that the 'L2Const' has an effect on the rate of convergence.
50-
/// In general, the larger the 'L2Const', the faster SDCA converges.
51-
/// For more information, see: [Scaling Up Stochastic Dual Coordinate Ascent](https://www.microsoft.com/en-us/research/wp-content/uploads/2016/06/main-3.pdf ) and
52-
/// [Stochastic Dual Coordinate Ascent Methods for Regularized Loss Minimization](http://www.jmlr.org/papers/volume14/shalev-shwartz13a/shalev-shwartz13a.pdf).
42+
/// [!include[io](~/../docs/samples/docs/api-reference/algo-details-sdca.md)]
5343
/// ]]>
5444
/// </format>
5545
/// </remarks>
56-
/// <seealso cref="Microsoft.ML.StandardTrainersCatalog.Sdca(Microsoft.ML.RegressionCatalog.RegressionTrainers,System.String,System.String,System.String,Microsoft.ML.Trainers.ISupportSdcaRegressionLoss,System.Nullable{System.Single},System.Nullable{System.Single},System.Nullable{System.Int32})"/>
57-
/// <seealso cref="Microsoft.ML.StandardTrainersCatalog.Sdca(Microsoft.ML.RegressionCatalog.RegressionTrainers,Microsoft.ML.Trainers.SdcaRegressionTrainer.Options)"/>
46+
/// <seealso cref="StandardTrainersCatalog.Sdca(RegressionCatalog.RegressionTrainers, string, string, string, ISupportSdcaRegressionLoss, float?, float?, int?)"/>
47+
/// <seealso cref="StandardTrainersCatalog.Sdca(RegressionCatalog.RegressionTrainers, SdcaRegressionTrainer.Options)"/>
5848
/// <seealso cref="Options"/>
5949
public sealed class SdcaRegressionTrainer : SdcaTrainerBase<SdcaRegressionTrainer.Options, RegressionPredictionTransformer<LinearRegressionModelParameters>, LinearRegressionModelParameters>
6050
{

src/Microsoft.ML.StandardTrainers/StandardTrainersCatalog.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public static SgdNonCalibratedTrainer SgdNonCalibrated(this BinaryClassification
129129
}
130130

131131
/// <summary>
132-
/// Creates a <see cref="SdcaRegressionTrainer"/>, which predicts a target using a linear regression model.
132+
/// Create <see cref="SdcaRegressionTrainer"/>, which predicts a target using a linear regression model.
133133
/// </summary>
134134
/// <param name="catalog">The regression catalog trainer object.</param>
135135
/// <param name="labelColumnName">The name of the label column. The column data must be <see cref="System.Single"/></param>
@@ -160,7 +160,7 @@ public static SdcaRegressionTrainer Sdca(this RegressionCatalog.RegressionTraine
160160
}
161161

162162
/// <summary>
163-
/// Creates a <see cref="SdcaRegressionTrainer"/>, which predicts a target using a linear regression model trained with advanced options.
163+
/// Creates <see cref="SdcaRegressionTrainer"/> with advanced options, which predicts a target using a linear regression model trained.
164164
/// </summary>
165165
/// <param name="catalog">The regression catalog trainer object.</param>
166166
/// <param name="options">Trainer options.</param>
@@ -181,7 +181,7 @@ public static SdcaRegressionTrainer Sdca(this RegressionCatalog.RegressionTraine
181181
}
182182

183183
/// <summary>
184-
/// Creates a <see cref="SdcaLogisticRegressionBinaryTrainer"/>, that predicts a target using a linear classification model.
184+
/// Create <see cref="SdcaLogisticRegressionBinaryTrainer"/>, that predicts a target using a linear classification model.
185185
/// </summary>
186186
/// <param name="catalog">The binary classification catalog trainer object.</param>
187187
/// <param name="labelColumnName">The name of the label column. The column data must be <see cref="System.Single"/>.</param>
@@ -211,7 +211,7 @@ public static SdcaLogisticRegressionBinaryTrainer SdcaLogisticRegression(
211211
}
212212

213213
/// <summary>
214-
/// Creates a <see cref="SdcaLogisticRegressionBinaryTrainer"/>, which predicts a target using a linear classification model with advanced options.
214+
/// Create <see cref="SdcaLogisticRegressionBinaryTrainer"/> using advanced options, which predicts a target using a linear classification model.
215215
/// </summary>
216216
/// <param name="catalog">The binary classification catalog trainer object.</param>
217217
/// <param name="options">Trainer options.</param>

0 commit comments

Comments
 (0)