Skip to content

Commit 0bef3e5

Browse files
committed
XML documentation for Randomized PCA trainer.
1 parent 1b277b5 commit 0bef3e5

File tree

2 files changed

+25
-6
lines changed

2 files changed

+25
-6
lines changed

src/Microsoft.ML.PCA/PCACatalog.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ internal static PrincipalComponentAnalyzer ProjectToPrincipalComponents(this Tra
4040
=> new PrincipalComponentAnalyzer(CatalogUtils.GetEnvironment(catalog), columns);
4141

4242
/// <summary>
43-
/// Trains an approximate principal component analysis (PCA) model using randomized SVD algorithm.
43+
/// Creates a <see cref="RandomizedPcaTrainer"/>, which trains an approximate principal component analysis (PCA) model using randomized SVD algorithm.
4444
/// </summary>
4545
/// <param name="catalog">The anomaly detection catalog trainer object.</param>
46-
/// <param name="featureColumnName">The name of the feature column.</param>
46+
/// <param name="featureColumnName">The name of the feature column. The column data must be a known-sized vector of <see cref="System.Single"/>.</param>
4747
/// <param name="exampleWeightColumnName">The name of the example weight column (optional).</param>
4848
/// <param name="rank">The number of components in the PCA.</param>
4949
/// <param name="oversampling">Oversampling parameter for randomized PCA training.</param>
@@ -69,7 +69,7 @@ public static RandomizedPcaTrainer RandomizedPca(this AnomalyDetectionCatalog.An
6969
}
7070

7171
/// <summary>
72-
/// Trains an approximate principal component analysis (PCA) model using randomized SVD algorithm.
72+
/// TCreates a <see cref="RandomizedPcaTrainer"/>, which trains an approximate principal component analysis (PCA) model using randomized SVD algorithm with advanced options.
7373
/// </summary>
7474
/// <param name="catalog">The anomaly detection catalog trainer object.</param>
7575
/// <param name="options">Advanced options to the algorithm.</param>

src/Microsoft.ML.PCA/PcaTrainer.cs

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,31 @@ namespace Microsoft.ML.Trainers
3333
// REVIEW: make RFF transformer an option here.
3434

3535
/// <summary>
36-
/// This trainer trains an approximate PCA using Randomized SVD algorithm
37-
/// Reference: https://web.stanford.edu/group/mmds/slides2010/Martinsson.pdf
36+
/// The <see cref="IEstimator{TTransformer}"/> for training an approximate PCA using Randomized SVD algorithm.
3837
/// </summary>
3938
/// <remarks>
40-
/// This PCA can be made into Kernel PCA by using Random Fourier Features transform
39+
/// <format type="text/markdown"><![CDATA[
40+
/// To create this trainer, use [RandomizedPca](xref:Microsoft.ML.PcaCatalog.RandomizedPca(Microsoft.ML.AnomalyDetectionCatalog.AnomalyDetectionTrainers,System.String,System.String,System.Int32,System.Int32,System.Boolean,System.Nullable{System.Int32}))
41+
/// or [RandomizedPca(Options)](xref:Microsoft.ML.PcaCatalog.RandomizedPca(Microsoft.ML.AnomalyDetectionCatalog.AnomalyDetectionTrainers,Microsoft.ML.Trainers.RandomizedPcaTrainer.Options)).
42+
///
43+
/// [!include[io](~/../docs/samples/docs/api-reference/io-columns-regression.md)]
44+
///
45+
/// ### Trainer Characteristics
46+
/// | | |
47+
/// | -- | -- |
48+
/// | Machine learning task | Anomaly Detection |
49+
/// | Is normalization required? | Yes |
50+
/// | Is caching required? | No |
51+
/// | Required NuGet in addition to Microsoft.ML | None |
52+
///
53+
/// ### Training Algorithm Details
54+
/// This PCA can be made into Kernel PCA by using Random Fourier Features transform. [Reference](https://web.stanford.edu/group/mmds/slides2010/Martinsson.pdf)
55+
/// ]]>
56+
/// </format>
4157
/// </remarks>
58+
/// <seealso cref="Microsoft.ML.PcaCatalog.RandomizedPca(Microsoft.ML.AnomalyDetectionCatalog.AnomalyDetectionTrainers,System.String,System.String,System.Int32,System.Int32,System.Boolean,System.Nullable{System.Int32})"/>
59+
/// <seealso cref="Microsoft.ML.PcaCatalog.RandomizedPca(Microsoft.ML.AnomalyDetectionCatalog.AnomalyDetectionTrainers,Microsoft.ML.Trainers.RandomizedPcaTrainer.Options)"/>
60+
/// <seealso cref="Options"/>
4261
public sealed class RandomizedPcaTrainer : TrainerEstimatorBase<AnomalyPredictionTransformer<PcaModelParameters>, PcaModelParameters>
4362
{
4463
internal const string LoadNameValue = "pcaAnomaly";

0 commit comments

Comments
 (0)