Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/17/11 01:19:27 (14 years ago)
Author:
mkommend
Message:

#1418: Corrected namespaces and added symbolic classification specific evaluators.

Location:
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective
Files:
1 added
3 copied

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveEvaluator.cs

    r5500 r5501  
    2020#endregion
    2121
    22 
    2322using HeuristicLab.Common;
    2423using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    25 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
    26   public abstract class SymbolicRegressionSingleObjectiveEvaluator : SymbolicDataAnalysisSingleObjectiveEvaluator, ISymbolicRegressionEvaluator {
    27     public new IRegressionProblemData ProblemData {
    28       get { return (IRegressionProblemData)base.ProblemData; }
     24
     25namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification {
     26  public abstract class SymbolicClassificationSingleObjectiveEvaluator : SymbolicDataAnalysisSingleObjectiveEvaluator, ISymbolicClassificationSingleObjectiveEvaluator {
     27    public new IClassificationProblemData ProblemData {
     28      get { return (IClassificationProblemData)base.ProblemData; }
    2929    }
    3030
    3131    [StorableConstructor]
    32     protected SymbolicRegressionSingleObjectiveEvaluator(bool deserializing) : base(deserializing) { }
    33     protected SymbolicRegressionSingleObjectiveEvaluator(SymbolicRegressionSingleObjectiveEvaluator original, Cloner cloner)
     32    protected SymbolicClassificationSingleObjectiveEvaluator(bool deserializing) : base(deserializing) { }
     33    protected SymbolicClassificationSingleObjectiveEvaluator(SymbolicClassificationSingleObjectiveEvaluator original, Cloner cloner)
    3434      : base(original, cloner) {
    3535    }
    3636
    37     protected SymbolicRegressionSingleObjectiveEvaluator()
     37    protected SymbolicClassificationSingleObjectiveEvaluator()
    3838      : base() {
    3939
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveMeanSquaredErrorEvaluator.cs

    r5500 r5501  
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2828
    29 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
    30   [Item("Mean squared error evaluator", "Calculates the mean squared error of a symbolic regression solution.")]
     29namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification {
     30  [Item("Mean squared error evaluator", "Calculates the mean squared error of a symbolic classification solution.")]
    3131  [StorableClass]
    32   public class SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator : SymbolicRegressionSingleObjectiveEvaluator {
     32  public class SymbolicClassificationSingleObjectiveMeanSquaredErrorEvaluator : SymbolicClassificationSingleObjectiveEvaluator {
    3333    [StorableConstructor]
    34     protected SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator(bool deserializing) : base(deserializing) { }
    35     protected SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator(SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator original, Cloner cloner)
     34    protected SymbolicClassificationSingleObjectiveMeanSquaredErrorEvaluator(bool deserializing) : base(deserializing) { }
     35    protected SymbolicClassificationSingleObjectiveMeanSquaredErrorEvaluator(SymbolicClassificationSingleObjectiveMeanSquaredErrorEvaluator original, Cloner cloner)
    3636      : base(original, cloner) {
    3737    }
    3838    public override IDeepCloneable Clone(Cloner cloner) {
    39       return new SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator(this, cloner);
     39      return new SymbolicClassificationSingleObjectiveMeanSquaredErrorEvaluator(this, cloner);
    4040    }
    4141
     
    4747    }
    4848
    49     public static double Calculate(ISymbolicDataAnalysisTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IRegressionProblemData problemData, IEnumerable<int> rows) {
     49    public static double Calculate(ISymbolicDataAnalysisTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IClassificationProblemData problemData, IEnumerable<int> rows) {
    5050      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
    5151      IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator.cs

    r5500 r5501  
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2828
    29 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.SingleObjective.Evaluators {
    30   [Item("Pearson R² evaluator", "Calculates the square of the pearson correlation coefficient (also known as coefficient of determination) of a symbolic regression solution.")]
     29namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification {
     30  [Item("Pearson R² evaluator", "Calculates the square of the pearson correlation coefficient (also known as coefficient of determination) of a symbolic classification solution.")]
    3131  [StorableClass]
    32   public class SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator : SymbolicRegressionSingleObjectiveEvaluator {
     32  public class SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator : SymbolicClassificationSingleObjectiveEvaluator {
    3333    [StorableConstructor]
    34     protected SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator(bool deserializing) : base(deserializing) { }
    35     protected SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator(SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator original, Cloner cloner)
     34    protected SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator(bool deserializing) : base(deserializing) { }
     35    protected SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator(SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator original, Cloner cloner)
    3636      : base(original, cloner) {
    3737    }
    3838    public override IDeepCloneable Clone(Cloner cloner) {
    39       return new SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator(this, cloner);
     39      return new SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator(this, cloner);
    4040    }
    4141
     
    4747    }
    4848
    49     public static double Calculate(ISymbolicDataAnalysisTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IRegressionProblemData problemData, IEnumerable<int> rows) {
     49    public static double Calculate(ISymbolicDataAnalysisTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IClassificationProblemData problemData, IEnumerable<int> rows) {
    5050      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
    5151      IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
Note: See TracChangeset for help on using the changeset viewer.