Changeset 15976
- Timestamp:
- 06/29/18 09:07:03 (6 years ago)
- Location:
- branches/EfficientGlobalOptimization/HeuristicLab.Algorithms.EGO
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/EfficientGlobalOptimization/HeuristicLab.Algorithms.EGO/DiscreteEGO/DiscreteAdaptiveSamplingAlgorithm.cs
r15343 r15976 40 40 private const string RemoveDuplicatesParamterName = "PerturbDuplicates"; 41 41 private const string MaxModelSizeParameterName = "Maximal Model Size"; 42 private const string InitialDatasetParameterName = "SampleSet"; 42 43 #endregion 43 44 … … 53 54 public IFixedValueParameter<BoolValue> RemoveDuplicatesParameter => (IFixedValueParameter<BoolValue>)Parameters[RemoveDuplicatesParamterName]; 54 55 public IFixedValueParameter<IntValue> MaxModelSizeParameter => (IFixedValueParameter<IntValue>)Parameters[MaxModelSizeParameterName]; 56 public IValueParameter<IDataset> InitialDatasetParameter => (IValueParameter<IDataset>)Parameters[InitialDatasetParameterName]; 55 57 #endregion 56 58 … … 67 69 public int MaxModelSize => MaxModelSizeParameter.Value.Value; 68 70 private SolutionsCreator SolutionsCreator => OperatorGraph.Iterate().OfType<SolutionsCreator>().First(); 71 public IDataset InitialDataset => InitialDatasetParameter.Value; 69 72 #endregion 70 73 … … 168 171 Parameters.Add(new FixedValueParameter<BoolValue>(RemoveDuplicatesParamterName, "Whether (almost) duplicate points in the dataset should be perturbed before evaluation (this greatly increases numerical stability for some model types)", new BoolValue(true))); 169 172 Parameters.Add(new FixedValueParameter<IntValue>("Maximal Model Size", "The maximum number of sample points used to build the model", new IntValue(-1))); 173 Parameters.Add(new ValueParameter<IDataset>(InitialDatasetParameterName, "The initial dataset that should be built upon.", new ModifiableDataset())); 170 174 #endregion 171 175 -
branches/EfficientGlobalOptimization/HeuristicLab.Algorithms.EGO/DiscreteEGO/DiscreteSampleCollector.cs
r15343 r15976 20 20 #endregion 21 21 22 using System.Collections.Generic; 23 using System.Linq; 22 24 using HeuristicLab.Common; 23 25 using HeuristicLab.Core; … … 59 61 if (data.Columns != vector.Length + 1) { 60 62 if (data.Columns != 0 || data.Rows != 0) throw new OperatorExecutionException(this, "dataset columns do not match samplesize+1"); 61 for (var i = 0; i < vector.Length; i++)62 data.AddVariable("input" + i, new double[0]);63 data .AddVariable("output", new double[0]);64 } 65 AddRow(data, vector, quality); 66 return base.InstrumentedApply(); ;63 var variableNames = vector.Select((x, i) => string.Format("input" + i)).Concat("output".ToEnumerable()); 64 var variableValues = vector.Select(x => (double)x).Concat(quality.ToEnumerable()).Select(x => new List<double> { x }); 65 data = DatasetParameter.ActualValue = new ModifiableDataset(variableNames, variableValues); 66 } else AddRow(data, vector, quality); 67 68 return base.InstrumentedApply(); 67 69 } 68 70 -
branches/EfficientGlobalOptimization/HeuristicLab.Algorithms.EGO/HeuristicLab.Algorithms.EGO-3.4.csproj
r15343 r15976 17 17 <DebugType>full</DebugType> 18 18 <Optimize>false</Optimize> 19 <OutputPath>..\..\..\trunk\ sources\bin\</OutputPath>19 <OutputPath>..\..\..\trunk\bin\</OutputPath> 20 20 <DefineConstants>TRACE;DEBUG;CODE_ANALYSIS</DefineConstants> 21 21 <ErrorReport>prompt</ErrorReport> … … 33 33 <Reference Include="HeuristicLab.Algorithms.CMAEvolutionStrategy-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 34 34 <SpecificVersion>False</SpecificVersion> 35 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Algorithms.CMAEvolutionStrategy-3.4.dll</HintPath> 35 <HintPath>..\..\..\trunk\bin\HeuristicLab.Algorithms.CMAEvolutionStrategy-3.4.dll</HintPath> 36 <Private>False</Private> 36 37 </Reference> 37 38 <Reference Include="HeuristicLab.Algorithms.DataAnalysis-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 38 39 <SpecificVersion>False</SpecificVersion> 39 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Algorithms.DataAnalysis-3.4.dll</HintPath> 40 <HintPath>..\..\..\trunk\bin\HeuristicLab.Algorithms.DataAnalysis-3.4.dll</HintPath> 41 <Private>False</Private> 40 42 </Reference> 41 43 <Reference Include="HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 42 44 <SpecificVersion>False</SpecificVersion> 43 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3.dll</HintPath> 45 <HintPath>..\..\..\trunk\bin\HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3.dll</HintPath> 46 <Private>False</Private> 44 47 </Reference> 45 48 <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 46 49 <SpecificVersion>False</SpecificVersion> 47 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Analysis-3.3.dll</HintPath> 50 <HintPath>..\..\..\trunk\bin\HeuristicLab.Analysis-3.3.dll</HintPath> 51 <Private>False</Private> 48 52 </Reference> 49 53 <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 50 54 <SpecificVersion>False</SpecificVersion> 51 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath> 55 <HintPath>..\..\..\trunk\bin\HeuristicLab.Collections-3.3.dll</HintPath> 56 <Private>False</Private> 52 57 </Reference> 53 58 <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 54 59 <SpecificVersion>False</SpecificVersion> 55 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath> 60 <HintPath>..\..\..\trunk\bin\HeuristicLab.Common-3.3.dll</HintPath> 61 <Private>False</Private> 56 62 </Reference> 57 63 <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 58 64 <SpecificVersion>False</SpecificVersion> 59 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath> 65 <HintPath>..\..\..\trunk\bin\HeuristicLab.Core-3.3.dll</HintPath> 66 <Private>False</Private> 60 67 </Reference> 61 68 <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 62 69 <SpecificVersion>False</SpecificVersion> 63 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath> 70 <HintPath>..\..\..\trunk\bin\HeuristicLab.Data-3.3.dll</HintPath> 71 <Private>False</Private> 64 72 </Reference> 65 73 <Reference Include="HeuristicLab.Encodings.IntegerVectorEncoding-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 66 74 <SpecificVersion>False</SpecificVersion> 67 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Encodings.IntegerVectorEncoding-3.3.dll</HintPath> 75 <HintPath>..\..\..\trunk\bin\HeuristicLab.Encodings.IntegerVectorEncoding-3.3.dll</HintPath> 76 <Private>False</Private> 68 77 </Reference> 69 78 <Reference Include="HeuristicLab.Encodings.PermutationEncoding-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 70 79 <SpecificVersion>False</SpecificVersion> 71 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Encodings.PermutationEncoding-3.3.dll</HintPath> 80 <HintPath>..\..\..\trunk\bin\HeuristicLab.Encodings.PermutationEncoding-3.3.dll</HintPath> 81 <Private>False</Private> 72 82 </Reference> 73 83 <Reference Include="HeuristicLab.Encodings.RealVectorEncoding-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 74 84 <SpecificVersion>False</SpecificVersion> 75 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Encodings.RealVectorEncoding-3.3.dll</HintPath> 76 </Reference> 77 <Reference Include="HeuristicLab.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec" /> 85 <HintPath>..\..\..\trunk\bin\HeuristicLab.Encodings.RealVectorEncoding-3.3.dll</HintPath> 86 <Private>False</Private> 87 </Reference> 88 <Reference Include="HeuristicLab.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec"> 89 <Private>False</Private> 90 </Reference> 78 91 <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 79 92 <SpecificVersion>False</SpecificVersion> 80 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath> 93 <HintPath>..\..\..\trunk\bin\HeuristicLab.Optimization-3.3.dll</HintPath> 94 <Private>False</Private> 81 95 </Reference> 82 96 <Reference Include="HeuristicLab.Optimization.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 83 97 <SpecificVersion>False</SpecificVersion> 84 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Optimization.Operators-3.3.dll</HintPath> 98 <HintPath>..\..\..\trunk\bin\HeuristicLab.Optimization.Operators-3.3.dll</HintPath> 99 <Private>False</Private> 85 100 </Reference> 86 101 <Reference Include="HeuristicLab.Parameters-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 87 102 <SpecificVersion>False</SpecificVersion> 88 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Parameters-3.3.dll</HintPath> 103 <HintPath>..\..\..\trunk\bin\HeuristicLab.Parameters-3.3.dll</HintPath> 104 <Private>False</Private> 89 105 </Reference> 90 106 <Reference Include="HeuristicLab.Persistence-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 91 107 <SpecificVersion>False</SpecificVersion> 92 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Persistence-3.3.dll</HintPath> 108 <HintPath>..\..\..\trunk\bin\HeuristicLab.Persistence-3.3.dll</HintPath> 109 <Private>False</Private> 93 110 </Reference> 94 111 <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 95 112 <SpecificVersion>False</SpecificVersion> 96 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> 113 <HintPath>..\..\..\trunk\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> 114 <Private>False</Private> 97 115 </Reference> 98 116 <Reference Include="HeuristicLab.Problems.DataAnalysis-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 99 117 <SpecificVersion>False</SpecificVersion> 100 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis-3.4.dll</HintPath> 101 </Reference> 102 <Reference Include="HeuristicLab.Problems.Instances-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec" /> 118 <HintPath>..\..\..\trunk\bin\HeuristicLab.Problems.DataAnalysis-3.4.dll</HintPath> 119 <Private>False</Private> 120 </Reference> 121 <Reference Include="HeuristicLab.Problems.Instances-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec"> 122 <Private>False</Private> 123 </Reference> 103 124 <Reference Include="HeuristicLab.Problems.SurrogateProblem-3.3, Version=3.3.0.0, Culture=neutral, processorArchitecture=MSIL"> 104 125 <SpecificVersion>False</SpecificVersion> 105 <HintPath>..\..\..\trunk\ sources\bin\HeuristicLab.Problems.SurrogateProblem-3.3.dll</HintPath>126 <HintPath>..\..\..\trunk\bin\HeuristicLab.Problems.SurrogateProblem-3.3.dll</HintPath> 106 127 </Reference> 107 128 <Reference Include="HeuristicLab.Random-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 108 129 <SpecificVersion>False</SpecificVersion> 109 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Random-3.3.dll</HintPath> 130 <HintPath>..\..\..\trunk\bin\HeuristicLab.Random-3.3.dll</HintPath> 131 <Private>False</Private> 110 132 </Reference> 111 133 <Reference Include="Microsoft.Build.Tasks.v4.0" /> -
branches/EfficientGlobalOptimization/HeuristicLab.Algorithms.EGO/Operators/FitnessClusteringAnalyzer.cs
r15338 r15976 86 86 private ScatterPlot CreateTSNEPlot(KMeansClusteringSolution clustering, ModifiableDataset data, IRandom random) { 87 87 var clusteredData = (ModifiableDataset)data.Clone(); 88 clusteredData.AddVariable("cluster", clustering.ClusterValues.Select(x => (double)x) );88 clusteredData.AddVariable("cluster", clustering.ClusterValues.Select(x => (double)x).ToList()); 89 89 90 90 var prob = new RegressionProblem { -
branches/EfficientGlobalOptimization/HeuristicLab.Algorithms.EGO/Operators/SampleCollector.cs
r15343 r15976 20 20 #endregion 21 21 22 using System.Collections.Generic; 23 using System.Linq; 22 24 using HeuristicLab.Common; 23 25 using HeuristicLab.Core; … … 58 60 if (data.Columns != vector.Length + 1) { 59 61 if (data.Columns != 0 || data.Rows != 0) throw new OperatorExecutionException(this, "dataset columns do not match samplesize+1"); 60 for (var i = 0; i < vector.Length; i++) 61 data.AddVariable("input" + i, new double[0]); 62 data.AddVariable("output", new double[0]); 62 data = new ModifiableDataset( 63 Enumerable.Range(0, vector.Length).Select(x => "input" + x).Concat(new[] { "output" }), 64 Enumerable.Range(0, vector.Length + 1).Select(x => new List<double>())); 65 DatasetParameter.ActualValue = data; 63 66 } 64 67 AddRow(data, vector, quality); 65 return base.InstrumentedApply(); ;68 return base.InstrumentedApply(); 66 69 } 67 70 -
branches/EfficientGlobalOptimization/HeuristicLab.Algorithms.EGO/Plugin.cs.frame
r15064 r15976 30 30 [PluginDependency("HeuristicLab.Algorithms.CMAEvolutionStrategy", "3.4")] 31 31 [PluginDependency("HeuristicLab.Algorithms.DataAnalysis", "3.4")] 32 [PluginDependency("HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm", "3.3")] 32 33 [PluginDependency("HeuristicLab.Analysis", "3.3")] 33 34 [PluginDependency("HeuristicLab.Collections", "3.3")] … … 35 36 [PluginDependency("HeuristicLab.Core", "3.3")] 36 37 [PluginDependency("HeuristicLab.Data", "3.3")] 38 [PluginDependency("HeuristicLab.Encodings.IntegerVectorEncoding", "3.3")] 37 39 [PluginDependency("HeuristicLab.Encodings.RealVectorEncoding", "3.3")] 38 40 [PluginDependency("HeuristicLab.Encodings.PermutationEncoding", "3.3")] … … 45 47 [PluginDependency("HeuristicLab.Problems.Instances", "3.3")] 46 48 [PluginDependency("HeuristicLab.Random", "3.3")] 47 public class HeuristicLab ProblemsDataAnalysisSymbolicViewsPlugin : PluginBase {49 public class HeuristicLabAlgorithmsEGOPlugin : PluginBase { 48 50 } 49 51 }
Note: See TracChangeset
for help on using the changeset viewer.