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.CEDMA.Server/3.3/SimpleDispatcher.cs

    r2258 r2270  
    4343    }
    4444
    45     private Random random;   
     45    private Random random;
    4646    private Dictionary<int, List<AlgorithmConfiguration>> finishedAndDispatchedRuns;
    4747
    4848    public SimpleDispatcher(IModelingDatabase database, Problem problem)
    49       : base(database, problem) {     
     49      : base(database, problem) {
    5050      random = new Random();
    5151      finishedAndDispatchedRuns = new Dictionary<int, List<AlgorithmConfiguration>>();
     
    100100    private void PopulateFinishedRuns() {
    101101      var dispatchedAlgos = from model in Database.GetAllModels()
    102                             select new {
    103                               TargetVariable = model.TargetVariable.Name,
    104                               Algorithm = model.Algorithm.Name,
    105                               Inputvariables = Database.GetInputVariableResults(model).Select(x => x.Variable.Name).Distinct() };
     102                            select new {
     103                              TargetVariable = model.TargetVariable.Name,
     104                              Algorithm = model.Algorithm.Name,
     105                              Inputvariables = Database.GetInputVariableResults(model).Select(x => x.Variable.Name).Distinct()
     106                            };
    106107      foreach (var algo in dispatchedAlgos) {
    107108        AddDispatchedRun(algo.TargetVariable, algo.Inputvariables, algo.Algorithm);
     
    144145    private void AddDispatchedRun(string targetVariable, IEnumerable<string> inputVariables, string algorithm) {
    145146      AddDispatchedRun(
    146         Problem.Dataset.GetVariableIndex(targetVariable), 
    147         inputVariables.Select(x => Problem.Dataset.GetVariableIndex(x)).ToArray(), 
     147        Problem.Dataset.GetVariableIndex(targetVariable),
     148        inputVariables.Select(x => Problem.Dataset.GetVariableIndex(x)).ToArray(),
    148149        algorithm);
    149150    }
Note: See TracChangeset for help on using the changeset viewer.