Changeset 15865 for branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/ZNormalizationTransformation.cs
 Timestamp:
 03/27/18 15:46:12 (3 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/ZNormalizationTransformation.cs
r15846 r15865 29 29 30 30 namespace HeuristicLab.Problems.DataAnalysis { 31 [Item("ZScore Normalization", "ZScore normalization transformation to standardize (target_mu = 0, target_sigma = 1) the values")]31 [Item("ZScore Normalization", "ZScore normalization transformation to standardize the values to a Target Mean and Target Standard Deviation.")] 32 32 [StorableClass] 33 33 public class ZNormalizationTransformation : Transformation<double> { … … 58 58 public double OriginalMean { 59 59 get { return OriginalMeanParameter.Value.Value; } 60 set { OriginalMeanParameter.Value.Value = value; }60 private set { OriginalMeanParameter.Value.Value = value; } 61 61 } 62 62 public double OriginalStandardDeviation { 63 63 get { return OriginalStandardDeviationParameter.Value.Value; } 64 set { OriginalStandardDeviationParameter.Value.Value = value; }64 private set { OriginalStandardDeviationParameter.Value.Value = value; } 65 65 } 66 66 #endregion … … 103 103 104 104 public override IEnumerable<double> Apply(IEnumerable<double> data) { 105 if (double.IsNaN(OriginalMean)  double.IsNaN(OriginalStandardDeviation)) 105 if (double.IsNaN(OriginalMean)  double.IsNaN(OriginalStandardDeviation)) //TODO isConfigured field? 106 106 Configure(data); 107 107 … … 112 112 return InverseApply(data, TargetMean, TargetStandardDeviation, OriginalMean, OriginalStandardDeviation); 113 113 } 114 114 115 115 116 public static IEnumerable<double> Apply(IEnumerable<double> data, double targetMean, double targetStandardDeviation, double originalMean = double.NaN, double originalStandardDeviation = double.NaN) {
Note: See TracChangeset
for help on using the changeset viewer.