- Timestamp:
- 08/10/09 14:11:37 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs
r2258 r2270 43 43 } 44 44 45 private Random random; 45 private Random random; 46 46 private Dictionary<int, List<AlgorithmConfiguration>> finishedAndDispatchedRuns; 47 47 48 48 public SimpleDispatcher(IModelingDatabase database, Problem problem) 49 : base(database, problem) { 49 : base(database, problem) { 50 50 random = new Random(); 51 51 finishedAndDispatchedRuns = new Dictionary<int, List<AlgorithmConfiguration>>(); … … 100 100 private void PopulateFinishedRuns() { 101 101 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 }; 106 107 foreach (var algo in dispatchedAlgos) { 107 108 AddDispatchedRun(algo.TargetVariable, algo.Inputvariables, algo.Algorithm); … … 144 145 private void AddDispatchedRun(string targetVariable, IEnumerable<string> inputVariables, string algorithm) { 145 146 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(), 148 149 algorithm); 149 150 } -
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/BaseClasses/AlgorithmBase.cs
r2242 r2270 423 423 model.Dataset = ds; 424 424 model.TargetVariable = ds.GetVariableName(bestModelScope.GetVariableValue<IntData>("TargetVariable", true).Data); 425 model.TrainingSamplesStart = bestModelScope.GetVariableValue<IntData>("TrainingSamplesStart", true).Data; 426 model.TrainingSamplesEnd = bestModelScope.GetVariableValue<IntData>("TrainingSamplesEnd", true).Data; 427 model.ValidationSamplesStart = bestModelScope.GetVariableValue<IntData>("ValidationSamplesStart", true).Data; 428 model.ValidationSamplesEnd = bestModelScope.GetVariableValue<IntData>("ValidationSamplesEnd", true).Data; 429 model.TestSamplesStart = bestModelScope.GetVariableValue<IntData>("TestSamplesStart", true).Data; 430 model.TestSamplesEnd = bestModelScope.GetVariableValue<IntData>("TestSamplesEnd", true).Data; 431 425 432 model.TrainingMeanSquaredError = bestModelScope.GetVariableValue<DoubleData>("Quality", false).Data; 426 433 model.ValidationMeanSquaredError = bestModelScope.GetVariableValue<DoubleData>("ValidationQuality", false).Data; -
trunk/sources/HeuristicLab.LinearRegression/3.2/LinearRegression.cs
r2242 r2270 152 152 testMSE.GetVariableInfo("SamplesEnd").ActualName = "TestSamplesEnd"; 153 153 #endregion 154 154 155 155 #region R2 156 156 CoefficientOfDeterminationEvaluator trainingR2 = new CoefficientOfDeterminationEvaluator(); … … 290 290 model.Dataset = ds; 291 291 model.TargetVariable = ds.GetVariableName(bestModelScope.GetVariableValue<IntData>("TargetVariable", true).Data); 292 model.TrainingSamplesStart = bestModelScope.GetVariableValue<IntData>("TrainingSamplesStart", true).Data; 293 model.TrainingSamplesEnd = bestModelScope.GetVariableValue<IntData>("TrainingSamplesEnd", true).Data; 294 model.ValidationSamplesStart = bestModelScope.GetVariableValue<IntData>("ValidationSamplesStart", true).Data; 295 model.ValidationSamplesEnd = bestModelScope.GetVariableValue<IntData>("ValidationSamplesEnd", true).Data; 296 model.TestSamplesStart = bestModelScope.GetVariableValue<IntData>("TestSamplesStart", true).Data; 297 model.TestSamplesEnd = bestModelScope.GetVariableValue<IntData>("TestSamplesEnd", true).Data; 292 298 293 299 ItemList evaluationImpacts = bestModelScope.GetVariableValue<ItemList>("VariableEvaluationImpacts", false); -
trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DatabaseService.cs
r2229 r2270 68 68 69 69 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 77 70 GetOrCreateProblem(algorithm.Dataset); 78 71 Dictionary<string, Variable> variables = GetAllVariables(); … … 83 76 using (ModelingDataContext ctx = new ModelingDataContext(connection)) { 84 77 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; 91 84 92 85 ctx.Models.InsertOnSubmit(model); -
trunk/sources/HeuristicLab.Modeling/3.2/IModel.cs
r2223 r2270 31 31 string TargetVariable { get; } 32 32 IEnumerable<string> InputVariables { get; } 33 int TrainingSamplesStart { get; set; } 34 int TrainingSamplesEnd { get; set; } 35 int ValidationSamplesStart { get; set; } 36 int ValidationSamplesEnd { get; set; } 37 int TestSamplesStart { get; set; } 38 int TestSamplesEnd { get; set; } 33 39 double TrainingMeanSquaredError { get; } 34 40 double ValidationMeanSquaredError { get; } -
trunk/sources/HeuristicLab.Modeling/3.2/Model.cs
r2223 r2270 46 46 get { return inputVariables; } 47 47 } 48 49 public int TrainingSamplesStart { get; set; } 50 public int TrainingSamplesEnd { get; set; } 51 public int ValidationSamplesStart { get; set; } 52 public int ValidationSamplesEnd { get; set; } 53 public int TestSamplesStart { get; set; } 54 public int TestSamplesEnd { get; set; } 48 55 49 56 public void AddInputVariables(string variableName) { -
trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorRegression.cs
r2251 r2270 162 162 modelScopeCreator.AddVariable(new HeuristicLab.Core.Variable("SubScopes", new IntData(1))); 163 163 main.AddSubOperator(modelScopeCreator); 164 164 165 165 SequentialSubScopesProcessor seqSubScopesProc = new SequentialSubScopesProcessor(); 166 166 IOperator modelProcessor = CreateModelProcessor(); … … 238 238 nuBranch.Name = "NuLoop"; 239 239 nuBranch.GetVariableInfo("Condition").ActualName = "RepeatNuLoop"; 240 240 241 241 nuBranch.AddSubOperator(nuLoop); 242 242 nuLoop.AddSubOperator(nuBranch); … … 362 362 progOp.RemoveVariableInfo("Result"); 363 363 progOp.AddVariableInfo(new VariableInfo("Value", "Value", typeof(IntData), VariableKind.In | VariableKind.Out)); 364 progOp.Code = "Value.Data = " +value+";";364 progOp.Code = "Value.Data = " + value + ";"; 365 365 progOp.GetVariableInfo("Value").ActualName = paramName; 366 366 return progOp; … … 443 443 model.Dataset = ds; 444 444 model.TargetVariable = ds.GetVariableName(bestModelScope.GetVariableValue<IntData>("TargetVariable", true).Data); 445 model.TrainingSamplesStart = bestModelScope.GetVariableValue<IntData>("TrainingSamplesStart", true).Data; 446 model.TrainingSamplesEnd = bestModelScope.GetVariableValue<IntData>("TrainingSamplesEnd", true).Data; 447 model.ValidationSamplesStart = bestModelScope.GetVariableValue<IntData>("ValidationSamplesStart", true).Data; 448 model.ValidationSamplesEnd = bestModelScope.GetVariableValue<IntData>("ValidationSamplesEnd", true).Data; 449 model.TestSamplesStart = bestModelScope.GetVariableValue<IntData>("TestSamplesStart", true).Data; 450 model.TestSamplesEnd = bestModelScope.GetVariableValue<IntData>("TestSamplesEnd", true).Data; 445 451 446 452 ItemList evaluationImpacts = bestModelScope.GetVariableValue<ItemList>("VariableEvaluationImpacts", false);
Note: See TracChangeset
for help on using the changeset viewer.