Changeset 2193 for branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs
- Timestamp:
- 07/28/09 15:26:29 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs
r2185 r2193 36 36 using HeuristicLab.Core; 37 37 using HeuristicLab.Modeling; 38 using HeuristicLab.Modeling.Database; 38 39 39 40 namespace HeuristicLab.CEDMA.Server { … … 48 49 private Dictionary<int, List<AlgorithmConfiguration>> finishedAndDispatchedRuns; 49 50 50 public SimpleDispatcher(IModelingDatabase database )51 : base(database ) {51 public SimpleDispatcher(IModelingDatabase database, Problem problem) 52 : base(database, problem) { 52 53 random = new Random(); 53 54 finishedAndDispatchedRuns = new Dictionary<int, List<AlgorithmConfiguration>>(); … … 55 56 } 56 57 57 public override IAlgorithm SelectAndConfigureAlgorithm(int targetVariable, int[] inputVariables, Problem problem) {58 public override HeuristicLab.Modeling.IAlgorithm SelectAndConfigureAlgorithm(int targetVariable, int[] inputVariables, Problem problem) { 58 59 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; 61 62 switch (problem.LearningTask) { 62 63 case LearningTask.Regression: { … … 85 86 } 86 87 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) { 88 89 var deterministicAlgos = algos 89 90 .Where(a => (a as IStochasticAlgorithm) == null) … … 94 95 } 95 96 96 private IAlgorithm ChooseStochastic(IEnumerable<IAlgorithm> regressionAlgos) {97 private HeuristicLab.Modeling.IAlgorithm ChooseStochastic(IEnumerable<HeuristicLab.Modeling.IAlgorithm> regressionAlgos) { 97 98 var stochasticAlgos = regressionAlgos.Where(a => (a as IStochasticAlgorithm) != null); 98 99 if (stochasticAlgos.Count() == 0) return null; … … 149 150 } 150 151 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) { 152 153 algo.Dataset = problem.Dataset; 153 154 algo.TargetVariable = targetVariable;
Note: See TracChangeset
for help on using the changeset viewer.