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/ExponentialTransformation.cs

    r15847 r15865  
    4949    public ExponentialTransformation()
    5050      : base() {
    51       Parameters.Add(new FixedValueParameter<DoubleValue>("Base", "Base the logarithm", new DoubleValue(Math.E)));
     51      Parameters.Add(new FixedValueParameter<DoubleValue>("Base", "", new DoubleValue(Math.E)));
    5252    }
    5353
     
    6565    #endregion
    6666
    67     public override bool Check(IEnumerable<double> data, out string errorMessage) {
    68       if (data.Any(x => x <= 0)) {
    69         errorMessage = "Log is not available for zero or negative values";
    70         return false;
    71       }
    72       return base.Check(data, out errorMessage);
    73     }
    74 
    7567    public override IEnumerable<double> Apply(IEnumerable<double> data) {
    7668      return Apply(data, Base);
     
    8072      return InverseApply(data, Base);
    8173    }
     74
    8275
    8376    public static IEnumerable<double> Apply(IEnumerable<double> data, double @base = Math.E) {
Note: See TracChangeset for help on using the changeset viewer.