Changeset 10429 for branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers
- Timestamp:
- 01/29/14 23:29:50 (11 years ago)
- Location:
- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic merged: 10368,10375,10378,10414,10417,10428
- Property svn:mergeinfo changed
-
branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectivePruningAnalyzer.cs
r10396 r10429 32 32 private const string NodeImpactThresholdParameterName = "ImpactThreshold"; 33 33 34 private const string FitnessCalculationPartitionParameterName = "FitnessCalculationPartition"; 35 34 36 private bool reentry; 35 37 [Storable] … … 52 54 get { return (ILookupParameter<IDataAnalysisProblemData>)Parameters[ProblemDataParameterName]; } 53 55 } 56 public ILookupParameter<IntRange> FitnessCalculationPartitionParameter { 57 get { return (ILookupParameter<IntRange>)Parameters[FitnessCalculationPartitionParameterName]; } 58 } 54 59 private ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> InterpreterParameter { 55 60 get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[InterpreterParameterName]; } … … 76 81 #region properties 77 82 protected IDataAnalysisProblemData ProblemData { get { return ProblemDataParameter.ActualValue; } } 83 protected IntRange FitnessCalculationPartition { get { return FitnessCalculationPartitionParameter.ActualValue; } } 78 84 protected ISymbolicDataAnalysisExpressionTreeInterpreter Interpreter { get { return InterpreterParameter.ActualValue; } } 79 85 protected IntValue UpdateInterval { get { return UpdateIntervalParameter.Value; } } … … 89 95 #endregion 90 96 97 #region IStatefulItem members 98 public override void InitializeState() { 99 base.InitializeState(); 100 UpdateCounter.Value = 0; 101 PrunedSubtrees.Value = 0; 102 PrunedTrees.Value = 0; 103 } 104 public override void ClearState() { 105 base.ClearState(); 106 UpdateCounter.Value = 0; 107 PrunedSubtrees.Value = 0; 108 PrunedTrees.Value = 0; 109 } 110 #endregion 111 91 112 [StorableConstructor] 92 113 protected SymbolicDataAnalysisSingleObjectivePruningAnalyzer(bool deserializing) : base(deserializing) { } 114 [StorableHook(HookType.AfterDeserialization)] 115 private void AfterDeserialization() { 116 if (!Parameters.ContainsKey(FitnessCalculationPartitionParameterName)) 117 Parameters.Add(new LookupParameter<IntRange>(FitnessCalculationPartitionParameterName, "")); 118 } 93 119 protected SymbolicDataAnalysisSingleObjectivePruningAnalyzer(SymbolicDataAnalysisSingleObjectivePruningAnalyzer original, Cloner cloner) 94 120 : base(original, cloner) { … … 110 136 Parameters.Add(new FixedValueParameter<DoubleValue>(NodeImpactThresholdParameterName, new DoubleValue(0.0))); 111 137 Parameters.Add(new FixedValueParameter<BoolValue>(PruneOnlyZeroImpactNodesParameterName, new BoolValue(false))); 138 Parameters.Add(new LookupParameter<IntRange>(FitnessCalculationPartitionParameterName, "")); 112 139 } 113 140 … … 147 174 Random = Random, 148 175 PruneOnlyZeroImpactNodes = PruneOnlyZeroImpactNodes.Value, 149 NodeImpactThreshold = NodeImpactThreshold.Value 176 NodeImpactThreshold = NodeImpactThreshold.Value, 177 FitnessCalculationPartition = FitnessCalculationPartition 150 178 }; 151 179 operations.Add(ExecutionContext.CreateChildOperation(op, ExecutionContext.Scope));
Note: See TracChangeset
for help on using the changeset viewer.