- Timestamp:
- 03/26/14 16:37:02 (11 years ago)
- Location:
- branches/DataPreprocessing
- Files:
-
- 1 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataPreprocessorStarter.cs
r10559 r10673 26 26 using HeuristicLab.Optimization; 27 27 using HeuristicLab.Problems.DataAnalysis; 28 using HeuristicLab.Problems.DataAnalysis.Symbolic; 28 29 using HeuristicLab.Problems.DataAnalysis.Views; 29 30 using View = HeuristicLab.MainForm.WindowsForms.View; … … 34 35 public void Start(IDataAnalysisProblemData problemData, View currentView) { 35 36 IAlgorithm algorithm; 36 I DataAnalysisProblem problem;37 ISymbolicDataAnalysisProblem problem; 37 38 IItem parentItem = GetMostOuterContent(currentView, out algorithm, out problem); 38 39 var context = new PreprocessingContext(problemData, algorithm, problem); … … 40 41 } 41 42 42 private IItem GetMostOuterContent(Control control, out IAlgorithm algorithm, out I DataAnalysisProblem problem) {43 private IItem GetMostOuterContent(Control control, out IAlgorithm algorithm, out ISymbolicDataAnalysisProblem problem) { 43 44 algorithm = null; 44 45 problem = null; … … 51 52 algorithm = (IAlgorithm)itemView.Content; 52 53 } 53 if (itemView.Content is I DataAnalysisProblem) {54 problem = (I DataAnalysisProblem)itemView.Content;54 if (itemView.Content is ISymbolicDataAnalysisProblem) { 55 problem = (ISymbolicDataAnalysisProblem)itemView.Content; 55 56 } 56 57 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/HeuristicLab.DataPreprocessing.Views-3.3.csproj
r10667 r10673 214 214 <Name>HeuristicLab.PluginInfrastructure-3.3</Name> 215 215 </ProjectReference> 216 <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj"> 217 <Project>{3d28463f-ec96-4d82-afee-38be91a0ca00}</Project> 218 <Name>HeuristicLab.Problems.DataAnalysis.Symbolic-3.4</Name> 219 </ProjectReference> 216 220 <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Views\3.4\HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj"> 217 221 <Project>{3E9E8944-44FF-40BB-A622-3A4A7DD0F198}</Project> -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/Plugin.cs.frame
r10583 r10673 34 34 [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")] 35 35 [PluginDependency("HeuristicLab.Problems.DataAnalysis.Views","3.4")] 36 [PluginDependency("HeuristicLab.Problems.DataAnalysis.Symbolic", "3.4")] 36 37 public class HeuristicLabDataPreprocessingPlugin : PluginBase { 37 38 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/HeuristicLab.DataPreprocessing-3.3.csproj
r10671 r10673 160 160 <Private>False</Private> 161 161 </ProjectReference> 162 <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj"> 163 <Project>{3d28463f-ec96-4d82-afee-38be91a0ca00}</Project> 164 <Name>HeuristicLab.Problems.DataAnalysis.Symbolic-3.4</Name> 165 </ProjectReference> 162 166 <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj"> 163 167 <Project>{df87c13e-a889-46ff-8153-66dcaa8c5674}</Project> -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingContext.cs
r10617 r10673 23 23 using HeuristicLab.Common; 24 24 using HeuristicLab.Core; 25 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 25 26 using HeuristicLab.Optimization; 26 27 using HeuristicLab.Problems.DataAnalysis; 28 using HeuristicLab.Problems.DataAnalysis.Symbolic; 27 29 28 30 namespace HeuristicLab.DataPreprocessing { … … 37 39 public IAlgorithm Algorithm { get; private set; } 38 40 39 public I DataAnalysisProblem Problem { get; private set; }41 public ISymbolicDataAnalysisProblem Problem { get; private set; } 40 42 41 public PreprocessingContext(IDataAnalysisProblemData dataAnalysisProblemData, IAlgorithm algorithm, I DataAnalysisProblem problem) {43 public PreprocessingContext(IDataAnalysisProblemData dataAnalysisProblemData, IAlgorithm algorithm, ISymbolicDataAnalysisProblem problem) { 42 44 Data = new TransactionalPreprocessingData(dataAnalysisProblemData); 43 45 DataAnalysisProblemData = dataAnalysisProblemData; … … 72 74 } 73 75 74 private I DataAnalysisProblem SetupProblem(IProblem problem) {75 return (I DataAnalysisProblem)problem;76 private ISymbolicDataAnalysisProblem SetupProblem(IProblem problem) { 77 return (ISymbolicDataAnalysisProblem)problem; 76 78 } 77 private I DataAnalysisProblem SetupAlgorithm(IAlgorithm algorithm) {79 private ISymbolicDataAnalysisProblem SetupAlgorithm(IAlgorithm algorithm) { 78 80 algorithm.Name = algorithm.Name + "(Preprocessed)"; 79 81 algorithm.Runs.Clear(); 80 return (I DataAnalysisProblem)algorithm.Problem;82 return (ISymbolicDataAnalysisProblem)algorithm.Problem; 81 83 } 82 private T Export<T>(T original, Func<T, I DataAnalysisProblem> setup)84 private T Export<T>(T original, Func<T, ISymbolicDataAnalysisProblem> setup) 83 85 where T : IItem { 84 86 var creator = new ProblemDataCreator(this); … … 91 93 problem.Name = "Preprocessed " + problem.Name; 92 94 95 var tree = new SymbolicExpressionTree(new ProgramRootSymbol().CreateTreeNode()); 96 var variableNode = (VariableTreeNode)new HeuristicLab.Problems.DataAnalysis.Symbolic.Variable("dummy", "dummy description").CreateTreeNode(); 97 variableNode.VariableName = "dummy"; 98 tree.Root.AddSubtree(variableNode); 99 100 problem.TransformationsParameter.Value.Add(tree); 101 93 102 return clone; 94 103 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IPreprocessingContext.cs
r10617 r10673 24 24 using HeuristicLab.Optimization; 25 25 using HeuristicLab.Problems.DataAnalysis; 26 using HeuristicLab.Problems.DataAnalysis.Symbolic; 26 27 27 28 namespace HeuristicLab.DataPreprocessing { … … 36 37 IAlgorithm Algorithm { get; } 37 38 38 I DataAnalysisProblem Problem { get; }39 ISymbolicDataAnalysisProblem Problem { get; } 39 40 40 41 IItem ExportAlgorithmOrProblem(); -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Plugin.cs.frame
r10671 r10673 41 41 [PluginDependency("HeuristicLab.Problems.DataAnalysis","3.4")] 42 42 [PluginDependency("HeuristicLab.Problems.DataAnalysis.Views","3.4")] 43 [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding","3.4")] 44 [PluginDependency("HeuristicLab.Parameters","3.4")] 43 [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding", "3.4")] 44 [PluginDependency("HeuristicLab.Problems.DataAnalysis.Symbolic", "3.4")] 45 [PluginDependency("HeuristicLab.Parameters","3.3")] 45 46 public class HeuristicLabDataPreprocessingPlugin : PluginBase { 46 47 } -
branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj
r10538 r10673 221 221 <Compile Include="Symbols\VariableConditionTreeNode.cs" /> 222 222 <Compile Include="Symbols\VariableTreeNode.cs" /> 223 <Compile Include="TransformationCollection.cs" /> 223 224 <None Include="HeuristicLab.snk" /> 224 225 <None Include="Plugin.cs.frame" /> -
branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisProblem.cs
r9456 r10673 35 35 IFixedValueParameter<IntRange> FitnessCalculationPartitionParameter { get; } 36 36 IFixedValueParameter<IntRange> ValidationPartitionParameter { get; } 37 IFixedValueParameter<TransformationCollection> TransformationsParameter { get; } 37 38 38 39 ISymbolicDataAnalysisGrammar SymbolicExpressionTreeGrammar { get; set; } -
branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs
r9830 r10673 54 54 private const string ValidationPartitionParameterName = "ValidationPartition"; 55 55 private const string ApplyLinearScalingParameterName = "ApplyLinearScaling"; 56 private const string TransformationsParameterName = "Transformations"; 56 57 57 58 private const string ProblemDataParameterDescription = ""; … … 66 67 private const string ValidationPartitionParameterDescription = "The partition of the problem data training partition, that should be used to select the best model from (optional)."; 67 68 private const string ApplyLinearScalingParameterDescription = "Flag that indicates if the individual should be linearly scaled before evaluating."; 69 private const string TransformationsParameterDescrioption = "The transformations which were applied on the input variables."; 68 70 #endregion 69 71 … … 104 106 public IFixedValueParameter<BoolValue> ApplyLinearScalingParameter { 105 107 get { return (IFixedValueParameter<BoolValue>)Parameters[ApplyLinearScalingParameterName]; } 108 } 109 public IFixedValueParameter<TransformationCollection> TransformationsParameter { 110 get { return (IFixedValueParameter<TransformationCollection>)Parameters[TransformationsParameterName]; } 106 111 } 107 112 #endregion … … 167 172 if (GetType().Name.Contains("SymbolicRegression")) 168 173 ApplyLinearScaling.Value = true; 174 } 175 176 if (!Parameters.ContainsKey(TransformationsParameterName)) { 177 Parameters.Add(new FixedValueParameter<TransformationCollection>(TransformationsParameterName, TransformationsParameterDescrioption, new TransformationCollection())); 178 TransformationsParameter.Hidden = true; 169 179 } 170 180 … … 189 199 Parameters.Add(new FixedValueParameter<PercentValue>(RelativeNumberOfEvaluatedSamplesParameterName, RelativeNumberOfEvaluatedSamplesParameterDescription, new PercentValue(1))); 190 200 Parameters.Add(new FixedValueParameter<BoolValue>(ApplyLinearScalingParameterName, ApplyLinearScalingParameterDescription, new BoolValue(false))); 201 Parameters.Add(new FixedValueParameter<TransformationCollection>(TransformationsParameterName, TransformationsParameterDescrioption, new TransformationCollection())); 191 202 192 203 SymbolicExpressionTreeInterpreterParameter.Hidden = true; … … 194 205 MaximumFunctionDefinitionsParameter.Hidden = true; 195 206 ApplyLinearScalingParameter.Hidden = true; 207 TransformationsParameter.Hidden = true; 196 208 197 209 SymbolicExpressionTreeGrammar = new TypeCoherentExpressionGrammar();
Note: See TracChangeset
for help on using the changeset viewer.