- Timestamp:
- 02/16/12 13:53:28 (13 years ago)
- Location:
- branches/HeuristicLab.Crossovers
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Crossovers
- Property svn:ignore
-
old new 19 19 protoc.exe 20 20 *.user 21 _ReSharper.HeuristicLab.Crossovers
-
- Property svn:ignore
-
branches/HeuristicLab.Crossovers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4
- Property svn:ignore
-
old new 5 5 *.vs10x 6 6 Plugin.cs 7 *.bak
-
- Property svn:ignore
-
branches/HeuristicLab.Crossovers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionSizefairCrossover.cs
r7476 r7477 20 20 #endregion 21 21 22 using HeuristicLab.Data; 22 23 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 23 24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; -
branches/HeuristicLab.Crossovers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj
r7475 r7477 41 41 <DebugType>full</DebugType> 42 42 <Optimize>false</Optimize> 43 <OutputPath> $(SolutionDir)\bin\</OutputPath>43 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 44 44 <DefineConstants>DEBUG;TRACE</DefineConstants> 45 45 <ErrorReport>prompt</ErrorReport> … … 50 50 <DebugType>pdbonly</DebugType> 51 51 <Optimize>true</Optimize> 52 <OutputPath> $(SolutionDir)\bin\</OutputPath>52 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 53 53 <DefineConstants>TRACE</DefineConstants> 54 54 <ErrorReport>prompt</ErrorReport> … … 168 168 <Compile Include="Creators\SymbolicDataAnalysisExpressionRampedHalfAndHalfTreeCreator.cs" /> 169 169 <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" /> 170 179 <Compile Include="Plugin.cs" /> 171 180 <Compile Include="SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs" /> -
branches/HeuristicLab.Crossovers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces
-
Property
svn:ignore
set to
*.bak
-
Property
svn:ignore
set to
-
branches/HeuristicLab.Crossovers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisExpressionTreeInterpreter.cs
r7259 r7477 22 22 using System.Collections.Generic; 23 23 using HeuristicLab.Core; 24 using HeuristicLab.Data; 24 25 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 25 26 26 27 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 27 public interface ISymbolicDataAnalysisExpressionTreeInterpreter : INamedItem {28 public interface ISymbolicDataAnalysisExpressionTreeInterpreter : INamedItem, IStatefulItem { 28 29 IEnumerable<double> GetSymbolicExpressionTreeValues(ISymbolicExpressionTree tree, Dataset dataset, IEnumerable<int> rows); 30 IntValue EvaluatedSolutions { get; set; } 29 31 } 30 32 } -
branches/HeuristicLab.Crossovers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs
r7259 r7477 48 48 internal delegate double CompiledFunction(int sampleIndex, IList<double>[] columns); 49 49 private const string CheckExpressionsWithIntervalArithmeticParameterName = "CheckExpressionsWithIntervalArithmetic"; 50 private const string EvaluatedSolutionsParameterName = "EvaluatedSolutions"; 50 51 #region private classes 51 52 private class InterpreterState { … … 156 157 get { return (IValueParameter<BoolValue>)Parameters[CheckExpressionsWithIntervalArithmeticParameterName]; } 157 158 } 159 160 public IValueParameter<IntValue> EvaluatedSolutionsParameter { 161 get { return (IValueParameter<IntValue>)Parameters[EvaluatedSolutionsParameterName]; } 162 } 158 163 #endregion 159 164 … … 162 167 get { return CheckExpressionsWithIntervalArithmeticParameter.Value; } 163 168 set { CheckExpressionsWithIntervalArithmeticParameter.Value = value; } 169 } 170 171 public IntValue EvaluatedSolutions { 172 get { return EvaluatedSolutionsParameter.Value; } 173 set { EvaluatedSolutionsParameter.Value = value; } 164 174 } 165 175 #endregion … … 176 186 : base("SymbolicDataAnalysisExpressionTreeILEmittingInterpreter", "Interpreter for symbolic expression trees.") { 177 187 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 179 200 180 201 public IEnumerable<double> GetSymbolicExpressionTreeValues(ISymbolicExpressionTree tree, Dataset dataset, IEnumerable<int> rows) { -
branches/HeuristicLab.Crossovers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeInterpreter.cs
r7259 r7477 34 34 public sealed class SymbolicDataAnalysisExpressionTreeInterpreter : ParameterizedNamedItem, ISymbolicDataAnalysisExpressionTreeInterpreter { 35 35 private const string CheckExpressionsWithIntervalArithmeticParameterName = "CheckExpressionsWithIntervalArithmetic"; 36 private const string EvaluatedSolutionsParameterName = "EvaluatedSolutions"; 36 37 #region private classes 37 38 private class InterpreterState { … … 176 177 get { return (IValueParameter<BoolValue>)Parameters[CheckExpressionsWithIntervalArithmeticParameterName]; } 177 178 } 179 180 public IValueParameter<IntValue> EvaluatedSolutionsParameter { 181 get { return (IValueParameter<IntValue>)Parameters[EvaluatedSolutionsParameterName]; } 182 } 178 183 #endregion 179 184 … … 183 188 set { CheckExpressionsWithIntervalArithmeticParameter.Value = value; } 184 189 } 190 191 public IntValue EvaluatedSolutions { 192 get { return EvaluatedSolutionsParameter.Value; } 193 set { EvaluatedSolutionsParameter.Value = value; } 194 } 185 195 #endregion 186 187 196 188 197 [StorableConstructor] … … 196 205 : base("SymbolicDataAnalysisExpressionTreeInterpreter", "Interpreter for symbolic expression trees including automatically defined functions.") { 197 206 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 199 218 200 219 public IEnumerable<double> GetSymbolicExpressionTreeValues(ISymbolicExpressionTree tree, Dataset dataset, IEnumerable<int> rows) { 220 EvaluatedSolutions.Value++; // increment the evaluated solutions counter 201 221 if (CheckExpressionsWithIntervalArithmetic.Value) 202 222 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 32 32 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 33 33 using HeuristicLab.PluginInfrastructure; 34 using HeuristicLab.Problems.DataAnalysis.Symbolic.Crossovers; 34 35 35 36 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { … … 198 199 private void InitializeOperators() { 199 200 Operators.AddRange(ApplicationManager.Manager.GetInstances<ISymbolicExpressionTreeOperator>()); 201 Operators.AddRange(ApplicationManager.Manager.GetInstances<ISymbolicDataAnalysisExpressionCrossover<T>>()); 200 202 Operators.Add(new SymbolicExpressionSymbolFrequencyAnalyzer()); 201 203 Operators.Add(new SymbolicDataAnalysisVariableFrequencyAnalyzer()); … … 307 309 op.SymbolicDataAnalysisTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameterName; 308 310 } 311 foreach (var op in operators.OfType<ISymbolicDataAnalysisExpressionCrossover<T>>()) { 312 op.SymbolicDataAnalysisEvaluationPartitionParameter.ActualName = FitnessCalculationPartitionParameterName; 313 } 309 314 } 310 315
Note: See TracChangeset
for help on using the changeset viewer.