Changeset 5942 for trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators/OnlineLinearScalingParameterCalculator.cs
- Timestamp:
- 04/04/11 15:38:16 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators/OnlineLinearScalingParameterCalculator.cs
r5894 r5942 44 44 return 1; 45 45 else 46 return originalTargetCovariance Evaluator.Covariance / originalMeanAndVarianceCalculator.PopulationVariance;46 return originalTargetCovarianceCalculator.Covariance / originalMeanAndVarianceCalculator.PopulationVariance; 47 47 } 48 48 } 49 49 50 public Online EvaluatorError ErrorState {50 public OnlineCalculatorError ErrorState { 51 51 get { 52 52 return targetMeanCalculator.MeanErrorState | originalMeanAndVarianceCalculator.MeanErrorState | 53 originalMeanAndVarianceCalculator.PopulationVarianceErrorState | originalTargetCovariance Evaluator.ErrorState;53 originalMeanAndVarianceCalculator.PopulationVarianceErrorState | originalTargetCovarianceCalculator.ErrorState; 54 54 } 55 55 } … … 58 58 private OnlineMeanAndVarianceCalculator targetMeanCalculator; 59 59 private OnlineMeanAndVarianceCalculator originalMeanAndVarianceCalculator; 60 private OnlineCovariance Evaluator originalTargetCovarianceEvaluator;60 private OnlineCovarianceCalculator originalTargetCovarianceCalculator; 61 61 62 62 public OnlineLinearScalingParameterCalculator() { 63 63 targetMeanCalculator = new OnlineMeanAndVarianceCalculator(); 64 64 originalMeanAndVarianceCalculator = new OnlineMeanAndVarianceCalculator(); 65 originalTargetCovariance Evaluator = new OnlineCovarianceEvaluator();65 originalTargetCovarianceCalculator = new OnlineCovarianceCalculator(); 66 66 Reset(); 67 67 } … … 71 71 targetMeanCalculator.Reset(); 72 72 originalMeanAndVarianceCalculator.Reset(); 73 originalTargetCovariance Evaluator.Reset();73 originalTargetCovarianceCalculator.Reset(); 74 74 } 75 75 … … 83 83 targetMeanCalculator.Add(target); 84 84 originalMeanAndVarianceCalculator.Add(original); 85 originalTargetCovariance Evaluator.Add(original, target);85 originalTargetCovarianceCalculator.Add(original, target); 86 86 87 87 cnt++; … … 97 97 /// <param name="beta">Multiplicative factor for the linear scaling</param> 98 98 /// <param name="errorState">Flag that indicates if errors occurred in the calculation of the linea scaling parameters.</param> 99 public static void Calculate(IEnumerable<double> original, IEnumerable<double> target, out double alpha, out double beta, out Online EvaluatorError errorState) {99 public static void Calculate(IEnumerable<double> original, IEnumerable<double> target, out double alpha, out double beta, out OnlineCalculatorError errorState) { 100 100 OnlineLinearScalingParameterCalculator calculator = new OnlineLinearScalingParameterCalculator(); 101 101 IEnumerator<double> originalEnumerator = original.GetEnumerator();
Note: See TracChangeset
for help on using the changeset viewer.