Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10676 for branches


Ignore:
Timestamp:
03/27/14 12:49:33 (11 years ago)
Author:
pfleck
Message:
  • Data preprocessor now works with all types of data analysis problems. Only in case of a symbolic data analysis problem the inverse transformation information is added.
Location:
branches/DataPreprocessing
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataPreprocessorStarter.cs

    r10673 r10676  
    2626using HeuristicLab.Optimization;
    2727using HeuristicLab.Problems.DataAnalysis;
    28 using HeuristicLab.Problems.DataAnalysis.Symbolic;
    2928using HeuristicLab.Problems.DataAnalysis.Views;
    3029using View = HeuristicLab.MainForm.WindowsForms.View;
     
    3534    public void Start(IDataAnalysisProblemData problemData, View currentView) {
    3635      IAlgorithm algorithm;
    37       ISymbolicDataAnalysisProblem problem;
     36      IDataAnalysisProblem problem;
    3837      IItem parentItem = GetMostOuterContent(currentView, out algorithm, out problem);
    3938      var context = new PreprocessingContext(problemData, algorithm, problem);
     
    4140    }
    4241
    43     private IItem GetMostOuterContent(Control control, out IAlgorithm algorithm, out ISymbolicDataAnalysisProblem problem) {
     42    private IItem GetMostOuterContent(Control control, out IAlgorithm algorithm, out IDataAnalysisProblem problem) {
    4443      algorithm = null;
    4544      problem = null;
     
    5251            algorithm = (IAlgorithm)itemView.Content;
    5352          }
    54           if (itemView.Content is ISymbolicDataAnalysisProblem) {
    55             problem = (ISymbolicDataAnalysisProblem)itemView.Content;
     53          if (itemView.Content is IDataAnalysisProblem) {
     54            problem = (IDataAnalysisProblem)itemView.Content;
    5655          }
    5756        }
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/HeuristicLab.DataPreprocessing.Views-3.3.csproj

    r10673 r10676  
    214214      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
    215215    </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>
    220216    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Views\3.4\HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj">
    221217      <Project>{3E9E8944-44FF-40BB-A622-3A4A7DD0F198}</Project>
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/Plugin.cs.frame

    r10673 r10676  
    3434  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
    3535  [PluginDependency("HeuristicLab.Problems.DataAnalysis.Views","3.4")]
    36   [PluginDependency("HeuristicLab.Problems.DataAnalysis.Symbolic", "3.4")]
    3736  public class HeuristicLabDataPreprocessingPlugin : PluginBase {
    3837  }
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingContext.cs

    r10673 r10676  
    2727using HeuristicLab.Problems.DataAnalysis;
    2828using HeuristicLab.Problems.DataAnalysis.Symbolic;
     29using Variable = HeuristicLab.Problems.DataAnalysis.Symbolic.Variable;
    2930
    3031namespace HeuristicLab.DataPreprocessing {
     
    3940    public IAlgorithm Algorithm { get; private set; }
    4041
    41     public ISymbolicDataAnalysisProblem Problem { get; private set; }
     42    public IDataAnalysisProblem Problem { get; private set; }
    4243
    43     public PreprocessingContext(IDataAnalysisProblemData dataAnalysisProblemData, IAlgorithm algorithm, ISymbolicDataAnalysisProblem problem) {
     44    public PreprocessingContext(IDataAnalysisProblemData dataAnalysisProblemData, IAlgorithm algorithm, IDataAnalysisProblem problem) {
    4445      Data = new TransactionalPreprocessingData(dataAnalysisProblemData);
    4546      DataAnalysisProblemData = dataAnalysisProblemData;
     
    6364      if (Algorithm != null) {
    6465        return ExportAlgorithm();
    65       } else {
    66         return ExportProblem();
    6766      }
     67      return ExportProblem();
    6868    }
     69
    6970    public IProblem ExportProblem() {
    7071      return Export(Problem, SetupProblem);
     
    7475    }
    7576
    76     private ISymbolicDataAnalysisProblem SetupProblem(IProblem problem) {
    77       return (ISymbolicDataAnalysisProblem)problem;
     77    private IDataAnalysisProblem SetupProblem(IProblem problem) {
     78      return (IDataAnalysisProblem)problem;
    7879    }
    79     private ISymbolicDataAnalysisProblem SetupAlgorithm(IAlgorithm algorithm) {
     80    private IDataAnalysisProblem SetupAlgorithm(IAlgorithm algorithm) {
    8081      algorithm.Name = algorithm.Name + "(Preprocessed)";
    8182      algorithm.Runs.Clear();
    82       return (ISymbolicDataAnalysisProblem)algorithm.Problem;
     83      return (IDataAnalysisProblem)algorithm.Problem;
    8384    }
    84     private T Export<T>(T original, Func<T, ISymbolicDataAnalysisProblem> setup)
     85    private T Export<T>(T original, Func<T, IDataAnalysisProblem> setup)
    8586        where T : IItem {
    8687      var creator = new ProblemDataCreator(this);
     
    9394      problem.Name = "Preprocessed " + problem.Name;
    9495
    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);
     96      var symbolicProblem = problem as ISymbolicDataAnalysisProblem;
     97      if (symbolicProblem != null) {
     98        var tree = new SymbolicExpressionTree(new ProgramRootSymbol().CreateTreeNode());
     99        var variableNode = (VariableTreeNode)new Variable("dummy", "dummy description").CreateTreeNode();
     100        variableNode.VariableName = "dummy";
     101        tree.Root.AddSubtree(variableNode);
    99102
    100       problem.TransformationsParameter.Value.Add(tree);
     103        symbolicProblem.TransformationsParameter.Value.Add(tree);
     104      }
    101105
    102106      return clone;
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IPreprocessingContext.cs

    r10673 r10676  
    2424using HeuristicLab.Optimization;
    2525using HeuristicLab.Problems.DataAnalysis;
    26 using HeuristicLab.Problems.DataAnalysis.Symbolic;
    2726
    2827namespace HeuristicLab.DataPreprocessing {
     
    3736    IAlgorithm Algorithm { get; }
    3837
    39     ISymbolicDataAnalysisProblem Problem { get; }
     38    IDataAnalysisProblem Problem { get; }
    4039
    4140    IItem ExportAlgorithmOrProblem();
Note: See TracChangeset for help on using the changeset viewer.