3 instantiations of NormalizingTransformer
Microsoft.ML.Data (3)
Transforms\Normalizer.cs (3)
608
return new
NormalizingTransformer
(env, result);
660
return new
NormalizingTransformer
(env.Register(nameof(NormalizingTransformer)), ctx);
671
var transformer = new
NormalizingTransformer
(env.Register(nameof(NormalizingTransformer)), ctx, input);
160 references to NormalizingTransformer
Microsoft.ML.Data (42)
Transforms\NormalizeColumn.cs (12)
49
/// and <see cref="
NormalizingTransformer
"/> rather than this structure.
428
public abstract
NormalizingTransformer
.NormalizerModelParametersBase GetNormalizerModelParams();
470
public override
NormalizingTransformer
.NormalizerModelParametersBase GetNormalizerModelParams()
471
=> new
NormalizingTransformer
.AffineNormalizerModelParameters<TFloat>(Scale, Offset);
518
public override
NormalizingTransformer
.NormalizerModelParametersBase GetNormalizerModelParams()
519
=> new
NormalizingTransformer
.AffineNormalizerModelParameters<ImmutableArray<TFloat>>(ImmutableArray.Create(Scale), ImmutableArray.Create(Offset));
547
public abstract
NormalizingTransformer
.NormalizerModelParametersBase GetNormalizerModelParams();
593
public override
NormalizingTransformer
.NormalizerModelParametersBase GetNormalizerModelParams()
594
=> new
NormalizingTransformer
.CdfNormalizerModelParameters<TFloat>(Mean, Stddev, UseLog);
637
public override
NormalizingTransformer
.NormalizerModelParametersBase GetNormalizerModelParams()
638
=> new
NormalizingTransformer
.CdfNormalizerModelParameters<ImmutableArray<TFloat>>(ImmutableArray.Create(Mean), ImmutableArray.Create(Stddev), UseLog);
683
public abstract
NormalizingTransformer
.NormalizerModelParametersBase GetNormalizerModelParams();
Transforms\NormalizeColumnDbl.cs (4)
1226
public override
NormalizingTransformer
.NormalizerModelParametersBase GetNormalizerModelParams()
1227
=> new
NormalizingTransformer
.BinNormalizerModelParameters<TFloat>(ImmutableArray.Create(_binUpperBounds), _den, _offset);
1376
public override
NormalizingTransformer
.NormalizerModelParametersBase GetNormalizerModelParams()
1377
=> new
NormalizingTransformer
.BinNormalizerModelParameters<ImmutableArray<TFloat>>(_binUpperBounds.Select(b => ImmutableArray.Create(b)).ToImmutableArray(),
Transforms\NormalizeColumnSng.cs (4)
1387
public override
NormalizingTransformer
.NormalizerModelParametersBase GetNormalizerModelParams()
1388
=> new
NormalizingTransformer
.BinNormalizerModelParameters<TFloat>(ImmutableArray.Create(_binUpperBounds), _den, _offset);
1538
public override
NormalizingTransformer
.NormalizerModelParametersBase GetNormalizerModelParams()
1539
=> new
NormalizingTransformer
.BinNormalizerModelParameters<ImmutableArray<TFloat>>(
Transforms\Normalizer.cs (21)
19
[assembly: LoadableClass(typeof(
NormalizingTransformer
), null, typeof(SignatureLoadModel),
20
"",
NormalizingTransformer
.LoaderSignature)]
22
[assembly: LoadableClass(typeof(IRowMapper), typeof(
NormalizingTransformer
), null, typeof(SignatureLoadRowMapper),
23
"",
NormalizingTransformer
.LoaderSignature)]
25
[assembly: LoadableClass(typeof(IDataTransform), typeof(
NormalizingTransformer
), null, typeof(SignatureLoadDataTransform),
26
"",
NormalizingTransformer
.LoaderSignature, "NormalizeTransform")]
31
/// <see cref="IEstimator{TTransformer}"/> for the <see cref="
NormalizingTransformer
"/>.
80
public sealed class NormalizingEstimator : IEstimator<
NormalizingTransformer
>
332
/// Trains and returns a <see cref="
NormalizingTransformer
"/>.
334
public
NormalizingTransformer
Fit(IDataView input)
337
return
NormalizingTransformer
.Train(_host, input, _columns);
392
loaderAssemblyName: typeof(
NormalizingTransformer
).Assembly.FullName);
404
loaderAssemblyName: typeof(
NormalizingTransformer
).Assembly.FullName);
525
: base(env.Register(nameof(
NormalizingTransformer
)), columns.Select(x => (x.Name, x.InputColumnName)).ToArray())
531
internal static
NormalizingTransformer
Train(IHostEnvironment env, IDataView data, NormalizingEstimator.ColumnOptionsBase[] columns)
655
private static
NormalizingTransformer
Create(IHostEnvironment env, ModelLoadContext ctx)
660
return new NormalizingTransformer(env.Register(nameof(
NormalizingTransformer
)), ctx);
671
var
transformer = new NormalizingTransformer(env.Register(nameof(
NormalizingTransformer
)), ctx, input);
722
private readonly
NormalizingTransformer
_parent;
727
public Mapper(
NormalizingTransformer
parent, DataViewSchema schema)
Transforms\NormalizeUtils.cs (1)
70
NormalizingTransformer
.NormalizerModelParametersBase GetNormalizerModelParams();
Microsoft.ML.IntegrationTests (9)
IntrospectiveTraining.cs (2)
271
var
normalizer = model.LastTransformer;
275
var config = normalizer.GetNormalizerModelParameters(0) as
NormalizingTransformer
.AffineNormalizerModelParameters<ImmutableArray<float>>;
ModelFiles.cs (7)
332
var
model = pipeline.Fit(data);
416
Assert.IsType<
NormalizingTransformer
>(Assert.Single(compositeLoader.Transformer));
428
var
model = estimator.Fit(data);
443
Assert.IsType<
NormalizingTransformer
>(loadedWithSchema);
444
Assert.IsType<
NormalizingTransformer
>(loadedWithLoader);
460
var
model = estimator.Fit(loader.Load(file));
467
Assert.True(loadedWithSchema is
NormalizingTransformer
);
Microsoft.ML.Samples (25)
Dynamic\Transforms\NormalizeBinning.cs (3)
7
using static Microsoft.ML.Transforms.
NormalizingTransformer
;
45
var
normalizeTransform = normalize.Fit(data);
47
var
normalizeFixZeroTransform = normalizeFixZero.Fit(data);
Dynamic\Transforms\NormalizeBinningMulticolumn.cs (2)
7
using static Microsoft.ML.Transforms.
NormalizingTransformer
;
46
var
normalizeTransform = normalize.Fit(data);
Dynamic\Transforms\NormalizeLogMeanVariance.cs (3)
7
using static Microsoft.ML.Transforms.
NormalizingTransformer
;
43
var
normalizeTransform = normalize.Fit(data);
45
var
normalizeNoCdfTransform = normalizeNoCdf.Fit(data);
Dynamic\Transforms\NormalizeLogMeanVarianceFixZero.cs (3)
7
using static Microsoft.ML.Transforms.
NormalizingTransformer
;
36
var
normalizeTransform = normalize.Fit(data);
38
var
normalizeNoCdfTransform = normalizeNoCdf.Fit(data);
Dynamic\Transforms\NormalizeMeanVariance.cs (3)
7
using static Microsoft.ML.Transforms.
NormalizingTransformer
;
42
var
normalizeTransform = normalize.Fit(data);
44
var
normalizeNoCdfTransform = normalizeNoCdf.Fit(data);
Dynamic\Transforms\NormalizeMinMax.cs (3)
7
using static Microsoft.ML.Transforms.
NormalizingTransformer
;
41
var
normalizeTransform = normalize.Fit(data);
43
var
normalizeFixZeroTransform = normalizeFixZero.Fit(data);
Dynamic\Transforms\NormalizeMinMaxMulticolumn.cs (3)
7
using static Microsoft.ML.Transforms.
NormalizingTransformer
;
65
var
normalizeTransform = normalize.Fit(data);
67
var
normalizeFixZeroTransform = normalizeFixZero.Fit(data);
Dynamic\Transforms\NormalizeSupervisedBinning.cs (3)
7
using static Microsoft.ML.Transforms.
NormalizingTransformer
;
59
var
normalizeTransform = normalize.Fit(data);
61
var
normalizeFixZeroTransform = normalizeFixZero.Fit(data);
Dynamic\WithOnFitDelegate.cs (2)
8
using static Microsoft.ML.Transforms.
NormalizingTransformer
;
42
NormalizingTransformer
binningTransformer = null;
Microsoft.ML.Tests (84)
OnnxConversionTest.cs (1)
276
private (IDataView, List<IEstimator<ITransformer>>, EstimatorChain<
NormalizingTransformer
>) GetEstimatorsForOnnxConversionTests()
Scenarios\Api\CookbookSamples\CookbookSamplesDynamicApi.cs (2)
19
using static Microsoft.ML.Transforms.
NormalizingTransformer
;
100
NormalizingTransformer
binningTransformer = null;
Transformers\NormalizerTests.cs (81)
22
using static Microsoft.ML.Transforms.
NormalizingTransformer
;
139
var
transformer = est.Fit(data);
141
var floatAffineData = transformer.Columns[0].ModelParameters as
NormalizingTransformer
.AffineNormalizerModelParameters<float>;
145
var floatAffineDataVec = transformer.Columns[1].ModelParameters as
NormalizingTransformer
.AffineNormalizerModelParameters<ImmutableArray<float>>;
149
var doubleAffineData = transformer.Columns[2].ModelParameters as
NormalizingTransformer
.AffineNormalizerModelParameters<double>;
153
var doubleAffineDataVec = transformer.Columns[3].ModelParameters as
NormalizingTransformer
.AffineNormalizerModelParameters<ImmutableArray<double>>;
157
var floatBinData = transformer.Columns[4].ModelParameters as
NormalizingTransformer
.BinNormalizerModelParameters<float>;
162
var floatBinDataVec = transformer.Columns[5].ModelParameters as
NormalizingTransformer
.BinNormalizerModelParameters<ImmutableArray<float>>;
168
var doubleBinData = transformer.Columns[6].ModelParameters as
NormalizingTransformer
.BinNormalizerModelParameters<double>;
173
var doubleBinDataVec = transformer.Columns[7].ModelParameters as
NormalizingTransformer
.BinNormalizerModelParameters<ImmutableArray<double>>;
178
var floatCdfMeanData = transformer.Columns[8].ModelParameters as
NormalizingTransformer
.AffineNormalizerModelParameters<float>;
182
var floatCdfMeanDataVec = transformer.Columns[9].ModelParameters as
NormalizingTransformer
.AffineNormalizerModelParameters<ImmutableArray<float>>;
187
var doubleCdfMeanData = transformer.Columns[10].ModelParameters as
NormalizingTransformer
.AffineNormalizerModelParameters<double>;
191
var doubleCdfMeanDataVec = transformer.Columns[11].ModelParameters as
NormalizingTransformer
.AffineNormalizerModelParameters<ImmutableArray<double>>;
195
var floatCdfLogMeanData = transformer.Columns[12].ModelParameters as
NormalizingTransformer
.CdfNormalizerModelParameters<float>;
200
var floatCdfLogMeanDataVec = transformer.Columns[13].ModelParameters as
NormalizingTransformer
.CdfNormalizerModelParameters<ImmutableArray<float>>;
205
var doubleCdfLogMeanData = transformer.Columns[14].ModelParameters as
NormalizingTransformer
.CdfNormalizerModelParameters<double>;
210
var doubleCdfLogMeanDataVec = transformer.Columns[15].ModelParameters as
NormalizingTransformer
.CdfNormalizerModelParameters<ImmutableArray<double>>;
258
var floatAffineModel = ((
NormalizingTransformer
)transformers[0]).Columns[0].ModelParameters as
NormalizingTransformer
.AffineNormalizerModelParameters<float>;
262
var floatAffineModelVec = ((
NormalizingTransformer
)transformers[0]).Columns[1].ModelParameters as
NormalizingTransformer
.AffineNormalizerModelParameters<ImmutableArray<float>>;
266
var doubleAffineModel = ((
NormalizingTransformer
)transformers[0]).Columns[2].ModelParameters as
NormalizingTransformer
.AffineNormalizerModelParameters<double>;
270
var doubleAffineModelVector = ((
NormalizingTransformer
)transformers[0]).Columns[3].ModelParameters as
NormalizingTransformer
.AffineNormalizerModelParameters<ImmutableArray<double>>;
276
var floatBinModel = ((
NormalizingTransformer
)transformers[1]).Columns[0].ModelParameters as
NormalizingTransformer
.BinNormalizerModelParameters<float>;
283
var floatBinModelVector = ((
NormalizingTransformer
)transformers[1]).Columns[1].ModelParameters as
NormalizingTransformer
.BinNormalizerModelParameters<ImmutableArray<float>>;
293
var doubleBinModel = ((
NormalizingTransformer
)transformers[1]).Columns[2].ModelParameters as
NormalizingTransformer
.BinNormalizerModelParameters<double>;
300
var doubleBinModelVector = ((
NormalizingTransformer
)transformers[1]).Columns[3].ModelParameters as
NormalizingTransformer
.BinNormalizerModelParameters<ImmutableArray<double>>;
309
var floatCdfMeanModel = ((
NormalizingTransformer
)transformers[2]).Columns[0].ModelParameters as
NormalizingTransformer
.AffineNormalizerModelParameters<float>;
313
var floatCdfMeanModelVector = ((
NormalizingTransformer
)transformers[2]).Columns[1].ModelParameters as
NormalizingTransformer
.AffineNormalizerModelParameters<ImmutableArray<float>>;
319
var doubleCdfMeanModel = ((
NormalizingTransformer
)transformers[2]).Columns[2].ModelParameters as
NormalizingTransformer
.AffineNormalizerModelParameters<double>;
323
var doubleCdfMeanModelVector = ((
NormalizingTransformer
)transformers[2]).Columns[3].ModelParameters as
NormalizingTransformer
.AffineNormalizerModelParameters<ImmutableArray<double>>;
329
var floatCdfLogMeanModel = ((
NormalizingTransformer
)transformers[3]).Columns[0].ModelParameters as
NormalizingTransformer
.CdfNormalizerModelParameters<float>;
334
var floatCdfLogMeanModelVector = ((
NormalizingTransformer
)transformers[3]).Columns[1].ModelParameters as
NormalizingTransformer
.CdfNormalizerModelParameters<ImmutableArray<float>>;
343
var doubleCdfLogMeanModel = ((
NormalizingTransformer
)transformers[3]).Columns[2].ModelParameters as
NormalizingTransformer
.CdfNormalizerModelParameters<double>;
348
var doubleCdfLogMeanModelVector = ((
NormalizingTransformer
)transformers[3]).Columns[3].ModelParameters as
NormalizingTransformer
.CdfNormalizerModelParameters<ImmutableArray<double>>;
357
floatBinModel = ((
NormalizingTransformer
)transformers[4]).Columns[0].ModelParameters as
NormalizingTransformer
.BinNormalizerModelParameters<float>;
364
floatBinModelVector = ((
NormalizingTransformer
)transformers[4]).Columns[1].ModelParameters as
NormalizingTransformer
.BinNormalizerModelParameters<ImmutableArray<float>>;
374
doubleBinModel = ((
NormalizingTransformer
)transformers[4]).Columns[2].ModelParameters as
NormalizingTransformer
.BinNormalizerModelParameters<double>;
381
doubleBinModelVector = ((
NormalizingTransformer
)transformers[4]).Columns[3].ModelParameters as
NormalizingTransformer
.BinNormalizerModelParameters<ImmutableArray<double>>;
395
var
robustScalerTransformer = robustScalerEstimator.Fit(data);
397
floatAffineModel = ((
NormalizingTransformer
)robustScalerTransformer).Columns[0].ModelParameters as
NormalizingTransformer
.AffineNormalizerModelParameters<float>;
401
floatAffineModelVec = ((
NormalizingTransformer
)robustScalerTransformer).Columns[1].ModelParameters as
NormalizingTransformer
.AffineNormalizerModelParameters<ImmutableArray<float>>;
413
doubleAffineModel = ((
NormalizingTransformer
)robustScalerTransformer).Columns[2].ModelParameters as
NormalizingTransformer
.AffineNormalizerModelParameters<double>;
417
doubleAffineModelVector = ((
NormalizingTransformer
)robustScalerTransformer).Columns[3].ModelParameters as
NormalizingTransformer
.AffineNormalizerModelParameters<ImmutableArray<double>>;
437
floatAffineModel = ((
NormalizingTransformer
)robustScalerTransformer).Columns[0].ModelParameters as
NormalizingTransformer
.AffineNormalizerModelParameters<float>;
441
floatAffineModelVec = ((
NormalizingTransformer
)robustScalerTransformer).Columns[1].ModelParameters as
NormalizingTransformer
.AffineNormalizerModelParameters<ImmutableArray<float>>;
450
doubleAffineModel = ((
NormalizingTransformer
)robustScalerTransformer).Columns[2].ModelParameters as
NormalizingTransformer
.AffineNormalizerModelParameters<double>;
454
doubleAffineModelVector = ((
NormalizingTransformer
)robustScalerTransformer).Columns[3].ModelParameters as
NormalizingTransformer
.AffineNormalizerModelParameters<ImmutableArray<double>>;
643
var
t = est.Fit(data);
914
var
normalizeTransform = normalize.Fit(data);
916
var
normalizeNoCdfTransform = normalizeNoCdf.Fit(data);
955
var
normalizeTransform = normalize.Fit(data);
957
var
normalizeNoCdfTransform = normalizeNoCdf.Fit(data);
1055
var
model = ML.Transforms.NormalizeMinMax("output", "input").Fit(data);