Skip to content

Commit 270df4f

Browse files
authored
XML documentation for Normalizer (#3432)
* XML documentation for Normalizer Tracked in #3204
1 parent 1fd8971 commit 270df4f

File tree

2 files changed

+89
-27
lines changed

2 files changed

+89
-27
lines changed

src/Microsoft.ML.Data/Transforms/Normalizer.cs

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,43 @@
2626

2727
namespace Microsoft.ML.Transforms
2828
{
29+
/// <summary>
30+
/// <see cref="IEstimator{TTransformer}"/> for the <see cref="NormalizingTransformer"/>.
31+
/// </summary>
32+
/// <remarks>
33+
/// <format type="text/markdown"><![CDATA[
34+
///
35+
/// ### Estimator Characteristics
36+
/// | | |
37+
/// | -- | -- |
38+
/// | Does this estimator need to look at the data to train its parameters? | Yes |
39+
/// | Input column data type | <xref:System.Single> or <xref:System.Double> or a known-sized vector of those types. |
40+
/// | Output column data type | The same data type as the input column |
41+
///
42+
/// The resulting NormalizingEstimator will normalize the data in one of the following ways based upon how it was created:
43+
/// * Min Max - A linear rescale that is based upon the minimum and maximum values for each row.
44+
/// * Mean Variance - Rescale each row to unit variance and, optionally, zero mean.
45+
/// * Log Mean Variance - Rescale each row to unit variance based on a log scale.
46+
/// * Binning - Bucketizes the data in each row and performs a linear rescale based on the calculated bins.
47+
/// * Supervised Binning - Bucketize the data in each row and performas a linear rescale based on the calculated bins. The bin calculation is based on correlation of the Label column.
48+
///
49+
/// ### Estimator Details
50+
/// The interval of the normalized data depends on whether fixZero is specified or not. fixZero defaults to true.
51+
/// When fixZero is false, the normalized interval is $[0,1]$ and the distribution of the normalized values depends on the normalization mode. For example, with Min Max, the minimum
52+
/// and maximum values are mapped to 0 and 1 respectively and remaining values fall in between.
53+
/// When fixZero is set, the normalized interval is $[-1,1]$ with the distribution of the normalized values depending on the normalization mode, but the behavior is different.
54+
/// With Min Max, the distribution depends on how far away the number is from 0, resulting in the number with the largest distance being mapped to 1 if its a positive number
55+
/// or -1 if its a negative number. The distance from 0 will affect the distribution with a majority of numbers that are closer together normalizing towards 0.
56+
///
57+
/// To create this estimator use one of the following:
58+
/// * [NormalizeMinMax](xref:Microsoft.ML.NormalizationCatalog.NormalizeMinMax(Microsoft.ML.TransformsCatalog, System.String, System.String, System.Int64, System.Boolean))
59+
/// * [NormalizeMeanVariance](xref:Microsoft.ML.NormalizationCatalog.NormalizeMeanVariance(Microsoft.ML.TransformsCatalog,System.String,System.String,System.Int64,System.Boolean,System.Boolean))
60+
/// * [NormalizeLogMeanVariance](xref:Microsoft.ML.NormalizationCatalog.NormalizeLogMeanVariance(Microsoft.ML.TransformsCatalog,System.String,System.String,System.Int64,System.Boolean))
61+
/// * [NormalizeBinning](xref:Microsoft.ML.NormalizationCatalog.NormalizeBinning(Microsoft.ML.TransformsCatalog,System.String,System.String,System.Int64,System.Boolean,System.Int32))
62+
/// * [NormalizeSupervisedBinning](xref:Microsoft.ML.NormalizationCatalog.NormalizeSupervisedBinning(Microsoft.ML.TransformsCatalog,System.String,System.String,System.String,System.Int64,System.Boolean,System.Int32,System.Int32))
63+
/// ]]>
64+
/// </format>
65+
/// </remarks>
2966
public sealed class NormalizingEstimator : IEstimator<NormalizingTransformer>
3067
{
3168
[BestFriend]
@@ -284,6 +321,9 @@ public SchemaShape GetOutputSchema(SchemaShape inputSchema)
284321
}
285322
}
286323

324+
/// <summary>
325+
/// <see cref="ITransformer"/> resulting from fitting an <see cref="NormalizingEstimator"/>.
326+
/// </summary>
287327
public sealed partial class NormalizingTransformer : OneToOneTransformerBase
288328
{
289329
internal const string LoaderSignature = "Normalizer";

0 commit comments

Comments
 (0)