Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/16/12 13:53:28 (13 years ago)
Author:
bburlacu
Message:

#1682: Added missing files (that were previously incorrectly referencing the old branch), added unit tests, recommitted lost changes.

Location:
branches/HeuristicLab.Crossovers
Files:
2 added
9 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Crossovers

    • Property svn:ignore
      •  

        old new  
        1919protoc.exe
        2020*.user
         21_ReSharper.HeuristicLab.Crossovers
  • branches/HeuristicLab.Crossovers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4

    • Property svn:ignore
      •  

        old new  
        55*.vs10x
        66Plugin.cs
         7*.bak
  • branches/HeuristicLab.Crossovers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionSizefairCrossover.cs

    r7476 r7477  
    2020#endregion
    2121
     22using HeuristicLab.Data;
    2223using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2324using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
  • branches/HeuristicLab.Crossovers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj

    r7475 r7477  
    4141    <DebugType>full</DebugType>
    4242    <Optimize>false</Optimize>
    43     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     43    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    4444    <DefineConstants>DEBUG;TRACE</DefineConstants>
    4545    <ErrorReport>prompt</ErrorReport>
     
    5050    <DebugType>pdbonly</DebugType>
    5151    <Optimize>true</Optimize>
    52     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     52    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    5353    <DefineConstants>TRACE</DefineConstants>
    5454    <ErrorReport>prompt</ErrorReport>
     
    168168    <Compile Include="Creators\SymbolicDataAnalysisExpressionRampedHalfAndHalfTreeCreator.cs" />
    169169    <Compile Include="Creators\SymbolicDataAnalysisExpressionTreeCreator.cs" />
     170    <Compile Include="Crossovers\MultiSymbolicDataAnalysisExpressionCrossover.cs" />
     171    <Compile Include="Crossovers\SymbolicDataAnalysisExpressionContextAwareCrossover.cs" />
     172    <Compile Include="Crossovers\SymbolicDataAnalysisExpressionCrossover.cs" />
     173    <Compile Include="Crossovers\SymbolicDataAnalysisExpressionDepthConstrainedCrossover.cs" />
     174    <Compile Include="Crossovers\SymbolicDataAnalysisExpressionDeterministicBestCrossover.cs" />
     175    <Compile Include="Crossovers\SymbolicDataAnalysisExpressionProbabilisticFunctionalCrossover.cs" />
     176    <Compile Include="Crossovers\SymbolicDataAnalysisExpressionSemanticSimilarityCrossover.cs" />
     177    <Compile Include="Crossovers\SymbolicDataAnalysisExpressionSizefairCrossover.cs" />
     178    <Compile Include="Interfaces\ISymbolicDataAnalysisExpressionCrossover.cs" />
    170179    <Compile Include="Plugin.cs" />
    171180    <Compile Include="SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs" />
  • branches/HeuristicLab.Crossovers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces

    • Property svn:ignore set to
      *.bak
  • branches/HeuristicLab.Crossovers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisExpressionTreeInterpreter.cs

    r7259 r7477  
    2222using System.Collections.Generic;
    2323using HeuristicLab.Core;
     24using HeuristicLab.Data;
    2425using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2526
    2627namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
    27   public interface ISymbolicDataAnalysisExpressionTreeInterpreter : INamedItem {
     28  public interface ISymbolicDataAnalysisExpressionTreeInterpreter : INamedItem, IStatefulItem {
    2829    IEnumerable<double> GetSymbolicExpressionTreeValues(ISymbolicExpressionTree tree, Dataset dataset, IEnumerable<int> rows);
     30    IntValue EvaluatedSolutions { get; set; }
    2931  }
    3032}
  • branches/HeuristicLab.Crossovers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs

    r7259 r7477  
    4848    internal delegate double CompiledFunction(int sampleIndex, IList<double>[] columns);
    4949    private const string CheckExpressionsWithIntervalArithmeticParameterName = "CheckExpressionsWithIntervalArithmetic";
     50    private const string EvaluatedSolutionsParameterName = "EvaluatedSolutions";
    5051    #region private classes
    5152    private class InterpreterState {
     
    156157      get { return (IValueParameter<BoolValue>)Parameters[CheckExpressionsWithIntervalArithmeticParameterName]; }
    157158    }
     159
     160    public IValueParameter<IntValue> EvaluatedSolutionsParameter {
     161      get { return (IValueParameter<IntValue>)Parameters[EvaluatedSolutionsParameterName]; }
     162    }
    158163    #endregion
    159164
     
    162167      get { return CheckExpressionsWithIntervalArithmeticParameter.Value; }
    163168      set { CheckExpressionsWithIntervalArithmeticParameter.Value = value; }
     169    }
     170
     171    public IntValue EvaluatedSolutions {
     172      get { return EvaluatedSolutionsParameter.Value; }
     173      set { EvaluatedSolutionsParameter.Value = value; }
    164174    }
    165175    #endregion
     
    176186      : base("SymbolicDataAnalysisExpressionTreeILEmittingInterpreter", "Interpreter for symbolic expression trees.") {
    177187      Parameters.Add(new ValueParameter<BoolValue>(CheckExpressionsWithIntervalArithmeticParameterName, "Switch that determines if the interpreter checks the validity of expressions with interval arithmetic before evaluating the expression.", new BoolValue(false)));
    178     }
     188      Parameters.Add(new ValueParameter<IntValue>(EvaluatedSolutionsParameterName, "A counter for the total number of solutions the interpreter has evaluated", new IntValue(0)));
     189    }
     190
     191    #region state
     192    public void InitializeState() {
     193      EvaluatedSolutions.Value = 0;
     194    }
     195
     196    public void ClearState() {
     197      EvaluatedSolutions.Value = 0;
     198    }
     199    #endregion
    179200
    180201    public IEnumerable<double> GetSymbolicExpressionTreeValues(ISymbolicExpressionTree tree, Dataset dataset, IEnumerable<int> rows) {
  • branches/HeuristicLab.Crossovers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeInterpreter.cs

    r7259 r7477  
    3434  public sealed class SymbolicDataAnalysisExpressionTreeInterpreter : ParameterizedNamedItem, ISymbolicDataAnalysisExpressionTreeInterpreter {
    3535    private const string CheckExpressionsWithIntervalArithmeticParameterName = "CheckExpressionsWithIntervalArithmetic";
     36    private const string EvaluatedSolutionsParameterName = "EvaluatedSolutions";
    3637    #region private classes
    3738    private class InterpreterState {
     
    176177      get { return (IValueParameter<BoolValue>)Parameters[CheckExpressionsWithIntervalArithmeticParameterName]; }
    177178    }
     179
     180    public IValueParameter<IntValue> EvaluatedSolutionsParameter {
     181      get { return (IValueParameter<IntValue>)Parameters[EvaluatedSolutionsParameterName]; }
     182    }
    178183    #endregion
    179184
     
    183188      set { CheckExpressionsWithIntervalArithmeticParameter.Value = value; }
    184189    }
     190
     191    public IntValue EvaluatedSolutions {
     192      get { return EvaluatedSolutionsParameter.Value; }
     193      set { EvaluatedSolutionsParameter.Value = value; }
     194    }
    185195    #endregion
    186 
    187196
    188197    [StorableConstructor]
     
    196205      : base("SymbolicDataAnalysisExpressionTreeInterpreter", "Interpreter for symbolic expression trees including automatically defined functions.") {
    197206      Parameters.Add(new ValueParameter<BoolValue>(CheckExpressionsWithIntervalArithmeticParameterName, "Switch that determines if the interpreter checks the validity of expressions with interval arithmetic before evaluating the expression.", new BoolValue(false)));
    198     }
     207      Parameters.Add(new ValueParameter<IntValue>(EvaluatedSolutionsParameterName, "A counter for the total number of solutions the interpreter has evaluated", new IntValue(0)));
     208    }
     209
     210    #region state
     211    public void InitializeState() {
     212      EvaluatedSolutions.Value = 0;
     213    }
     214
     215    public void ClearState() {
     216    }
     217    #endregion
    199218
    200219    public IEnumerable<double> GetSymbolicExpressionTreeValues(ISymbolicExpressionTree tree, Dataset dataset, IEnumerable<int> rows) {
     220      EvaluatedSolutions.Value++; // increment the evaluated solutions counter
    201221      if (CheckExpressionsWithIntervalArithmetic.Value)
    202222        throw new NotSupportedException("Interval arithmetic is not yet supported in the symbolic data analysis interpreter.");
  • branches/HeuristicLab.Crossovers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs

    r7259 r7477  
    3232using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3333using HeuristicLab.PluginInfrastructure;
     34using HeuristicLab.Problems.DataAnalysis.Symbolic.Crossovers;
    3435
    3536namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
     
    198199    private void InitializeOperators() {
    199200      Operators.AddRange(ApplicationManager.Manager.GetInstances<ISymbolicExpressionTreeOperator>());
     201      Operators.AddRange(ApplicationManager.Manager.GetInstances<ISymbolicDataAnalysisExpressionCrossover<T>>());
    200202      Operators.Add(new SymbolicExpressionSymbolFrequencyAnalyzer());
    201203      Operators.Add(new SymbolicDataAnalysisVariableFrequencyAnalyzer());
     
    307309        op.SymbolicDataAnalysisTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameterName;
    308310      }
     311      foreach (var op in operators.OfType<ISymbolicDataAnalysisExpressionCrossover<T>>()) {
     312        op.SymbolicDataAnalysisEvaluationPartitionParameter.ActualName = FitnessCalculationPartitionParameterName;
     313      }
    309314    }
    310315
Note: See TracChangeset for help on using the changeset viewer.