- Timestamp:
- 02/17/11 00:59:36 (14 years ago)
- Location:
- branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Classification/IClassificationEvaluator.cs
r5496 r5500 22 22 namespace HeuristicLab.Problems.DataAnalysis.Classification { 23 23 public interface IClassificationEvaluator : IDataAnalysisEvaluator { 24 new IClassificationProblemData ProblemData { get; } 24 25 } 25 26 } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisEvaluator.cs
r5484 r5500 20 20 #endregion 21 21 22 using HeuristicLab.Core; 22 23 using HeuristicLab.Optimization; 23 24 24 25 namespace HeuristicLab.Problems.DataAnalysis { 25 26 public interface IDataAnalysisEvaluator : IEvaluator { 27 IValueLookupParameter<IDataAnalysisProblemData> ProblemDataParameter { get; } 28 IDataAnalysisProblemData ProblemData { get; } 26 29 } 27 30 } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblemData.cs
r5494 r5500 27 27 Dataset Dataset { get; } 28 28 IEnumerable<string> InputVariables { get; } 29 30 int TrainingSamplesStart { get; } 31 int TrainingSamplesEnd { get; } 32 int TestSamplesStart { get; } 33 int TestSamplesEnd { get; } 29 34 } 30 35 } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionEvaluator.cs
r5496 r5500 22 22 namespace HeuristicLab.Problems.DataAnalysis { 23 23 public interface IRegressionEvaluator : IDataAnalysisEvaluator { 24 new IRegressionProblemData ProblemData { get; } 24 25 } 25 26 } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionProblem.cs
r5496 r5500 21 21 22 22 namespace HeuristicLab.Problems.DataAnalysis { 23 public interface IRegression nProblem : IDataAnalysisProblem {23 public interface IRegressionProblem : IDataAnalysisProblem { 24 24 new IRegressionProblemData ProblemData { get; } 25 25 new IRegressionEvaluator Evaluator { get; } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionSolution.cs
r5496 r5500 23 23 public interface IClassificationSolution : IDataAnalysisSolution { 24 24 new IRegressionModel Model { get; } 25 new IRegressionProblemData Problem { get; }25 new IRegressionProblemData ProblemData { get; } 26 26 } 27 27 } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators/OnlineMeanSquaredErrorEvaluator.cs
r5491 r5500 21 21 22 22 using System; 23 using System.Collections.Generic; 23 24 24 25 namespace HeuristicLab.Problems.DataAnalysis { … … 60 61 } 61 62 #endregion 63 64 public static double Calculate(IEnumerable<double> first, IEnumerable<double> second) { 65 IEnumerator<double> firstEnumerator = first.GetEnumerator(); 66 IEnumerator<double> secondEnumerator = second.GetEnumerator(); 67 OnlineMeanSquaredErrorEvaluator mseEvaluator = new OnlineMeanSquaredErrorEvaluator(); 68 69 while (firstEnumerator.MoveNext() & secondEnumerator.MoveNext()) { 70 double estimated = secondEnumerator.Current; 71 double original = firstEnumerator.Current; 72 mseEvaluator.Add(original, estimated); 73 } 74 75 if (secondEnumerator.MoveNext() || firstEnumerator.MoveNext()) { 76 throw new ArgumentException("Number of elements in first and second enumeration doesn't match."); 77 } else { 78 return mseEvaluator.MeanSquaredError; 79 } 80 } 62 81 } 63 82 } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators/OnlinePearsonsRSquaredEvaluator.cs
r5490 r5500 21 21 22 22 using System; 23 using System.Collections.Generic; 23 24 using HeuristicLab.Common; 24 25 … … 68 69 return double.IsNaN(x) || double.IsInfinity(x); 69 70 } 71 72 public static double Calculate(IEnumerable<double> first, IEnumerable<double> second) { 73 IEnumerator<double> firstEnumerator = first.GetEnumerator(); 74 IEnumerator<double> secondEnumerator = second.GetEnumerator(); 75 OnlinePearsonsRSquaredEvaluator rSquaredEvaluator = new OnlinePearsonsRSquaredEvaluator(); 76 77 while (firstEnumerator.MoveNext() & secondEnumerator.MoveNext()) { 78 double estimated = secondEnumerator.Current; 79 double original = firstEnumerator.Current; 80 rSquaredEvaluator.Add(original, estimated); 81 } 82 83 if (secondEnumerator.MoveNext() || firstEnumerator.MoveNext()) { 84 throw new ArgumentException("Number of elements in first and second enumeration doesn't match."); 85 } else { 86 return rSquaredEvaluator.RSquared; 87 } 88 } 70 89 } 71 90 }
Note: See TracChangeset
for help on using the changeset viewer.