- Timestamp:
- 12/19/12 11:16:51 (12 years ago)
- Location:
- branches/RuntimeOptimizer
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/RuntimeOptimizer
- Property svn:mergeinfo changed
/trunk/sources merged: 8972-8974,8976,8978-8994,8999-9019,9021-9031,9033-9039,9043,9049,9052,9055-9057,9063,9068,9072,9075-9076
- Property svn:mergeinfo changed
-
branches/RuntimeOptimizer/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic merged: 8972,8974,9004,9037,9049
- Property svn:mergeinfo changed
-
branches/RuntimeOptimizer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Evaluators/SymbolicDataAnalysisEvaluator.cs
r8838 r9078 28 28 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 29 29 using HeuristicLab.Operators; 30 using HeuristicLab.Optimization; 30 31 using HeuristicLab.Parameters; 31 32 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 35 36 [StorableClass] 36 37 public abstract class SymbolicDataAnalysisEvaluator<T> : SingleSuccessorOperator, 37 ISymbolicDataAnalysisEvaluator<T>, ISymbolicDataAnalysisInterpreterOperator, ISymbolicDataAnalysisBoundedOperator 38 ISymbolicDataAnalysisEvaluator<T>, ISymbolicDataAnalysisInterpreterOperator, ISymbolicDataAnalysisBoundedOperator, IStochasticOperator 38 39 where T : class, IDataAnalysisProblemData { 39 40 private const string RandomParameterName = "Random"; … … 50 51 51 52 #region parameter properties 53 ILookupParameter<IRandom> IStochasticOperator.RandomParameter { 54 get { return RandomParameter; } 55 } 56 52 57 public IValueLookupParameter<IRandom> RandomParameter { 53 58 get { return (IValueLookupParameter<IRandom>)Parameters[RandomParameterName]; } … … 145 150 double lowerEstimationLimit, double upperEstimationLimit, 146 151 IOnlineCalculator calculator, int maxRows) { 147 if (cache == null || cache. GetLength(0)< maxRows) {152 if (cache == null || cache.Length < maxRows) { 148 153 cache = new double[maxRows]; 149 154 } 150 155 151 156 // calculate linear scaling 152 // the static methods of the calculator are not used because the evaluated values should be cached for performance reasons153 157 int i = 0; 154 158 var linearScalingCalculator = new OnlineLinearScalingParameterCalculator(); -
branches/RuntimeOptimizer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisProblem.cs
r7259 r9078 22 22 using HeuristicLab.Core; 23 23 using HeuristicLab.Data; 24 using HeuristicLab.Optimization; 24 25 25 26 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 26 public interface ISymbolicDataAnalysisProblem : IDataAnalysisProblem {27 public interface ISymbolicDataAnalysisProblem : IDataAnalysisProblem, IHeuristicOptimizationProblem { 27 28 IValueParameter<ISymbolicDataAnalysisGrammar> SymbolicExpressionTreeGrammarParameter { get; } 28 29 IValueParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicExpressionTreeInterpreterParameter { get; } … … 45 46 IntRange ValidationPartition { get; } 46 47 } 48 49 public interface ISymbolicDataAnalysisSingleObjectiveProblem : ISymbolicDataAnalysisProblem, ISingleObjectiveHeuristicOptimizationProblem { } 50 public interface ISymbolicDataAnalysisMultiObjectiveProblem : ISymbolicDataAnalysisProblem, IMultiObjectiveHeuristicOptimizationProblem { } 47 51 } -
branches/RuntimeOptimizer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs
r8486 r9078 99 99 throw new NotSupportedException("Interval arithmetic is not yet supported in the symbolic data analysis interpreter."); 100 100 101 EvaluatedSolutions.Value++; // increment the evaluated solutions counter 101 lock (EvaluatedSolutions) { 102 EvaluatedSolutions.Value++; // increment the evaluated solutions counter 103 } 102 104 var state = PrepareInterpreterState(tree, dataset); 103 105 … … 109 111 } 110 112 111 private InterpreterState PrepareInterpreterState(ISymbolicExpressionTree tree, Dataset dataset) {113 private static InterpreterState PrepareInterpreterState(ISymbolicExpressionTree tree, Dataset dataset) { 112 114 Instruction[] code = SymbolicExpressionTreeCompiler.Compile(tree, OpCodes.MapSymbolToOpCode); 113 115 int necessaryArgStackSize = 0; -
branches/RuntimeOptimizer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisModel.cs
r8664 r9078 69 69 70 70 #region Scaling 71 p ublic static void Scale(ISymbolicDataAnalysisModel model,IDataAnalysisProblemData problemData, string targetVariable) {71 protected void Scale(IDataAnalysisProblemData problemData, string targetVariable) { 72 72 var dataset = problemData.Dataset; 73 73 var rows = problemData.TrainingIndices; 74 var estimatedValues = model.Interpreter.GetSymbolicExpressionTreeValues(model.SymbolicExpressionTree, dataset, rows);74 var estimatedValues = Interpreter.GetSymbolicExpressionTreeValues(SymbolicExpressionTree, dataset, rows); 75 75 var targetValues = dataset.GetDoubleValues(targetVariable, rows); 76 76 … … 94 94 ConstantTreeNode betaTreeNode = null; 95 95 // check if model has been scaled previously by analyzing the structure of the tree 96 var startNode = model.SymbolicExpressionTree.Root.GetSubtree(0);96 var startNode = SymbolicExpressionTree.Root.GetSubtree(0); 97 97 if (startNode.GetSubtree(0).Symbol is Addition) { 98 98 var addNode = startNode.GetSubtree(0); -
branches/RuntimeOptimizer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisMultiObjectiveProblem.cs
r7259 r9078 30 30 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 31 31 [StorableClass] 32 public abstract class SymbolicDataAnalysisMultiObjectiveProblem<T, U, V> : SymbolicDataAnalysisProblem<T, U, V>, I MultiObjectiveHeuristicOptimizationProblem32 public abstract class SymbolicDataAnalysisMultiObjectiveProblem<T, U, V> : SymbolicDataAnalysisProblem<T, U, V>, ISymbolicDataAnalysisMultiObjectiveProblem 33 33 where T : class,IDataAnalysisProblemData 34 34 where U : class, ISymbolicDataAnalysisMultiObjectiveEvaluator<T> -
branches/RuntimeOptimizer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSingleObjectiveProblem.cs
r7259 r9078 31 31 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 32 32 [StorableClass] 33 public abstract class SymbolicDataAnalysisSingleObjectiveProblem<T, U, V> : SymbolicDataAnalysisProblem<T, U, V>, IS ingleObjectiveHeuristicOptimizationProblem33 public abstract class SymbolicDataAnalysisSingleObjectiveProblem<T, U, V> : SymbolicDataAnalysisProblem<T, U, V>, ISymbolicDataAnalysisSingleObjectiveProblem 34 34 where T : class,IDataAnalysisProblemData 35 35 where U : class, ISymbolicDataAnalysisSingleObjectiveEvaluator<T>
Note: See TracChangeset
for help on using the changeset viewer.