Changeset 14376
- Timestamp:
- 11/07/16 14:06:02 (8 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/ClassificationPerformanceMeasuresCalculator.cs
r14294 r14376 25 25 26 26 namespace HeuristicLab.Problems.DataAnalysis { 27 public class ClassificationPerformanceMeasuresCalculator : IDeepCloneable {27 public class ClassificationPerformanceMeasuresCalculator : DeepCloneable { 28 28 29 29 public ClassificationPerformanceMeasuresCalculator(string positiveClassName, double positiveClassValue) { … … 33 33 } 34 34 35 protected ClassificationPerformanceMeasuresCalculator(ClassificationPerformanceMeasuresCalculator original, Cloner cloner = null) {35 protected ClassificationPerformanceMeasuresCalculator(ClassificationPerformanceMeasuresCalculator original, Cloner cloner) { 36 36 positiveClassName = original.positiveClassName; 37 37 positiveClassValue = original.positiveClassValue; … … 148 148 } 149 149 150 // IDeepCloneable interface members 151 public object Clone() { 152 return new ClassificationPerformanceMeasuresCalculator(this); 153 } 154 155 public IDeepCloneable Clone(Cloner cloner) { 156 var clone = cloner.GetClone(this); 157 if (clone == null) { 158 clone = new ClassificationPerformanceMeasuresCalculator(this); 159 cloner.RegisterClonedObject(this, clone); 160 } 161 return clone; 150 public override IDeepCloneable Clone(Cloner cloner) { 151 return new ClassificationPerformanceMeasuresCalculator(this, cloner); 162 152 } 163 153 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineBoundedMeanSquaredErrorCalculator.cs
r14294 r14376 25 25 26 26 namespace HeuristicLab.Problems.DataAnalysis { 27 public class OnlineBoundedMeanSquaredErrorCalculator : IOnlineCalculator, IDeepCloneable{27 public class OnlineBoundedMeanSquaredErrorCalculator : DeepCloneable, IOnlineCalculator { 28 28 29 29 private double errorSum; … … 45 45 } 46 46 47 protected OnlineBoundedMeanSquaredErrorCalculator(OnlineBoundedMeanSquaredErrorCalculator original, Cloner cloner = null) {47 protected OnlineBoundedMeanSquaredErrorCalculator(OnlineBoundedMeanSquaredErrorCalculator original, Cloner cloner) { 48 48 LowerBound = original.LowerBound; 49 49 UpperBound = original.UpperBound; … … 107 107 108 108 // IDeepCloneable interface members 109 public object Clone() { 110 return new OnlineBoundedMeanSquaredErrorCalculator(this); 111 } 112 113 public IDeepCloneable Clone(Cloner cloner) { 114 var clone = cloner.GetClone(this); 115 if (clone == null) { 116 clone = new OnlineBoundedMeanSquaredErrorCalculator(this); 117 cloner.RegisterClonedObject(this, clone); 118 } 119 return clone; 109 public override IDeepCloneable Clone(Cloner cloner) { 110 return new OnlineBoundedMeanSquaredErrorCalculator(this, cloner); 120 111 } 121 112 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineCovarianceCalculator.cs
r14294 r14376 25 25 26 26 namespace HeuristicLab.Problems.DataAnalysis { 27 public class OnlineCovarianceCalculator : IOnlineCalculator, IDeepCloneable{27 public class OnlineCovarianceCalculator : DeepCloneable, IOnlineCalculator { 28 28 29 29 private double xMean, yMean, Cn; … … 39 39 } 40 40 41 protected OnlineCovarianceCalculator(OnlineCovarianceCalculator other, Cloner cloner = null) {41 protected OnlineCovarianceCalculator(OnlineCovarianceCalculator other, Cloner cloner) { 42 42 Cn = other.Cn; 43 43 xMean = other.xMean; … … 104 104 } 105 105 106 // IDeepCloneable interface members 107 public object Clone() { 108 return new OnlineCovarianceCalculator(this); 109 } 110 111 public IDeepCloneable Clone(Cloner cloner) { 112 var clone = cloner.GetClone(this); 113 if (clone == null) { 114 clone = new OnlineCovarianceCalculator(this); 115 cloner.RegisterClonedObject(this, clone); 116 } 117 return clone; 106 public override IDeepCloneable Clone(Cloner cloner) { 107 return new OnlineCovarianceCalculator(this, cloner); 118 108 } 119 109 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineDirectionalSymmetryCalculator.cs
r14294 r14376 26 26 27 27 namespace HeuristicLab.Problems.DataAnalysis { 28 public class OnlineDirectionalSymmetryCalculator : IOnlineTimeSeriesCalculator, IDeepCloneable{28 public class OnlineDirectionalSymmetryCalculator : DeepCloneable, IOnlineTimeSeriesCalculator { 29 29 private int n; 30 30 private int nCorrect; … … 123 123 } 124 124 125 // IDeepCloneable interface members 126 public object Clone() { 127 return new OnlineDirectionalSymmetryCalculator(this); 128 } 129 130 public IDeepCloneable Clone(Cloner cloner) { 131 var clone = cloner.GetClone(this); 132 if (clone == null) { 133 clone = new OnlineDirectionalSymmetryCalculator(this); 134 cloner.RegisterClonedObject(this, clone); 135 } 136 return clone; 125 public override IDeepCloneable Clone(Cloner cloner) { 126 return new OnlineDirectionalSymmetryCalculator(this, cloner); 137 127 } 138 128 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineLinearScalingParameterCalculator.cs
r14294 r14376 25 25 26 26 namespace HeuristicLab.Problems.DataAnalysis { 27 public class OnlineLinearScalingParameterCalculator : IDeepCloneable {27 public class OnlineLinearScalingParameterCalculator : DeepCloneable { 28 28 29 29 /// <summary> … … 126 126 } 127 127 128 // IDeepCloneable interface members 129 public object Clone() { 130 var cloner = new Cloner(); 128 public override IDeepCloneable Clone(Cloner cloner) { 131 129 return new OnlineLinearScalingParameterCalculator(this, cloner); 132 }133 134 public IDeepCloneable Clone(Cloner cloner) {135 var clone = cloner.GetClone(this);136 if (clone == null) {137 clone = new OnlineLinearScalingParameterCalculator(this, cloner);138 cloner.RegisterClonedObject(this, clone);139 }140 return clone;141 130 } 142 131 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineMaxAbsoluteErrorCalculator.cs
r14294 r14376 25 25 26 26 namespace HeuristicLab.Problems.DataAnalysis { 27 public class OnlineMaxAbsoluteErrorCalculator : IOnlineCalculator, IDeepCloneable{27 public class OnlineMaxAbsoluteErrorCalculator : DeepCloneable, IOnlineCalculator { 28 28 29 29 private double mae; … … 96 96 } 97 97 98 // IDeepCloneable interface members 99 public object Clone() { 100 return new OnlineMaxAbsoluteErrorCalculator(this); 101 } 102 103 public IDeepCloneable Clone(Cloner cloner) { 104 var clone = cloner.GetClone(this); 105 if (clone == null) { 106 clone = new OnlineMaxAbsoluteErrorCalculator(this); 107 cloner.RegisterClonedObject(this, clone); 108 } 109 return clone; 98 public override IDeepCloneable Clone(Cloner cloner) { 99 return new OnlineMaxAbsoluteErrorCalculator(this, cloner); 110 100 } 111 101 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineMeanAbsoluteErrorCalculator.cs
r14294 r14376 25 25 26 26 namespace HeuristicLab.Problems.DataAnalysis { 27 public class OnlineMeanAbsoluteErrorCalculator : IOnlineCalculator, IDeepCloneable{27 public class OnlineMeanAbsoluteErrorCalculator : DeepCloneable, IOnlineCalculator { 28 28 29 29 private double sae; … … 95 95 } 96 96 97 // IDeepCloneable interface members 98 public object Clone() { 99 return new OnlineMeanAbsoluteErrorCalculator(this); 100 } 101 102 public IDeepCloneable Clone(Cloner cloner) { 103 var clone = cloner.GetClone(this); 104 if (clone == null) { 105 clone = new OnlineMeanAbsoluteErrorCalculator(this); 106 cloner.RegisterClonedObject(this, clone); 107 } 108 return clone; 97 public override IDeepCloneable Clone(Cloner cloner) { 98 return new OnlineMeanAbsoluteErrorCalculator(this, cloner); 109 99 } 110 100 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineMeanAbsolutePercentageErrorCalculator.cs
r14294 r14376 25 25 26 26 namespace HeuristicLab.Problems.DataAnalysis { 27 public class OnlineMeanAbsolutePercentageErrorCalculator : IOnlineCalculator, IDeepCloneable{27 public class OnlineMeanAbsolutePercentageErrorCalculator : DeepCloneable, IOnlineCalculator { 28 28 29 29 private double sre; … … 96 96 } 97 97 98 // IDeepCloneable interface members 99 public object Clone() { 100 return new OnlineMeanAbsolutePercentageErrorCalculator(this); 101 } 102 103 public IDeepCloneable Clone(Cloner cloner) { 104 var clone = cloner.GetClone(this); 105 if (clone == null) { 106 clone = new OnlineMeanAbsolutePercentageErrorCalculator(this); 107 cloner.RegisterClonedObject(this, clone); 108 } 109 return clone; 98 public override IDeepCloneable Clone(Cloner cloner) { 99 return new OnlineMeanAbsolutePercentageErrorCalculator(this, cloner); 110 100 } 111 101 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineMeanAndVarianceCalculator.cs
r14294 r14376 24 24 25 25 namespace HeuristicLab.Problems.DataAnalysis { 26 public class OnlineMeanAndVarianceCalculator : IDeepCloneable {26 public class OnlineMeanAndVarianceCalculator : DeepCloneable { 27 27 28 28 private double m_oldM, m_newM, m_oldS, m_newS; … … 118 118 } 119 119 120 // IDeepCloneable members 121 public object Clone() { 122 return new OnlineMeanAndVarianceCalculator(this); 123 } 124 125 public IDeepCloneable Clone(Cloner cloner) { 126 var clone = cloner.GetClone(this); 127 if (clone == null) { 128 clone = new OnlineMeanAndVarianceCalculator(this); 129 cloner.RegisterClonedObject(this, clone); 130 } 131 return clone; 120 public override IDeepCloneable Clone(Cloner cloner) { 121 return new OnlineMeanAndVarianceCalculator(this, cloner); 132 122 } 133 123 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineMeanErrorCalculator.cs
r14294 r14376 25 25 26 26 namespace HeuristicLab.Problems.DataAnalysis { 27 public class OnlineMeanErrorCalculator : IOnlineCalculator, IDeepCloneable{27 public class OnlineMeanErrorCalculator : DeepCloneable, IOnlineCalculator { 28 28 29 29 private readonly OnlineMeanAndVarianceCalculator meanAndVarianceCalculator; … … 80 80 } 81 81 82 // IDeepCloneable members 83 public object Clone() { 84 var cloner = new Cloner(); 82 public override IDeepCloneable Clone(Cloner cloner) { 85 83 return new OnlineMeanErrorCalculator(this, cloner); 86 }87 88 public IDeepCloneable Clone(Cloner cloner) {89 var clone = cloner.GetClone(this);90 if (clone == null) {91 clone = new OnlineMeanErrorCalculator(this, cloner);92 cloner.RegisterClonedObject(this, clone);93 }94 return clone;95 84 } 96 85 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineMeanSquaredErrorCalculator.cs
r14294 r14376 25 25 26 26 namespace HeuristicLab.Problems.DataAnalysis { 27 public class OnlineMeanSquaredErrorCalculator : IOnlineCalculator, IDeepCloneable{27 public class OnlineMeanSquaredErrorCalculator : DeepCloneable, IOnlineCalculator { 28 28 29 29 private double sse; … … 95 95 } 96 96 97 // IDeepCloneable members 98 public object Clone() { 99 return new OnlineMeanSquaredErrorCalculator(this); 100 } 101 102 public IDeepCloneable Clone(Cloner cloner) { 103 var clone = cloner.GetClone(this); 104 if (clone == null) { 105 clone = new OnlineMeanSquaredErrorCalculator(this); 106 cloner.RegisterClonedObject(this, clone); 107 } 108 return clone; 97 public override IDeepCloneable Clone(Cloner cloner) { 98 return new OnlineMeanSquaredErrorCalculator(this, cloner); 109 99 } 110 100 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineNormalizedMeanSquaredErrorCalculator.cs
r14295 r14376 25 25 26 26 namespace HeuristicLab.Problems.DataAnalysis { 27 public class OnlineNormalizedMeanSquaredErrorCalculator : IOnlineCalculator, IDeepCloneable{27 public class OnlineNormalizedMeanSquaredErrorCalculator : DeepCloneable, IOnlineCalculator { 28 28 private OnlineMeanAndVarianceCalculator meanSquaredErrorCalculator; 29 29 private OnlineMeanAndVarianceCalculator originalVarianceCalculator; … … 99 99 } 100 100 101 // IDeepCloneable members 102 public object Clone() { 103 var cloner = new Cloner(); 101 public override IDeepCloneable Clone(Cloner cloner) { 104 102 return new OnlineNormalizedMeanSquaredErrorCalculator(this, cloner); 105 }106 107 public IDeepCloneable Clone(Cloner cloner) {108 var clone = cloner.GetClone(this);109 if (clone == null) {110 clone = new OnlineNormalizedMeanSquaredErrorCalculator(this, cloner);111 cloner.RegisterClonedObject(this, clone);112 }113 return clone;114 103 } 115 104 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlinePearsonsRCalculator.cs
r14294 r14376 25 25 26 26 namespace HeuristicLab.Problems.DataAnalysis { 27 public class OnlinePearsonsRCalculator : IOnlineCalculator, IDeepCloneable{27 public class OnlinePearsonsRCalculator : DeepCloneable, IOnlineCalculator { 28 28 private OnlineCovarianceCalculator covCalculator = new OnlineCovarianceCalculator(); 29 29 private OnlineMeanAndVarianceCalculator sxCalculator = new OnlineMeanAndVarianceCalculator(); … … 98 98 } 99 99 100 // IDeepCloneable members 101 public object Clone() { 102 var cloner = new Cloner(); 100 public override IDeepCloneable Clone(Cloner cloner) { 103 101 return new OnlinePearsonsRCalculator(this, cloner); 104 }105 106 public IDeepCloneable Clone(Cloner cloner) {107 var clone = cloner.GetClone(this);108 if (clone == null) {109 clone = new OnlinePearsonsRCalculator(this, cloner);110 cloner.RegisterClonedObject(this, clone);111 }112 return clone;113 102 } 114 103 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlinePearsonsRSquaredCalculator.cs
r14294 r14376 26 26 namespace HeuristicLab.Problems.DataAnalysis { 27 27 [Obsolete("Use OnlinePearsonsRCalculator directly")] 28 public class OnlinePearsonsRSquaredCalculator : IOnlineCalculator, IDeepCloneable{28 public class OnlinePearsonsRSquaredCalculator : DeepCloneable, IOnlineCalculator { 29 29 private readonly OnlinePearsonsRCalculator rCalculator = new OnlinePearsonsRCalculator(); 30 30 … … 64 64 } 65 65 66 // IDeepCloneable members 67 public object Clone() { 68 var cloner = new Cloner(); 66 public override IDeepCloneable Clone(Cloner cloner) { 69 67 return new OnlinePearsonsRSquaredCalculator(this, cloner); 70 }71 72 public IDeepCloneable Clone(Cloner cloner) {73 var clone = cloner.GetClone(this);74 if (clone == null) {75 clone = new OnlinePearsonsRSquaredCalculator(this, cloner);76 cloner.RegisterClonedObject(this, clone);77 }78 return clone;79 68 } 80 69 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineTheilsUStatisticCalculator.cs
r14294 r14376 25 25 26 26 namespace HeuristicLab.Problems.DataAnalysis { 27 public class OnlineTheilsUStatisticCalculator : IOnlineTimeSeriesCalculator, IDeepCloneable{27 public class OnlineTheilsUStatisticCalculator : DeepCloneable, IOnlineTimeSeriesCalculator { 28 28 private OnlineMeanAndVarianceCalculator squaredErrorMeanCalculator; 29 29 private OnlineMeanAndVarianceCalculator unbiasedEstimatorMeanCalculator; … … 132 132 } 133 133 134 // IDeepCloneable members 135 public object Clone() { 136 var cloner = new Cloner(); 134 public override IDeepCloneable Clone(Cloner cloner) { 137 135 return new OnlineTheilsUStatisticCalculator(this, cloner); 138 }139 140 public IDeepCloneable Clone(Cloner cloner) {141 var clone = cloner.GetClone(this);142 if (clone == null) {143 clone = new OnlineTheilsUStatisticCalculator(this, cloner);144 cloner.RegisterClonedObject(this, clone);145 }146 return clone;147 136 } 148 137 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineWeightedDirectionalSymmetryCalculator.cs
r14294 r14376 26 26 27 27 namespace HeuristicLab.Problems.DataAnalysis { 28 public class OnlineWeightedDirectionalSymmetryCalculator : IOnlineTimeSeriesCalculator, IDeepCloneable{28 public class OnlineWeightedDirectionalSymmetryCalculator : DeepCloneable, IOnlineTimeSeriesCalculator { 29 29 private int n; 30 30 private double correctSum; … … 42 42 } 43 43 44 protected OnlineWeightedDirectionalSymmetryCalculator(OnlineWeightedDirectionalSymmetryCalculator other, Cloner cloner = null) {44 protected OnlineWeightedDirectionalSymmetryCalculator(OnlineWeightedDirectionalSymmetryCalculator other, Cloner cloner) { 45 45 n = other.n; 46 46 correctSum = other.correctSum; … … 126 126 } 127 127 128 // IDeepCloneable members 129 public object Clone() { 130 return new OnlineWeightedDirectionalSymmetryCalculator(this); 131 } 132 133 public IDeepCloneable Clone(Cloner cloner) { 134 var clone = cloner.GetClone(this); 135 if (clone == null) { 136 clone = new OnlineWeightedDirectionalSymmetryCalculator(this); 137 cloner.RegisterClonedObject(this, clone); 138 } 139 return clone; 128 public override IDeepCloneable Clone(Cloner cloner) { 129 return new OnlineWeightedDirectionalSymmetryCalculator(this, cloner); 140 130 } 141 131 }
Note: See TracChangeset
for help on using the changeset viewer.