Ignore:
Timestamp:
03/27/18 15:46:12 (3 years ago)
Author:
pfleck
Message:

#2906 Added PreprocessingTransformation as a custom view-model for transformations in preprocessing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/ZNormalizationTransformation.cs

    r15846 r15865  
    2929
    3030namespace HeuristicLab.Problems.DataAnalysis {
    31   [Item("Z-Score Normalization", "Z-Score normalization transformation to standardize (target_mu = 0, target_sigma = 1) the values")]
     31  [Item("Z-Score Normalization", "Z-Score normalization transformation to standardize the values to a Target Mean and Target Standard Deviation.")]
    3232  [StorableClass]
    3333  public class ZNormalizationTransformation : Transformation<double> {
     
    5858    public double OriginalMean {
    5959      get { return OriginalMeanParameter.Value.Value; }
    60       set { OriginalMeanParameter.Value.Value = value; }
     60      private set { OriginalMeanParameter.Value.Value = value; }
    6161    }
    6262    public double OriginalStandardDeviation {
    6363      get { return OriginalStandardDeviationParameter.Value.Value; }
    64       set { OriginalStandardDeviationParameter.Value.Value = value; }
     64      private set { OriginalStandardDeviationParameter.Value.Value = value; }
    6565    }
    6666    #endregion
     
    103103
    104104    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?
    106106        Configure(data);
    107107
     
    112112      return InverseApply(data, TargetMean, TargetStandardDeviation, OriginalMean, OriginalStandardDeviation);
    113113    }
     114
    114115
    115116    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.