Changeset 15281 for branches/Async/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineNormalizedMeanSquaredErrorCalculator.cs
- Timestamp:
- 07/23/17 11:17:18 (7 years ago)
- Location:
- branches/Async
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Async
- Property svn:ignore
-
old new 24 24 protoc.exe 25 25 obj 26 .vs
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/Async/HeuristicLab.Problems.DataAnalysis
- Property svn:mergeinfo changed
-
branches/Async/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineNormalizedMeanSquaredErrorCalculator.cs
r12012 r15281 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 22 22 using System; 23 23 using System.Collections.Generic; 24 using HeuristicLab.Common; 24 25 25 26 namespace HeuristicLab.Problems.DataAnalysis { 26 public class OnlineNormalizedMeanSquaredErrorCalculator : IOnlineCalculator {27 public class OnlineNormalizedMeanSquaredErrorCalculator : DeepCloneable, IOnlineCalculator { 27 28 private OnlineMeanAndVarianceCalculator meanSquaredErrorCalculator; 28 29 private OnlineMeanAndVarianceCalculator originalVarianceCalculator; … … 30 31 public double NormalizedMeanSquaredError { 31 32 get { 32 double var = originalVarianceCalculator. Variance;33 double var = originalVarianceCalculator.PopulationVariance; 33 34 double m = meanSquaredErrorCalculator.Mean; 34 35 return var > 0 ? m / var : 0.0; … … 42 43 } 43 44 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); 52 } 53 44 54 #region IOnlineCalculator Members 45 55 public OnlineCalculatorError ErrorState { 46 get { return meanSquaredErrorCalculator.MeanErrorState | originalVarianceCalculator. VarianceErrorState; }56 get { return meanSquaredErrorCalculator.MeanErrorState | originalVarianceCalculator.PopulationVarianceErrorState; } 47 57 } 48 58 public double Value { … … 92 102 } 93 103 } 104 105 94 106 } 95 107 }
Note: See TracChangeset
for help on using the changeset viewer.