Beispiel #1
0
 /// <summary>
 /// Normalize (rescale) the column according to the specified <paramref name="mode"/>.
 /// </summary>
 /// <param name="catalog">The transform catalog</param>
 /// <param name="inputName">The column name</param>
 /// <param name="outputName">The column name</param>
 /// <param name="mode">The <see cref="NormalizingEstimator.NormalizerMode"/> used to map the old values in the new scale. </param>
 /// <example>
 /// <format type="text/markdown">
 /// <![CDATA[
 /// [!code-csharp[Normalize](~/../docs/samples/docs/samples/Microsoft.ML.Samples/Dynamic/Normalizer.cs)]
 /// ]]>
 /// </format>
 /// </example>
 public static NormalizingEstimator Normalize(this TransformsCatalog catalog,
                                              string inputName,
                                              string outputName = null,
                                              NormalizingEstimator.NormalizerMode mode = NormalizingEstimator.NormalizerMode.MinMax)
 => new NormalizingEstimator(CatalogUtils.GetEnvironment(catalog), inputName, outputName, mode);
Beispiel #2
0
 /// <summary>
 /// Normalize (rescale) several columns according to the specified <paramref name="mode"/>.
 /// </summary>
 /// <param name="catalog">The transform catalog</param>
 /// <param name="mode">The <see cref="NormalizingEstimator.NormalizerMode"/> used to map the old values to the new ones. </param>
 /// <param name="columns">The pairs of input and output columns.</param>
 /// <example>
 /// <format type="text/markdown">
 /// <![CDATA[
 /// [!code-csharp[Normalize](~/../docs/samples/docs/samples/Microsoft.ML.Samples/Dynamic/Normalizer.cs)]
 /// ]]>
 /// </format>
 /// </example>
 public static NormalizingEstimator Normalize(this TransformsCatalog catalog,
                                              NormalizingEstimator.NormalizerMode mode,
                                              params (string input, string output)[] columns)
 /// <summary>
 /// Normalize (rescale) several columns according to the specified <paramref name="mode"/>.
 /// </summary>
 /// <param name="catalog">The transform catalog</param>
 /// <param name="mode">The <see cref="NormalizingEstimator.NormalizerMode"/> used to map the old values to the new ones. </param>
 /// <param name="columns">The pairs of input and output columns.</param>
 /// <example>
 /// <format type="text/markdown">
 /// <![CDATA[
 /// [!code-csharp[Normalize](~/../docs/samples/docs/samples/Microsoft.ML.Samples/Dynamic/Normalizer.cs)]
 /// ]]>
 /// </format>
 /// </example>
 public static NormalizingEstimator Normalize(this TransformsCatalog catalog,
                                              NormalizingEstimator.NormalizerMode mode,
                                              params SimpleColumnInfo[] columns)
 => new NormalizingEstimator(CatalogUtils.GetEnvironment(catalog), mode, SimpleColumnInfo.ConvertToValueTuples(columns));