Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5607


Ignore:
Timestamp:
03/04/11 15:33:07 (14 years ago)
Author:
gkronber
Message:

#1418 worked on data analysis solutions and validation best analyzers.

Location:
branches/DataAnalysis Refactoring
Files:
5 added
12 edited
1 moved

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj

    r5577 r5607  
    116116    <Compile Include="Interfaces\ISymbolicRegressionSingleObjectiveEvaluator.cs" />
    117117    <Compile Include="MultiObjective\SymbolicRegressionMultiObjectiveTrainingBestSolutionAnalyzer.cs" />
     118    <Compile Include="SingleObjective\SymbolicRegressionSingleObjectiveValidationBestSolutionAnalyzer.cs" />
    118119    <Compile Include="SingleObjective\SymbolicRegressionSingleObjectiveTrainingBestSolutionAnalyzer.cs" />
    119120    <Compile Include="MultiObjective\SymbolicRegressionMultiObjectiveEvaluator.cs" />
     
    123124    <Compile Include="SingleObjective\SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator.cs" />
    124125    <Compile Include="SingleObjective\SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.cs" />
     126    <Compile Include="SymbolicRegressionSolution.cs" />
    125127    <None Include="HeuristicLab.snk" />
    126128    <None Include="HeuristicLabProblemsDataAnalysisSymbolicRegressionPlugin.cs.frame" />
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator.cs

    r5601 r5607  
    4646    public override IOperation Apply() {
    4747      IEnumerable<int> rows = GenerateRowsToEvaluate();
    48       double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, LowerEstimationLimit.Value, UpperEstimationLimit.Value, ProblemData, rows);
    49       QualityParameter.ActualValue = new DoubleValue(quality);
     48      double quality = Calculate(SymbolicDataAnalysisTreeInterpreter, SymbolicExpressionTree, LowerEstimationLimit.Value, UpperEstimationLimit.Value, ProblemData, rows);
     49      Quality = new DoubleValue(quality);
    5050      return base.Apply();
    5151    }
     
    5757      return OnlineMeanSquaredErrorEvaluator.Calculate(originalValues, boundedEstimationValues);
    5858    }
     59
     60    public override double Evaluate(IExecutionContext context, ISymbolicExpressionTree tree,  IRegressionProblemData problemData, IEnumerable<int> rows) {
     61      return Calculate(SymbolicDataAnalysisTreeInterpreter, tree, LowerEstimationLimit.Value, UpperEstimationLimit.Value, problemData, rows);
     62    }
    5963  }
    6064}
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveTrainingBestSolutionAnalyzer.cs

    r5557 r5607  
    3838  [StorableClass]
    3939  public abstract class SymbolicDataAnalysisMultiObjectiveTrainingBestSolutionAnalyzer<T> : SymbolicDataAnalysisMultiObjectiveAnalyzer
    40     where T : class, IDataAnalysisSolution {
     40    where T : class, ISymbolicDataAnalysisSolution {
    4141    private const string TrainingBestSolutionsParameterName = "Best training solutions";
    4242    private const string TrainingBestSolutionQualitiesParameterName = "Best training solution qualities";
     
    6868    public SymbolicDataAnalysisMultiObjectiveTrainingBestSolutionAnalyzer()
    6969      : base() {
    70       Parameters.Add(new LookupParameter<ItemList<T>>(TrainingBestSolutionsParameterName, "The training best (Pareto-optimal) symbolic data analyis solutions."));
     70      Parameters.Add(new LookupParameter<ItemList<T>>(TrainingBestSolutionsParameterName, "The training best (Pareto-optimal) symbolic data analysis solutions."));
    7171      Parameters.Add(new LookupParameter<ItemList<DoubleArray>>(TrainingBestSolutionQualitiesParameterName, "The qualities of the training best (Pareto-optimal) solutions."));
    7272    }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer.cs

    r5557 r5607  
    3838  [StorableClass]
    3939  public abstract class SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer<T> : SymbolicDataAnalysisSingleObjectiveAnalyzer
    40     where T : class, IDataAnalysisSolution {
     40    where T : class, ISymbolicDataAnalysisSolution {
    4141    private const string TrainingBestSolutionParameterName = "Best training solution";
    4242    private const string TrainingBestSolutionQualityParameterName = "Best training solution quality";
     
    6969      : base() {
    7070      Parameters.Add(new LookupParameter<T>(TrainingBestSolutionParameterName, "The training best symbolic data analyis solution."));
    71       Parameters.Add(new LookupParameter<DoubleValue>(TrainingBestSolutionQualityParameterName, "The quality of the training best symbolic data analyis solution."));
     71      Parameters.Add(new LookupParameter<DoubleValue>(TrainingBestSolutionQualityParameterName, "The quality of the training best symbolic data analysis solution."));
    7272    }
    7373
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Evaluators/SymbolicDataAnalysisEvaluator.cs

    r5586 r5607  
    8080
    8181    #region properties
     82    public IRandom Random {
     83      get { return RandomParameter.ActualValue; }
     84    }
     85    public ISymbolicExpressionTree SymbolicExpressionTree {
     86      get { return SymbolicExpressionTreeParameter.ActualValue; }
     87    }
     88    public ISymbolicDataAnalysisTreeInterpreter SymbolicDataAnalysisTreeInterpreter {
     89      get { return SymbolicDataAnalysisTreeInterpreterParameter.ActualValue; }
     90    }
    8291    public T ProblemData {
    8392      get { return ProblemDataParameter.ActualValue; }
    8493    }
    85 
    8694    public IntValue SamplesStart {
    8795      get { return SamplesStartParameter.ActualValue; }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Evaluators/SymbolicDataAnalysisMultiObjectiveEvaluator.cs

    r5509 r5607  
    2626using HeuristicLab.Parameters;
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2829
    2930namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
     
    4748      Parameters.Add(new LookupParameter<DoubleArray>(QualitiesParameterName, "The qualities of the evaluated symbolic data analysis solution."));
    4849    }
     50
     51    public abstract double[] Evaluate(IExecutionContext context, ISymbolicExpressionTree tree, Dataset dataset, IEnumerable<int> rows);
    4952  }
    5053}
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Evaluators/SymbolicDataAnalysisSingleObjectiveEvaluator.cs

    r5509 r5607  
    2525using HeuristicLab.Parameters;
    2626using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using System.Collections.Generic;
     28using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2729
    2830namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
     
    3032   where T : class, IDataAnalysisProblemData {
    3133    private const string QualityParameterName = "Quality";
     34    #region parameter properties
    3235    public ILookupParameter<DoubleValue> QualityParameter {
    3336      get { return (ILookupParameter<DoubleValue>)Parameters[QualityParameterName]; }
    3437    }
    35 
     38    #endregion
     39    #region properties
     40    public DoubleValue Quality {
     41      get { return QualityParameter.ActualValue; }
     42      set { QualityParameter.ActualValue = value; }
     43    }
    3644    public abstract bool Maximization { get; }
    37 
     45    #endregion
    3846    [StorableConstructor]
    3947    protected SymbolicDataAnalysisSingleObjectiveEvaluator(bool deserializing) : base(deserializing) { }
     
    4654      Parameters.Add(new LookupParameter<DoubleValue>(QualityParameterName, "The quality of the evaluated symbolic data analysis solution."));
    4755    }
     56
     57
     58    public abstract double Evaluate(IExecutionContext context, ISymbolicExpressionTree tree, Dataset dataset, IEnumerable<int> rows);
    4859  }
    4960}
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj

    r5580 r5607  
    108108  </ItemGroup>
    109109  <ItemGroup>
     110    <Compile Include="Analyzers\SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer.cs" />
     111    <Compile Include="Analyzers\SymbolicDataAnalysisValidationAnalyzer.cs" />
    110112    <Compile Include="Analyzers\SymbolicDataAnalysisMultiObjectiveAnalyzer.cs" />
    111113    <Compile Include="Analyzers\SymbolicDataAnalysisSingleObjectiveAnalyzer.cs" />
     
    116118    </Compile>
    117119    <Compile Include="Analyzers\SymbolicDataAnalysisVariableFrequencyAnalyzer.cs" />
     120    <Compile Include="Interfaces\ISymbolicDataAnalysisValidationAnalyzer.cs" />
    118121    <Compile Include="MultiObjectiveSymbolicDataAnalysisProblem.cs" />
    119122    <Compile Include="Grammars\ArithmeticExpressionGrammar.cs" />
     
    122125    <Compile Include="Interfaces\ISymbolicDataAnalysisMultiObjectiveAnalyzer.cs" />
    123126    <Compile Include="Interfaces\ISymbolicDataAnalysisSingleObjectiveAnalyzer.cs" />
    124     <Compile Include="Interfaces\ISymbolicDataAnalysisValidatingAnalyzer.cs" />
    125127    <Compile Include="Interfaces\ISymbolicDataAnalysisAnalyzer.cs" />
    126128    <Compile Include="SingleObjectiveSymbolicDataAnalysisProblem.cs" />
     129    <Compile Include="SymbolicDataAnalysisSolution.cs" />
    127130    <Compile Include="SymbolicDataAnalysisExpressionTreeInterpreter.cs" />
    128131    <Compile Include="SymbolicDataAnalysisExpressionTreeSimplifier.cs" />
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisMultiObjectiveEvaluator.cs

    r5577 r5607  
    2323using System.Collections.Generic;
    2424using HeuristicLab.Optimization;
     25using HeuristicLab.Core;
     26using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2527
    2628namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
     
    2830  where T : class,IDataAnalysisProblemData {
    2931    IEnumerable<bool> Maximization { get; }
     32    double[] Evaluate(ExecutionContext context, ISymbolicExpressionTree tree, T problemData, IEnumerable<int> rows);
    3033  }
    3134}
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisSingleObjectiveEvaluator.cs

    r5577 r5607  
    2020#endregion
    2121
    22 
    2322using HeuristicLab.Optimization;
     23using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
     24using System.Collections.Generic;
     25using HeuristicLab.Core;
    2426namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
    2527  public interface ISymbolicDataAnalysisSingleObjectiveEvaluator<T> : ISymbolicDataAnalysisEvaluator<T>, ISingleObjectiveEvaluator
    2628    where T : class,IDataAnalysisProblemData {
    2729    bool Maximization { get; }
     30
     31    double Evaluate(IExecutionContext context, ISymbolicExpressionTree tree, Dataset dataset, IEnumerable<int> rows);
    2832  }
    2933}
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisSolution.cs

    r5495 r5607  
    2121
    2222
    23 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Interfaces {
     23namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
    2424  public interface ISymbolicDataAnalysisSolution : IDataAnalysisSolution {
    2525    new ISymbolicDataAnalysisModel Model { get; }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisValidationAnalyzer.cs

    r5606 r5607  
    2222using HeuristicLab.Data;
    2323namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
    24   public interface ISymbolicDataAnalysisValidatingAnalyzer<T, U> : ISymbolicDataAnalysisAnalyzer
     24  public interface ISymbolicDataAnalysisValidationAnalyzer<T, U> : ISymbolicDataAnalysisAnalyzer
    2525    where T : class,ISymbolicDataAnalysisEvaluator<U>
    2626    where U : class, IDataAnalysisProblemData {
     27    ILookupParameter<U> ProblemDataParameter { get; }
    2728    ILookupParameter<T> EvaluatorParameter { get; }
    2829    IValueLookupParameter<IntValue> ValidationSamplesStartParameter { get; }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisSolution.cs

    r5508 r5607  
    2222using System;
    2323using HeuristicLab.Core;
     24using HeuristicLab.Optimization;
    2425
    2526namespace HeuristicLab.Problems.DataAnalysis {
Note: See TracChangeset for help on using the changeset viewer.