Changeset 10152 for branches/DataAnalysis.IslandAlgorithms
- Timestamp:
- 11/25/13 10:42:13 (11 years ago)
- Location:
- branches/DataAnalysis.IslandAlgorithms
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.DataAnalysis.Symbolic/3.3/SymbolicDataAnalysisIslandGAEvaluator.cs
r10142 r10152 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Data; 26 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;27 26 using HeuristicLab.Operators; 28 27 using HeuristicLab.Optimization; … … 39 38 private const string RandomParameterName = "Random"; 40 39 private const string ProblemDataParameterName = "ProblemData"; 41 private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";42 40 private const string EvaluatorParameterName = "ProblemEvaluator"; 43 41 private const string QualityParameterName = "Quality"; … … 52 50 public ILookupParameter<T> ProblemDataParameter { 53 51 get { return (ILookupParameter<T>)Parameters[ProblemDataParameterName]; } 54 }55 public ILookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {56 get { return (ILookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }57 52 } 58 53 public ILookupParameter<ISymbolicDataAnalysisSingleObjectiveEvaluator<T>> EvaluatorParameter { … … 70 65 public ILookupParameter<IntValue> RandomSamplesParameter { 71 66 get { return (ILookupParameter<IntValue>)Parameters[RandomSamplesParameterName]; } 72 }73 74 public IValueParameter<EnumerableItem<int>> RowsParameter {75 get { return (IValueParameter<EnumerableItem<int>>)Parameters["Rows"]; }76 67 } 77 68 #endregion … … 91 82 Parameters.Add(new LookupParameter<IRandom>(RandomParameterName, "The random generator to use.")); 92 83 Parameters.Add(new LookupParameter<T>(ProblemDataParameterName, "The problem data on which the symbolic data analysis solution should be evaluated.")); 93 Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic data analysis solution encoded as a symbolic expression tree."));94 84 Parameters.Add(new LookupParameter<ISymbolicDataAnalysisSingleObjectiveEvaluator<T>>(EvaluatorParameterName, "The evaluator provided by the symbolic data analysis problem.")); 95 85 Parameters.Add(new LookupParameter<DoubleValue>(QualityParameterName, "The quality which is calculated by the encapsulated evaluator.")); … … 97 87 Parameters.Add(new LookupParameter<IntRange>(FixedSamplesPartitionParameterName, "The data partition which is used to calculate the fitness on the fixed samples.")); 98 88 Parameters.Add(new LookupParameter<IntValue>(RandomSamplesParameterName, "The number of random samples used for fitness calculation in each island.")); 99 Parameters.Add(new OptionalValueParameter<EnumerableItem<int>>("Rows", "TODO"));100 89 101 90 EvaluatorParameter.Hidden = true; … … 124 113 } 125 114 //filter out test rows 126 rows = rows.Where(r => r < problemData.TestPartition.Start &&r > problemData.TestPartition.End);115 rows = rows.Where(r => r < problemData.TestPartition.Start || r > problemData.TestPartition.End); 127 116 128 117 //execution context is created manually to be able to clear the rows parameter easily 129 RowsParameter.Value = new EnumerableItem<int>(rows);130 118 var executionContext = new ExecutionContext(ExecutionContext, evaluator, ExecutionContext.Scope); 119 120 //TODO change to lookup parameter 121 executionContext.Scope.Variables.Remove("Rows"); 122 executionContext.Scope.Variables.Add(new HeuristicLab.Core.Variable("Rows", new EnumerableItem<int>(rows))); 131 123 var successor = evaluator.Execute(executionContext, this.CancellationToken); 132 RowsParameter.Value = null;133 124 return new OperationCollection(successor, base.Apply()); 134 125 } -
branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.DataAnalysis.Symbolic/3.3/SymbolicDataAnalysisIslandOffspringSelectionGeneticAlgorithm.cs
r10142 r10152 27 27 using HeuristicLab.Core; 28 28 using HeuristicLab.Data; 29 using HeuristicLab.Operators; 29 30 using HeuristicLab.Optimization; 30 31 using HeuristicLab.Parameters; … … 32 33 using HeuristicLab.Problems.DataAnalysis; 33 34 using HeuristicLab.Problems.DataAnalysis.Symbolic; 34 using HeuristicLab.Random;35 35 36 36 namespace HeuristicLab.Algorithms.DataAnalysis.Symbolic { … … 116 116 fixedSamplesPartitionCreator.RightSideParameter.ActualName = FixedSamplesPartitionsParameterName; 117 117 118 RandomCreator insertionPoint = OperatorGraph.Iterate().OfType<RandomCreator>().First();118 SubScopesCreator insertionPoint = OperatorGraph.Iterate().OfType<SubScopesCreator>().First(); 119 119 fixedSamplesPartitionCreator.Successor = insertionPoint.Successor; 120 120 insertionPoint.Successor = fixedSamplesPartitionCreator; -
branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/HeuristicLab.Algorithms.GeneticAlgorithm-3.3.csproj
r10142 r10152 43 43 <DebugType>full</DebugType> 44 44 <Optimize>false</Optimize> 45 <OutputPath> $(SolutionDir)\bin\</OutputPath>45 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 46 46 <DefineConstants>DEBUG;TRACE</DefineConstants> 47 47 <ErrorReport>prompt</ErrorReport> … … 62 62 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> 63 63 <DebugSymbols>true</DebugSymbols> 64 <OutputPath> $(SolutionDir)\bin\</OutputPath>64 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 65 65 <DefineConstants>DEBUG;TRACE</DefineConstants> 66 66 <DebugType>full</DebugType> … … 70 70 </PropertyGroup> 71 71 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> 72 <OutputPath> $(SolutionDir)\bin\</OutputPath>72 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 73 73 <DefineConstants>TRACE</DefineConstants> 74 74 <DocumentationFile> … … 82 82 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> 83 83 <DebugSymbols>true</DebugSymbols> 84 <OutputPath> $(SolutionDir)\bin\</OutputPath>84 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 85 85 <DefineConstants>DEBUG;TRACE</DefineConstants> 86 86 <DebugType>full</DebugType> … … 90 90 </PropertyGroup> 91 91 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> 92 <OutputPath> $(SolutionDir)\bin\</OutputPath>92 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 93 93 <DefineConstants>TRACE</DefineConstants> 94 94 <DocumentationFile> -
branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3.csproj
r10142 r10152 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> … … 58 58 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> 59 59 <DebugSymbols>true</DebugSymbols> 60 <OutputPath> $(SolutionDir)\bin\</OutputPath>60 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 61 61 <DefineConstants>DEBUG;TRACE</DefineConstants> 62 62 <DebugType>full</DebugType> … … 66 66 </PropertyGroup> 67 67 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> 68 <OutputPath> $(SolutionDir)\bin\</OutputPath>68 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 69 69 <DefineConstants>TRACE</DefineConstants> 70 70 <Optimize>true</Optimize> … … 76 76 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> 77 77 <DebugSymbols>true</DebugSymbols> 78 <OutputPath> $(SolutionDir)\bin\</OutputPath>78 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 79 79 <DefineConstants>DEBUG;TRACE</DefineConstants> 80 80 <DebugType>full</DebugType> … … 84 84 </PropertyGroup> 85 85 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> 86 <OutputPath> $(SolutionDir)\bin\</OutputPath>86 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 87 87 <DefineConstants>TRACE</DefineConstants> 88 88 <Optimize>true</Optimize> -
branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs
r10142 r10152 240 240 } 241 241 protected UniformSubScopesProcessor IslandProcessor { 242 get { return ((RandomCreator.Successor as SubScopesCreator).Successor as UniformSubScopesProcessor); }242 get { return OperatorGraph.Iterate().OfType<UniformSubScopesProcessor>().First(x => x.Operator is SolutionsCreator); } 243 243 } 244 244 protected SolutionsCreator SolutionsCreator { -
branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj
r10142 r10152 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> … … 60 60 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> 61 61 <DebugSymbols>true</DebugSymbols> 62 <OutputPath> $(SolutionDir)\bin\</OutputPath>62 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 63 63 <DefineConstants>DEBUG;TRACE</DefineConstants> 64 64 <DebugType>full</DebugType> … … 69 69 </PropertyGroup> 70 70 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> 71 <OutputPath> $(SolutionDir)\bin\</OutputPath>71 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 72 72 <DefineConstants>TRACE</DefineConstants> 73 73 <Optimize>true</Optimize> … … 80 80 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> 81 81 <DebugSymbols>true</DebugSymbols> 82 <OutputPath> $(SolutionDir)\bin\</OutputPath>82 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 83 83 <DefineConstants>DEBUG;TRACE</DefineConstants> 84 84 <DebugType>full</DebugType> … … 89 89 </PropertyGroup> 90 90 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> 91 <OutputPath> $(SolutionDir)\bin\</OutputPath>91 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 92 92 <DefineConstants>TRACE</DefineConstants> 93 93 <Optimize>true</Optimize>
Note: See TracChangeset
for help on using the changeset viewer.