Changeset 14393 for trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations
- Timestamp:
- 11/15/16 21:23:43 (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
r14185 r14393 52 52 public double Multiplier { 53 53 get { return MultiplierParameter.Value.Value; } 54 protectedset {54 set { 55 55 MultiplierParameter.Value.Value = value; 56 56 } … … 59 59 public double Addend { 60 60 get { return AddendParameter.Value.Value; } 61 protectedset {61 set { 62 62 AddendParameter.Value.Value = value; 63 63 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/ShiftStandardDistributionTransformation.cs
r12612 r14393 71 71 72 72 public override IEnumerable<double> Apply(IEnumerable<double> data) { 73 ConfigureParameters(data);74 73 if (OriginalStandardDeviation.IsAlmost(0.0)) { 75 74 return data; … … 94 93 } 95 94 96 p rotectedvoid ConfigureParameters(IEnumerable<double> data) {95 public override void ConfigureParameters(IEnumerable<double> data) { 97 96 OriginalStandardDeviation = data.StandardDeviation(); 98 97 OriginalMean = data.Average(); -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/ShiftToRangeTransformation.cs
r12612 r14393 44 44 } 45 45 46 public override IEnumerable<double> Apply(IEnumerable<double> data) {47 ConfigureParameters(data);48 return base.Apply(data);49 }50 51 46 public override bool Check(IEnumerable<double> data, out string errorMsg) { 52 47 ConfigureParameters(data); … … 54 49 } 55 50 56 p rotectedvoid ConfigureParameters(IEnumerable<double> data) {51 public override void ConfigureParameters(IEnumerable<double> data) { 57 52 double originalRangeStart = data.Min(); 58 53 double originalRangeEnd = data.Max(); -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/Transformation.cs
r14185 r14393 66 66 protected Transformation(IEnumerable<string> allowedColumns) : base(allowedColumns) { } 67 67 68 public virtual void ConfigureParameters(IEnumerable<T> data) { 69 // override in transformations with parameters 70 } 71 68 72 public abstract IEnumerable<T> Apply(IEnumerable<T> data); 73 public IEnumerable<T> ConfigureAndApply(IEnumerable<T> data) { 74 ConfigureParameters(data); 75 return Apply(data); 76 } 69 77 70 78 public abstract bool Check(IEnumerable<T> data, out string errorMsg);
Note: See TracChangeset
for help on using the changeset viewer.