Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/06/17 11:12:18 (7 years ago)
Author:
gkronber
Message:

#2697: merged r14843 (resolving conflicts in csproj file for HL.Algorithms.DataAnalysis because MCTS has been removed)

Location:
stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/LinearTransformation.cs

    r14186 r15142  
    5252    public double Multiplier {
    5353      get { return MultiplierParameter.Value.Value; }
    54       protected set {
     54      set {
    5555        MultiplierParameter.Value.Value = value;
    5656      }
     
    5959    public double Addend {
    6060      get { return AddendParameter.Value.Value; }
    61       protected set {
     61      set {
    6262        AddendParameter.Value.Value = value;
    6363      }
  • stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/ShiftStandardDistributionTransformation.cs

    r12667 r15142  
    7171
    7272    public override IEnumerable<double> Apply(IEnumerable<double> data) {
    73       ConfigureParameters(data);
    7473      if (OriginalStandardDeviation.IsAlmost(0.0)) {
    7574        return data;
     
    9493    }
    9594
    96     protected void ConfigureParameters(IEnumerable<double> data) {
     95    public override void ConfigureParameters(IEnumerable<double> data) {
    9796      OriginalStandardDeviation = data.StandardDeviation();
    9897      OriginalMean = data.Average();
  • stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/ShiftToRangeTransformation.cs

    r12667 r15142  
    4444    }
    4545
    46     public override IEnumerable<double> Apply(IEnumerable<double> data) {
    47       ConfigureParameters(data);
    48       return base.Apply(data);
    49     }
    50 
    5146    public override bool Check(IEnumerable<double> data, out string errorMsg) {
    5247      ConfigureParameters(data);
     
    5449    }
    5550
    56     protected void ConfigureParameters(IEnumerable<double> data) {
     51    public override void ConfigureParameters(IEnumerable<double> data) {
    5752      double originalRangeStart = data.Min();
    5853      double originalRangeEnd = data.Max();
  • stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/Transformation.cs

    r14186 r15142  
    6666    protected Transformation(IEnumerable<string> allowedColumns) : base(allowedColumns) { }
    6767
     68    public virtual void ConfigureParameters(IEnumerable<T> data) {
     69      // override in transformations with parameters
     70    }
     71
    6872    public abstract IEnumerable<T> Apply(IEnumerable<T> data);
     73    public IEnumerable<T> ConfigureAndApply(IEnumerable<T> data) {
     74      ConfigureParameters(data);
     75      return Apply(data);
     76    }
    6977
    7078    public abstract bool Check(IEnumerable<T> data, out string errorMsg);
Note: See TracChangeset for help on using the changeset viewer.