Changeset 14400 for trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations
- Timestamp:
- 11/17/16 15:41:33 (8 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/LinearTransformation.cs
r14393 r14400 52 52 public double Multiplier { 53 53 get { return MultiplierParameter.Value.Value; } 54 set {54 protected set { 55 55 MultiplierParameter.Value.Value = value; 56 56 } … … 59 59 public double Addend { 60 60 get { return AddendParameter.Value.Value; } 61 set {61 protected set { 62 62 AddendParameter.Value.Value = value; 63 63 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/ShiftStandardDistributionTransformation.cs
r14393 r14400 71 71 72 72 public override IEnumerable<double> Apply(IEnumerable<double> data) { 73 ConfigureParameters(data); 73 74 if (OriginalStandardDeviation.IsAlmost(0.0)) { 74 75 return data; … … 93 94 } 94 95 95 p ublic overridevoid ConfigureParameters(IEnumerable<double> data) {96 protected void ConfigureParameters(IEnumerable<double> data) { 96 97 OriginalStandardDeviation = data.StandardDeviation(); 97 98 OriginalMean = data.Average(); -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/ShiftToRangeTransformation.cs
r14393 r14400 44 44 } 45 45 46 public override IEnumerable<double> Apply(IEnumerable<double> data) { 47 ConfigureParameters(data); 48 return base.Apply(data); 49 } 50 46 51 public override bool Check(IEnumerable<double> data, out string errorMsg) { 47 52 ConfigureParameters(data); … … 49 54 } 50 55 51 p ublic overridevoid ConfigureParameters(IEnumerable<double> data) {56 protected void ConfigureParameters(IEnumerable<double> data) { 52 57 double originalRangeStart = data.Min(); 53 58 double originalRangeEnd = data.Max(); -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/Transformation.cs
r14393 r14400 66 66 protected Transformation(IEnumerable<string> allowedColumns) : base(allowedColumns) { } 67 67 68 public virtual void ConfigureParameters(IEnumerable<T> data) {69 // override in transformations with parameters70 }71 72 68 public abstract IEnumerable<T> Apply(IEnumerable<T> data); 73 public IEnumerable<T> ConfigureAndApply(IEnumerable<T> data) {74 ConfigureParameters(data);75 return Apply(data);76 }77 69 78 70 public abstract bool Check(IEnumerable<T> data, out string errorMsg);
Note: See TracChangeset
for help on using the changeset viewer.