Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/28/09 15:26:29 (15 years ago)
Author:
gkronber
Message:

Added problem view for the cedma server. #712

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs

    r2185 r2193  
    3636using HeuristicLab.Core;
    3737using HeuristicLab.Modeling;
     38using HeuristicLab.Modeling.Database;
    3839
    3940namespace HeuristicLab.CEDMA.Server {
     
    4849    private Dictionary<int, List<AlgorithmConfiguration>> finishedAndDispatchedRuns;
    4950
    50     public SimpleDispatcher(IModelingDatabase database)
    51       : base(database) {     
     51    public SimpleDispatcher(IModelingDatabase database, Problem problem)
     52      : base(database, problem) {     
    5253      random = new Random();
    5354      finishedAndDispatchedRuns = new Dictionary<int, List<AlgorithmConfiguration>>();
     
    5556    }
    5657
    57     public override IAlgorithm SelectAndConfigureAlgorithm(int targetVariable, int[] inputVariables, Problem problem) {
     58    public override HeuristicLab.Modeling.IAlgorithm SelectAndConfigureAlgorithm(int targetVariable, int[] inputVariables, Problem problem) {
    5859      DiscoveryService ds = new DiscoveryService();
    59       IAlgorithm[] algos = ds.GetInstances<IAlgorithm>();
    60       IAlgorithm selectedAlgorithm = null;
     60      HeuristicLab.Modeling.IAlgorithm[] algos = ds.GetInstances<HeuristicLab.Modeling.IAlgorithm>();
     61      HeuristicLab.Modeling.IAlgorithm selectedAlgorithm = null;
    6162      switch (problem.LearningTask) {
    6263        case LearningTask.Regression: {
     
    8586    }
    8687
    87     private IAlgorithm ChooseDeterministic(int targetVariable, int[] inputVariables, IEnumerable<IAlgorithm> algos) {
     88    private HeuristicLab.Modeling.IAlgorithm ChooseDeterministic(int targetVariable, int[] inputVariables, IEnumerable<HeuristicLab.Modeling.IAlgorithm> algos) {
    8889      var deterministicAlgos = algos
    8990        .Where(a => (a as IStochasticAlgorithm) == null)
     
    9495    }
    9596
    96     private IAlgorithm ChooseStochastic(IEnumerable<IAlgorithm> regressionAlgos) {
     97    private HeuristicLab.Modeling.IAlgorithm ChooseStochastic(IEnumerable<HeuristicLab.Modeling.IAlgorithm> regressionAlgos) {
    9798      var stochasticAlgos = regressionAlgos.Where(a => (a as IStochasticAlgorithm) != null);
    9899      if (stochasticAlgos.Count() == 0) return null;
     
    149150    }
    150151
    151     private void SetProblemParameters(IAlgorithm algo, Problem problem, int targetVariable, int[] inputVariables) {
     152    private void SetProblemParameters(HeuristicLab.Modeling.IAlgorithm algo, Problem problem, int targetVariable, int[] inputVariables) {
    152153      algo.Dataset = problem.Dataset;
    153154      algo.TargetVariable = targetVariable;
Note: See TracChangeset for help on using the changeset viewer.