Free cookie consent management tool by TermsFeed Policy Generator

Changeset 172


Ignore:
Timestamp:
04/23/08 13:13:06 (17 years ago)
Author:
gkronber
Message:

changed StructIdProblemInjector to inject only the dataset and the target-variable (removed max-tree-height and max-tree-size variable).
also removed the requirement that TrainingSamplesStart and TrainingSamplesEnd have to be specified in the import file. If they are not defined explicitly we just use the whole dataset for training.

Location:
trunk/sources
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.DataAnalysis/DatasetParser.cs

    r2 r172  
    8989    public int TrainingSamplesStart {
    9090      get {
    91         return metadata["TRAININGSAMPLESSTART"][0].intValue;
     91        if(!metadata.ContainsKey("TRAININGSAMPLESTART")) return 0;
     92        else return metadata["TRAININGSAMPLESSTART"][0].intValue;
    9293      }
    9394    }
     
    9596    public int TrainingSamplesEnd {
    9697      get {
    97         return metadata["TRAININGSAMPLESEND"][0].intValue;
     98        if(!metadata.ContainsKey("TRAININGSAMPLEEND")) return rows;
     99        else return metadata["TRAININGSAMPLESEND"][0].intValue;
    98100      }
    99101    }
  • trunk/sources/HeuristicLab.StructureIdentification/StructIdProblemInjector.cs

    r171 r172  
    4141      AddVariableInfo(new VariableInfo("TargetVariable", "TargetVariable", typeof(IntData), VariableKind.New));
    4242      AddVariable(new Variable("TargetVariable", new IntData()));
    43       AddVariableInfo(new VariableInfo("MaxTreeHeight", "MaxTreeHeight", typeof(IntData), VariableKind.New));
    44       AddVariable(new Variable("MaxTreeHeight", new IntData(1)));
    45       AddVariableInfo(new VariableInfo("MaxTreeSize", "MaxTreeSize", typeof(IntData), VariableKind.New));
    46       AddVariable(new Variable("MaxTreeSize", new IntData(1)));
    4743    }
    4844
     
    5450      scope.AddVariable(new Variable(scope.TranslateName("Dataset"), (IItem)GetVariable("Dataset").Value.Clone()));
    5551      scope.AddVariable(new Variable(scope.TranslateName("TargetVariable"), (IItem)GetVariable("TargetVariable").Value.Clone()));
    56       scope.AddVariable(new Variable(scope.TranslateName("MaxTreeHeight"), (IItem)GetVariable("MaxTreeHeight").Value.Clone()));
    57       scope.AddVariable(new Variable(scope.TranslateName("MaxTreeSize"), (IItem)GetVariable("MaxTreeSize").Value.Clone()));
    5852      return null;
    5953    }
  • trunk/sources/HeuristicLab.StructureIdentification/StructIdProblemInjectorView.cs

    r168 r172  
    9191
    9292          ((IntData)StructIdProblemInjector.GetVariable("TargetVariable").Value).Data = parser.TargetVariable;
    93           ((IntData)StructIdProblemInjector.GetVariable("MaxTreeHeight").Value).Data = parser.MaxTreeHeight;
    94           ((IntData)StructIdProblemInjector.GetVariable("MaxTreeSize").Value).Data = parser.MaxTreeSize;
    9593          Refresh();
    9694        }
Note: See TracChangeset for help on using the changeset viewer.