Changeset 14465
- Timestamp:
- 12/07/16 17:44:04 (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
r14376 r14465 33 33 } 34 34 35 protected ClassificationPerformanceMeasuresCalculator(ClassificationPerformanceMeasuresCalculator original, Cloner cloner) { 35 protected ClassificationPerformanceMeasuresCalculator(ClassificationPerformanceMeasuresCalculator original, Cloner cloner) 36 : base(original, cloner) { 36 37 positiveClassName = original.positiveClassName; 37 38 positiveClassValue = original.positiveClassValue; … … 41 42 falseNegativeCount = original.falseNegativeCount; 42 43 errorState = original.errorState; 44 } 45 public override IDeepCloneable Clone(Cloner cloner) { 46 return new ClassificationPerformanceMeasuresCalculator(this, cloner); 43 47 } 44 48 … … 147 151 errorState = ErrorState; 148 152 } 149 150 public override IDeepCloneable Clone(Cloner cloner) {151 return new ClassificationPerformanceMeasuresCalculator(this, cloner);152 }153 153 } 154 154 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineBoundedMeanSquaredErrorCalculator.cs
r14376 r14465 45 45 } 46 46 47 protected OnlineBoundedMeanSquaredErrorCalculator(OnlineBoundedMeanSquaredErrorCalculator original, Cloner cloner) { 47 protected OnlineBoundedMeanSquaredErrorCalculator(OnlineBoundedMeanSquaredErrorCalculator original, Cloner cloner) 48 : base(original, cloner) { 48 49 LowerBound = original.LowerBound; 49 50 UpperBound = original.UpperBound; … … 51 52 errorSum = original.errorSum; 52 53 errorState = original.ErrorState; 54 } 55 public override IDeepCloneable Clone(Cloner cloner) { 56 return new OnlineBoundedMeanSquaredErrorCalculator(this, cloner); 53 57 } 54 58 … … 105 109 } 106 110 } 107 108 // IDeepCloneable interface members109 public override IDeepCloneable Clone(Cloner cloner) {110 return new OnlineBoundedMeanSquaredErrorCalculator(this, cloner);111 }112 111 } 113 112 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineCovarianceCalculator.cs
r14376 r14465 39 39 } 40 40 41 protected OnlineCovarianceCalculator(OnlineCovarianceCalculator other, Cloner cloner) { 42 Cn = other.Cn; 43 xMean = other.xMean; 44 yMean = other.yMean; 45 n = other.n; 46 errorState = other.errorState; 41 protected OnlineCovarianceCalculator(OnlineCovarianceCalculator original, Cloner cloner) 42 : base(original, cloner) { 43 Cn = original.Cn; 44 xMean = original.xMean; 45 yMean = original.yMean; 46 n = original.n; 47 errorState = original.errorState; 48 } 49 50 public override IDeepCloneable Clone(Cloner cloner) { 51 return new OnlineCovarianceCalculator(this, cloner); 47 52 } 48 53 … … 103 108 } 104 109 } 105 106 public override IDeepCloneable Clone(Cloner cloner) {107 return new OnlineCovarianceCalculator(this, cloner);108 }109 110 } 110 111 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineDirectionalSymmetryCalculator.cs
r14376 r14465 41 41 } 42 42 43 protected OnlineDirectionalSymmetryCalculator(OnlineDirectionalSymmetryCalculator other, Cloner cloner = null) { 44 n = other.n; 45 nCorrect = other.nCorrect; 46 errorState = other.errorState; 43 protected OnlineDirectionalSymmetryCalculator(OnlineDirectionalSymmetryCalculator original, Cloner cloner = null) 44 : base(original, cloner) { 45 n = original.n; 46 nCorrect = original.nCorrect; 47 errorState = original.errorState; 48 } 49 50 public override IDeepCloneable Clone(Cloner cloner) { 51 return new OnlineDirectionalSymmetryCalculator(this, cloner); 47 52 } 48 53 … … 122 127 } 123 128 } 124 125 public override IDeepCloneable Clone(Cloner cloner) {126 return new OnlineDirectionalSymmetryCalculator(this, cloner);127 }128 129 } 129 130 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineLinearScalingParameterCalculator.cs
r14376 r14465 55 55 } 56 56 57 private OnlineMeanAndVarianceCalculator targetMeanCalculator;58 private OnlineMeanAndVarianceCalculator originalMeanAndVarianceCalculator;59 private OnlineCovarianceCalculator originalTargetCovarianceCalculator;57 private readonly OnlineMeanAndVarianceCalculator targetMeanCalculator; 58 private readonly OnlineMeanAndVarianceCalculator originalMeanAndVarianceCalculator; 59 private readonly OnlineCovarianceCalculator originalTargetCovarianceCalculator; 60 60 61 61 public OnlineLinearScalingParameterCalculator() { … … 66 66 } 67 67 68 protected OnlineLinearScalingParameterCalculator(OnlineLinearScalingParameterCalculator other, Cloner cloner) { 69 targetMeanCalculator = (OnlineMeanAndVarianceCalculator)other.targetMeanCalculator.Clone(cloner); 70 originalMeanAndVarianceCalculator = (OnlineMeanAndVarianceCalculator)other.originalMeanAndVarianceCalculator.Clone(cloner); 71 originalTargetCovarianceCalculator = (OnlineCovarianceCalculator)other.originalTargetCovarianceCalculator.Clone(cloner); 68 protected OnlineLinearScalingParameterCalculator(OnlineLinearScalingParameterCalculator original, Cloner cloner) 69 : base(original, cloner) { 70 targetMeanCalculator = cloner.Clone(original.targetMeanCalculator); 71 originalMeanAndVarianceCalculator = cloner.Clone(original.originalMeanAndVarianceCalculator); 72 originalTargetCovarianceCalculator = cloner.Clone(original.originalTargetCovarianceCalculator); 72 73 // do not reset the calculators here 74 } 75 public override IDeepCloneable Clone(Cloner cloner) { 76 return new OnlineLinearScalingParameterCalculator(this, cloner); 73 77 } 74 78 … … 125 129 } 126 130 } 127 128 public override IDeepCloneable Clone(Cloner cloner) {129 return new OnlineLinearScalingParameterCalculator(this, cloner);130 }131 131 } 132 132 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineMaxAbsoluteErrorCalculator.cs
r14376 r14465 39 39 } 40 40 41 protected OnlineMaxAbsoluteErrorCalculator(OnlineMaxAbsoluteErrorCalculator other, Cloner cloner = null) { 42 mae = other.mae; 43 n = other.n; 44 errorState = other.errorState; 41 protected OnlineMaxAbsoluteErrorCalculator(OnlineMaxAbsoluteErrorCalculator original, Cloner cloner = null) 42 : base(original, cloner) { 43 mae = original.mae; 44 n = original.n; 45 errorState = original.errorState; 46 } 47 public override IDeepCloneable Clone(Cloner cloner) { 48 return new OnlineMaxAbsoluteErrorCalculator(this, cloner); 45 49 } 46 50 … … 95 99 } 96 100 } 97 98 public override IDeepCloneable Clone(Cloner cloner) {99 return new OnlineMaxAbsoluteErrorCalculator(this, cloner);100 }101 101 } 102 102 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineMeanAbsoluteErrorCalculator.cs
r14376 r14465 39 39 } 40 40 41 protected OnlineMeanAbsoluteErrorCalculator(OnlineMeanAbsoluteErrorCalculator other, Cloner cloner = null) { 42 sae = other.sae; 43 n = other.n; 44 errorState = other.errorState; 41 protected OnlineMeanAbsoluteErrorCalculator(OnlineMeanAbsoluteErrorCalculator original, Cloner cloner = null) 42 : base(original, cloner) { 43 sae = original.sae; 44 n = original.n; 45 errorState = original.errorState; 46 } 47 public override IDeepCloneable Clone(Cloner cloner) { 48 return new OnlineMeanAbsoluteErrorCalculator(this, cloner); 45 49 } 46 50 … … 94 98 } 95 99 } 96 97 public override IDeepCloneable Clone(Cloner cloner) {98 return new OnlineMeanAbsoluteErrorCalculator(this, cloner);99 }100 100 } 101 101 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineMeanAbsolutePercentageErrorCalculator.cs
r14376 r14465 39 39 } 40 40 41 protected OnlineMeanAbsolutePercentageErrorCalculator(OnlineMeanAbsolutePercentageErrorCalculator other, Cloner cloner = null) { 42 sre = other.sre; 43 n = other.n; 44 errorState = other.errorState; 41 protected OnlineMeanAbsolutePercentageErrorCalculator(OnlineMeanAbsolutePercentageErrorCalculator original, Cloner cloner = null) 42 : base(original, cloner) { 43 sre = original.sre; 44 n = original.n; 45 errorState = original.errorState; 46 } 47 48 public override IDeepCloneable Clone(Cloner cloner) { 49 return new OnlineMeanAbsolutePercentageErrorCalculator(this, cloner); 45 50 } 46 51 … … 95 100 } 96 101 } 97 98 public override IDeepCloneable Clone(Cloner cloner) {99 return new OnlineMeanAbsolutePercentageErrorCalculator(this, cloner);100 }101 102 } 102 103 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineMeanAndVarianceCalculator.cs
r14376 r14465 67 67 } 68 68 69 protected OnlineMeanAndVarianceCalculator(OnlineMeanAndVarianceCalculator other, Cloner cloner = null) { 70 m_oldS = other.m_oldS; 71 m_oldM = other.m_oldM; 72 m_newS = other.m_newS; 73 m_newM = other.m_newM; 74 n = other.n; 75 errorState = other.errorState; 76 varianceErrorState = other.varianceErrorState; 69 protected OnlineMeanAndVarianceCalculator(OnlineMeanAndVarianceCalculator original, Cloner cloner = null) 70 : base(original, cloner) { 71 m_oldS = original.m_oldS; 72 m_oldM = original.m_oldM; 73 m_newS = original.m_newS; 74 m_newM = original.m_newM; 75 n = original.n; 76 errorState = original.errorState; 77 varianceErrorState = original.varianceErrorState; 78 } 79 public override IDeepCloneable Clone(Cloner cloner) { 80 return new OnlineMeanAndVarianceCalculator(this, cloner); 77 81 } 78 82 … … 117 121 varianceErrorState = meanAndVarianceCalculator.VarianceErrorState; 118 122 } 119 120 public override IDeepCloneable Clone(Cloner cloner) {121 return new OnlineMeanAndVarianceCalculator(this, cloner);122 }123 123 } 124 124 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineMeanErrorCalculator.cs
r14376 r14465 37 37 } 38 38 39 protected OnlineMeanErrorCalculator(OnlineMeanErrorCalculator other, Cloner cloner) { 40 meanAndVarianceCalculator = (OnlineMeanAndVarianceCalculator)other.meanAndVarianceCalculator.Clone(cloner); 39 protected OnlineMeanErrorCalculator(OnlineMeanErrorCalculator original, Cloner cloner) 40 : base(original, cloner) { 41 meanAndVarianceCalculator = cloner.Clone(original.meanAndVarianceCalculator); 42 } 43 public override IDeepCloneable Clone(Cloner cloner) { 44 return new OnlineMeanErrorCalculator(this, cloner); 41 45 } 42 46 … … 79 83 } 80 84 } 81 82 public override IDeepCloneable Clone(Cloner cloner) {83 return new OnlineMeanErrorCalculator(this, cloner);84 }85 85 } 86 86 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineMeanSquaredErrorCalculator.cs
r14376 r14465 39 39 } 40 40 41 protected OnlineMeanSquaredErrorCalculator(OnlineMeanSquaredErrorCalculator other, Cloner cloner = null) { 42 sse = other.sse; 43 n = other.n; 44 errorState = other.errorState; 41 protected OnlineMeanSquaredErrorCalculator(OnlineMeanSquaredErrorCalculator original, Cloner cloner) 42 : base(original, cloner) { 43 sse = original.sse; 44 n = original.n; 45 errorState = original.errorState; 46 } 47 public override IDeepCloneable Clone(Cloner cloner) { 48 return new OnlineMeanSquaredErrorCalculator(this, cloner); 45 49 } 46 50 … … 94 98 } 95 99 } 96 97 public override IDeepCloneable Clone(Cloner cloner) {98 return new OnlineMeanSquaredErrorCalculator(this, cloner);99 }100 100 } 101 101 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineNormalizedMeanSquaredErrorCalculator.cs
r14376 r14465 43 43 } 44 44 45 protected OnlineNormalizedMeanSquaredErrorCalculator(OnlineNormalizedMeanSquaredErrorCalculator other, Cloner cloner) { 46 meanSquaredErrorCalculator = (OnlineMeanAndVarianceCalculator)other.meanSquaredErrorCalculator.Clone(cloner); 47 originalVarianceCalculator = (OnlineMeanAndVarianceCalculator)other.originalVarianceCalculator.Clone(cloner); 45 protected OnlineNormalizedMeanSquaredErrorCalculator(OnlineNormalizedMeanSquaredErrorCalculator original, Cloner cloner) 46 : base(original, cloner) { 47 meanSquaredErrorCalculator = cloner.Clone(original.meanSquaredErrorCalculator); 48 originalVarianceCalculator = cloner.Clone(original.originalVarianceCalculator); 49 } 50 public override IDeepCloneable Clone(Cloner cloner) { 51 return new OnlineNormalizedMeanSquaredErrorCalculator(this, cloner); 48 52 } 49 53 … … 99 103 } 100 104 101 public override IDeepCloneable Clone(Cloner cloner) { 102 return new OnlineNormalizedMeanSquaredErrorCalculator(this, cloner); 103 } 105 104 106 } 105 107 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlinePearsonsRCalculator.cs
r14376 r14465 47 47 public OnlinePearsonsRCalculator() { } 48 48 49 protected OnlinePearsonsRCalculator(OnlinePearsonsRCalculator other, Cloner cloner) { 50 covCalculator = (OnlineCovarianceCalculator)other.covCalculator.Clone(cloner); 51 sxCalculator = (OnlineMeanAndVarianceCalculator)other.sxCalculator.Clone(cloner); 52 syCalculator = (OnlineMeanAndVarianceCalculator)other.syCalculator.Clone(cloner); 49 protected OnlinePearsonsRCalculator(OnlinePearsonsRCalculator original, Cloner cloner) 50 : base(original, cloner) { 51 covCalculator = cloner.Clone(original.covCalculator); 52 sxCalculator = cloner.Clone(original.sxCalculator); 53 syCalculator = cloner.Clone(original.syCalculator); 54 } 55 public override IDeepCloneable Clone(Cloner cloner) { 56 return new OnlinePearsonsRCalculator(this, cloner); 53 57 } 54 58 … … 97 101 } 98 102 } 99 100 public override IDeepCloneable Clone(Cloner cloner) {101 return new OnlinePearsonsRCalculator(this, cloner);102 }103 103 } 104 104 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlinePearsonsRSquaredCalculator.cs
r14376 r14465 38 38 public OnlinePearsonsRSquaredCalculator() { } 39 39 40 protected OnlinePearsonsRSquaredCalculator(OnlinePearsonsRSquaredCalculator other, Cloner cloner) { 41 this.rCalculator = (OnlinePearsonsRCalculator)other.rCalculator.Clone(cloner); 40 protected OnlinePearsonsRSquaredCalculator(OnlinePearsonsRSquaredCalculator original, Cloner cloner) 41 : base(original, cloner) { 42 rCalculator = cloner.Clone(original.rCalculator); 43 } 44 public override IDeepCloneable Clone(Cloner cloner) { 45 return new OnlinePearsonsRSquaredCalculator(this, cloner); 42 46 } 43 47 … … 64 68 } 65 69 66 public override IDeepCloneable Clone(Cloner cloner) { 67 return new OnlinePearsonsRSquaredCalculator(this, cloner); 68 } 70 69 71 } 70 72 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineTheilsUStatisticCalculator.cs
r14376 r14465 26 26 namespace HeuristicLab.Problems.DataAnalysis { 27 27 public class OnlineTheilsUStatisticCalculator : DeepCloneable, IOnlineTimeSeriesCalculator { 28 private OnlineMeanAndVarianceCalculator squaredErrorMeanCalculator;29 private OnlineMeanAndVarianceCalculator unbiasedEstimatorMeanCalculator;28 private readonly OnlineMeanAndVarianceCalculator squaredErrorMeanCalculator; 29 private readonly OnlineMeanAndVarianceCalculator unbiasedEstimatorMeanCalculator; 30 30 31 31 public double TheilsUStatistic { … … 46 46 } 47 47 48 protected OnlineTheilsUStatisticCalculator(OnlineTheilsUStatisticCalculator other, Cloner cloner) { 49 squaredErrorMeanCalculator = (OnlineMeanAndVarianceCalculator)other.squaredErrorMeanCalculator.Clone(cloner); 50 unbiasedEstimatorMeanCalculator = (OnlineMeanAndVarianceCalculator)other.unbiasedEstimatorMeanCalculator.Clone(cloner); 48 protected OnlineTheilsUStatisticCalculator(OnlineTheilsUStatisticCalculator original, Cloner cloner) 49 : base(original, cloner) { 50 squaredErrorMeanCalculator = cloner.Clone(original.squaredErrorMeanCalculator); 51 unbiasedEstimatorMeanCalculator = cloner.Clone(original.unbiasedEstimatorMeanCalculator); 52 } 53 public override IDeepCloneable Clone(Cloner cloner) { 54 return new OnlineTheilsUStatisticCalculator(this, cloner); 51 55 } 52 56 … … 131 135 } 132 136 } 133 134 public override IDeepCloneable Clone(Cloner cloner) {135 return new OnlineTheilsUStatisticCalculator(this, cloner);136 }137 137 } 138 138 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineWeightedDirectionalSymmetryCalculator.cs
r14376 r14465 42 42 } 43 43 44 protected OnlineWeightedDirectionalSymmetryCalculator(OnlineWeightedDirectionalSymmetryCalculator other, Cloner cloner) { 45 n = other.n; 46 correctSum = other.correctSum; 47 incorrectSum = other.incorrectSum; 48 errorState = other.errorState; 44 protected OnlineWeightedDirectionalSymmetryCalculator(OnlineWeightedDirectionalSymmetryCalculator original, Cloner cloner) 45 : base(original, cloner) { 46 n = original.n; 47 correctSum = original.correctSum; 48 incorrectSum = original.incorrectSum; 49 errorState = original.errorState; 50 } 51 52 public override IDeepCloneable Clone(Cloner cloner) { 53 return new OnlineWeightedDirectionalSymmetryCalculator(this, cloner); 49 54 } 50 55 … … 125 130 } 126 131 } 127 128 public override IDeepCloneable Clone(Cloner cloner) {129 return new OnlineWeightedDirectionalSymmetryCalculator(this, cloner);130 }131 132 } 132 133 }
Note: See TracChangeset
for help on using the changeset viewer.