Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/10/09 14:11:37 (15 years ago)
Author:
gkronber
Message:

Added properties for the separation in training/validation/test set to HL.Modeling.IModel. #712

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DatabaseService.cs

    r2229 r2270  
    6868
    6969    public void Persist(HeuristicLab.Modeling.IAlgorithm algorithm) {
    70       int trainingSamplesStart = ((IntData)algorithm.Engine.GlobalScope.GetVariableValue("TrainingSamplesStart", false)).Data;
    71       int trainingSamplesEnd = ((IntData)algorithm.Engine.GlobalScope.GetVariableValue("TrainingSamplesEnd", false)).Data;
    72       int validationSamplesStart = ((IntData)algorithm.Engine.GlobalScope.GetVariableValue("ValidationSamplesStart", false)).Data;
    73       int validationSamplesEnd = ((IntData)algorithm.Engine.GlobalScope.GetVariableValue("ValidationSamplesEnd", false)).Data;
    74       int testSamplesStart = ((IntData)algorithm.Engine.GlobalScope.GetVariableValue("TestSamplesStart", false)).Data;
    75       int testSamplesEnd = ((IntData)algorithm.Engine.GlobalScope.GetVariableValue("TestSamplesEnd", false)).Data;
    76 
    7770      GetOrCreateProblem(algorithm.Dataset);
    7871      Dictionary<string, Variable> variables = GetAllVariables();
     
    8376      using (ModelingDataContext ctx = new ModelingDataContext(connection)) {
    8477        model = new Model(target, algo);
    85         model.TrainingSamplesStart = trainingSamplesStart;
    86         model.TrainingSamplesEnd = trainingSamplesEnd;
    87         model.ValidationSamplesStart = validationSamplesStart;
    88         model.ValidationSamplesEnd = validationSamplesEnd;
    89         model.TestSamplesStart = testSamplesStart;
    90         model.TestSamplesEnd = testSamplesEnd;
     78        model.TrainingSamplesStart = algorithm.Model.TrainingSamplesStart;
     79        model.TrainingSamplesEnd = algorithm.Model.TrainingSamplesEnd;
     80        model.ValidationSamplesStart = algorithm.Model.ValidationSamplesStart;
     81        model.ValidationSamplesEnd = algorithm.Model.ValidationSamplesEnd;
     82        model.TestSamplesStart = algorithm.Model.TestSamplesStart;
     83        model.TestSamplesEnd = algorithm.Model.TestSamplesEnd;
    9184
    9285        ctx.Models.InsertOnSubmit(model);
Note: See TracChangeset for help on using the changeset viewer.