Changeset 9175 for branches/LearningClassifierSystems/HeuristicLab.Encodings.ConditionActionEncoding
- Timestamp:
- 01/21/13 16:33:47 (12 years ago)
- Location:
- branches/LearningClassifierSystems/HeuristicLab.Encodings.ConditionActionEncoding/3.3
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/LearningClassifierSystems/HeuristicLab.Encodings.ConditionActionEncoding/3.3/Analyzer/XCSSolutionAnalyzer.cs
r9154 r9175 31 31 [Item("ConditionActionSolutionAnalyzer", "")] 32 32 [StorableClass] 33 public sealedclass XCSSolutionAnalyzer : SingleSuccessorOperator, IAnalyzer {33 public abstract class XCSSolutionAnalyzer : SingleSuccessorOperator, IAnalyzer { 34 34 public bool EnabledByDefault { 35 35 get { return true; } … … 67 67 } 68 68 69 public ResultCollection Results { get { return ResultsParameter.ActualValue; } } 70 69 71 [StorableConstructor] 70 private XCSSolutionAnalyzer(bool deserializing) : base(deserializing) { } 71 private XCSSolutionAnalyzer(XCSSolutionAnalyzer original, Cloner cloner) : base(original, cloner) { } 72 public override IDeepCloneable Clone(Cloner cloner) { 73 return new XCSSolutionAnalyzer(this, cloner); 74 } 72 protected XCSSolutionAnalyzer(bool deserializing) : base(deserializing) { } 73 protected XCSSolutionAnalyzer(XCSSolutionAnalyzer original, Cloner cloner) : base(original, cloner) { } 75 74 public XCSSolutionAnalyzer() 76 75 : base() { … … 96 95 ItemArray<DoubleValue> averageActionSetSizes = AverageActionSetSizeParameter.ActualValue; 97 96 ItemArray<IntValue> numerosities = NumerosityParameter.ActualValue; 98 ResultCollection results = ResultsParameter.ActualValue;99 97 IConditionActionProblemData problemData = ProblemDataParameter.ActualValue; 100 98 … … 108 106 XCSModel xcsModel = new XCSModel(xcsClassifiers); 109 107 110 if (results.ContainsKey("XCSSolution")) { 111 results.Remove("XCSSolution"); 112 } 113 results.Add(new Result("XCSSolution", xcsModel.CreateConditionActionSolution(problemData))); 114 108 UseCurrentXCSSolution(xcsModel.CreateConditionActionSolution(problemData)); 115 109 return base.Apply(); 116 110 } 111 112 protected abstract void UseCurrentXCSSolution(IXCSSolution xcsSolution); 117 113 } 118 114 } -
branches/LearningClassifierSystems/HeuristicLab.Encodings.ConditionActionEncoding/3.3/HeuristicLab.Encodings.ConditionActionEncoding-3.3.csproj
r9167 r9175 38 38 </PropertyGroup> 39 39 <ItemGroup> 40 <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" /> 40 41 <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 41 42 <Private>False</Private> … … 56 57 <Private>False</Private> 57 58 </Reference> 59 <Reference Include="HeuristicLab.Optimization.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" /> 58 60 <Reference Include="HeuristicLab.Parameters-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 59 61 <Private>False</Private> … … 86 88 <Compile Include="ActionSelection\MaxValueActionSelector.cs" /> 87 89 <Compile Include="ActionSelection\RandomActionSelector.cs" /> 90 <Compile Include="Analyzer\BestTrainingXCSSolutionAnalyzer.cs" /> 91 <Compile Include="Analyzer\CurrentXCSSolutionAnalyzer.cs" /> 88 92 <Compile Include="Analyzer\XCSSolutionAnalyzer.cs" /> 89 93 <Compile Include="Covering\CoveringOperator.cs" /> -
branches/LearningClassifierSystems/HeuristicLab.Encodings.ConditionActionEncoding/3.3/IClassifier.cs
r9167 r9175 41 41 bool Equals(object obj); 42 42 int GetHashCode(); 43 44 //test45 bool Identical(IClassifier classifier);46 43 } 47 44 } -
branches/LearningClassifierSystems/HeuristicLab.Encodings.ConditionActionEncoding/3.3/Interfaces/IConditionActionSolution.cs
r9154 r9175 31 31 event EventHandler ModelChanged; 32 32 event EventHandler ProblemDataChanged; 33 34 double TrainingAccuracy { get; } 35 double TestAccuracy { get; } 33 36 } 34 37 } -
branches/LearningClassifierSystems/HeuristicLab.Encodings.ConditionActionEncoding/3.3/Reinforcement/ActionExecuter.cs
r9089 r9175 69 69 70 70 public override IOperation Apply() { 71 if (SelectedActionParameter.ActualValue. Action.Equals(CurrentClassifierToMatchParameter.ActualValue.Action)) {71 if (SelectedActionParameter.ActualValue.MatchAction(CurrentClassifierToMatchParameter.ActualValue)) { 72 72 CurrentPayoffParameter.ActualValue = PositiveRewardParameter.ActualValue; 73 73 } else { -
branches/LearningClassifierSystems/HeuristicLab.Encodings.ConditionActionEncoding/3.3/XCSSolution.cs
r9161 r9175 86 86 description = original.Description; 87 87 } 88 public override IDeepCloneable Clone(Cloner cloner) { 89 return new XCSSolution(this, cloner); 90 } 88 91 public XCSSolution(IConditionActionModel model, IConditionActionProblemData problemData) 89 92 : base() { … … 118 121 119 122 while (originalEnumerator.MoveNext() && estimatedActionEnumerator.MoveNext()) { 120 if (originalEnumerator.Current. Action.Equals(estimatedActionEnumerator.Current)) {123 if (originalEnumerator.Current.MatchAction(estimatedActionEnumerator.Current)) { 121 124 correctClassified++; 122 125 }
Note: See TracChangeset
for help on using the changeset viewer.