Changeset 1922
- Timestamp:
- 05/27/09 18:26:10 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 1 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherBase.cs
r1873 r1922 44 44 } 45 45 46 public ExecutionGetNextJob() {46 public IAlgorithm GetNextJob() { 47 47 // find and select a dataset 48 48 var dataSetVar = new HeuristicLab.CEDMA.DB.Interfaces.Variable("DataSet"); … … 67 67 68 68 if (selectedAlgorithm != null) { 69 Execution exec = CreateExecution(dataSet.Problem, targetVariable, selectedAlgorithm); 70 exec.DataSetEntity = dataSetEntity; 71 exec.TargetVariable = targetVariableName; 72 return exec; 73 } else return null; 69 SetProblemParameters(selectedAlgorithm, dataSet.Problem, targetVariable); 70 } 71 return selectedAlgorithm; 74 72 } 75 73 … … 78 76 public abstract IAlgorithm SelectAlgorithm(Entity dataSet, int targetVariable, LearningTask learningTask); 79 77 80 private Execution CreateExecution(Problem problem, int targetVariable, IAlgorithm algorithm) {81 SetProblemParameters(algorithm, problem, targetVariable);82 Execution exec = new Execution(algorithm.Engine);83 exec.Description = algorithm.Name;84 return exec;85 }86 87 78 private void SetProblemParameters(IAlgorithm algo, Problem problem, int targetVariable) { 88 algo. ProblemInjector.GetVariable("Dataset").Value= problem.DataSet;89 algo. ProblemInjector.GetVariable("TargetVariable").GetValue<IntData>().Data= targetVariable;79 algo.Dataset = problem.DataSet; 80 algo.TargetVariable = targetVariable; 90 81 algo.ProblemInjector.GetVariable("TrainingSamplesStart").GetValue<IntData>().Data = problem.TrainingSamplesStart; 91 82 algo.ProblemInjector.GetVariable("TrainingSamplesEnd").GetValue<IntData>().Data = problem.TrainingSamplesEnd; -
trunk/sources/HeuristicLab.CEDMA.Server/3.3/ExecuterBase.cs
r1898 r1922 38 38 using HeuristicLab.Core; 39 39 using System.Threading; 40 using HeuristicLab.Modeling; 40 41 41 42 namespace HeuristicLab.CEDMA.Server { … … 68 69 protected abstract void StartJobs(); 69 70 70 protected void StoreResults(Execution finishedExecution, IEngine finishedEngine) { 71 Entity model = new Entity(Ontology.CedmaNameSpace + Guid.NewGuid()); 72 store.Add(new Statement(finishedExecution.DataSetEntity, Ontology.PredicateHasModel, model)); 73 StoreModelAttribute(model, Ontology.TargetVariable, finishedExecution.TargetVariable); 74 StoreModelAttribute(model, Ontology.AlgorithmName, finishedExecution.Description); 75 Scope bestModelScope = finishedEngine.GlobalScope.GetVariableValue<Scope>("BestValidationSolution", false); 76 StoreModelVariable(model, Ontology.TrainingMeanSquaredError, bestModelScope, "Quality"); 77 StoreModelVariable(model, Ontology.ValidationMeanSquaredError, bestModelScope, "ValidationQuality"); 78 StoreModelVariable(model, Ontology.TestMeanSquaredError, bestModelScope, "TestQuality"); 79 StoreModelVariable(model, Ontology.TrainingMeanAbsolutePercentageError, bestModelScope, "TrainingMAPE"); 80 StoreModelVariable(model, Ontology.ValidationMeanAbsolutePercentageError, bestModelScope, "ValidationMAPE"); 81 StoreModelVariable(model, Ontology.TestMeanAbsolutePercentageError, bestModelScope, "TestMAPE"); 82 StoreModelVariable(model, Ontology.TrainingMeanAbsolutePercentageOfRangeError, bestModelScope, "TrainingMAPRE"); 83 StoreModelVariable(model, Ontology.ValidationMeanAbsolutePercentageOfRangeError, bestModelScope, "ValidationMAPRE"); 84 StoreModelVariable(model, Ontology.TestMeanAbsolutePercentageOfRangeError, bestModelScope, "TestMAPRE"); 85 StoreModelVariable(model, Ontology.TrainingCoefficientOfDetermination, bestModelScope, "TrainingR2"); 86 StoreModelVariable(model, Ontology.ValidationCoefficientOfDetermination, bestModelScope, "ValidationR2"); 87 StoreModelVariable(model, Ontology.TestCoefficientOfDetermination, bestModelScope, "TestR2"); 88 StoreModelVariable(model, Ontology.TrainingCoefficientOfDetermination, bestModelScope, "TrainingVAF"); 89 StoreModelVariable(model, Ontology.ValidationCoefficientOfDetermination, bestModelScope, "ValidationVAF"); 90 StoreModelVariable(model, Ontology.TestCoefficientOfDetermination, bestModelScope, "TestVAF"); 91 StoreModelVariable(model, Ontology.TrainingTheilsInequalityCoefficient, bestModelScope, "TrainingTheilInequalityCoefficient"); 92 StoreModelVariable(model, Ontology.ValidationTheilsInequalityCoefficient, bestModelScope, "ValidationTheilInequalityCoefficient"); 93 StoreModelVariable(model, Ontology.TestTheilsInequalityCoefficient, bestModelScope, "TestTheilInequalityCoefficient"); 94 StoreModelVariable(model, Ontology.TrainingAccuracy, bestModelScope, "TrainingAccuracy"); 95 StoreModelVariable(model, Ontology.ValidationAccuracy, bestModelScope, "ValidationAccuracy"); 96 StoreModelVariable(model, Ontology.TestAccuracy, bestModelScope, "TestAccuracy"); 97 StoreModelVariable(model, Ontology.TreeSize, bestModelScope, "TreeSize"); 98 StoreModelVariable(model, Ontology.TreeHeight, bestModelScope, "TreeHeight"); 99 StoreModelVariable(model, Ontology.EvaluatedSolutions, bestModelScope, "EvaluatedSolutions"); 71 protected void StoreResults(IAlgorithm finishedAlgorithm) { 72 Entity modelEntity = new Entity(Ontology.CedmaNameSpace + Guid.NewGuid()); 73 // TODO (gkronber 27052009) 74 // store.Add(new Statement(finishedAlgorithm.DataSetEntity, Ontology.PredicateHasModel, modelEntity)); 75 StoreModelAttribute(modelEntity, Ontology.TargetVariable, finishedAlgorithm.Model.TargetVariable); 76 StoreModelAttribute(modelEntity, Ontology.AlgorithmName, finishedAlgorithm.Description); 77 78 IModel model = finishedAlgorithm.Model; 79 StoreModelAttribute(modelEntity, Ontology.TrainingMeanSquaredError, model.TrainingMeanSquaredError); 80 StoreModelAttribute(modelEntity, Ontology.ValidationMeanSquaredError, model.ValidationMeanSquaredError); 81 StoreModelAttribute(modelEntity, Ontology.TestMeanSquaredError, model.TestMeanSquaredError); 82 StoreModelAttribute(modelEntity, Ontology.TrainingCoefficientOfDetermination, model.TrainingCoefficientOfDetermination); 83 StoreModelAttribute(modelEntity, Ontology.ValidationCoefficientOfDetermination, model.ValidationCoefficientOfDetermination); 84 StoreModelAttribute(modelEntity, Ontology.TestCoefficientOfDetermination, model.TestCoefficientOfDetermination); 85 StoreModelAttribute(modelEntity, Ontology.TrainingVarianceAccountedFor, model.TrainingVarianceAccountedFor); 86 StoreModelAttribute(modelEntity, Ontology.ValidationVarianceAccountedFor, model.ValidationVarianceAccountedFor); 87 StoreModelAttribute(modelEntity, Ontology.TestVarianceAccountedFor, model.TestVarianceAccountedFor); 88 StoreModelAttribute(modelEntity, Ontology.TrainingMeanAbsolutePercentageError, model.TrainingMeanAbsolutePercentageError); 89 StoreModelAttribute(modelEntity, Ontology.ValidationMeanAbsolutePercentageError, model.ValidationMeanAbsolutePercentageError); 90 StoreModelAttribute(modelEntity, Ontology.TestMeanAbsolutePercentageError, model.TestMeanAbsolutePercentageError); 91 StoreModelAttribute(modelEntity, Ontology.TrainingMeanAbsolutePercentageOfRangeError, model.TrainingMeanAbsolutePercentageOfRangeError); 92 StoreModelAttribute(modelEntity, Ontology.ValidationMeanAbsolutePercentageOfRangeError, model.ValidationMeanAbsolutePercentageOfRangeError); 93 StoreModelAttribute(modelEntity, Ontology.TestMeanAbsolutePercentageOfRangeError, model.TestMeanAbsolutePercentageOfRangeError); 100 94 101 byte[] serializedModel = PersistenceManager.SaveToGZip(bestModelScope.GetVariableValue("FunctionTree", false)); 102 store.Add(new Statement(model, Ontology.PredicateSerializedData, new Literal(Convert.ToBase64String(serializedModel)))); 103 } 104 105 private void StoreModelVariable(Entity model, Entity entity, Scope scope, string variableName) { 106 if (scope.GetVariable(variableName) != null) 107 StoreModelAttribute(model, entity, scope.GetVariableValue<ObjectData>(variableName, false).Data); 95 byte[] serializedModel = PersistenceManager.SaveToGZip(model.Data); 96 store.Add(new Statement(modelEntity, Ontology.PredicateSerializedData, new Literal(Convert.ToBase64String(serializedModel)))); 108 97 } 109 98 -
trunk/sources/HeuristicLab.CEDMA.Server/3.3/GridExecuter.cs
r1898 r1922 38 38 using HeuristicLab.Core; 39 39 using System.Threading; 40 using HeuristicLab.Modeling; 40 41 41 42 namespace HeuristicLab.CEDMA.Server { 42 43 public class GridExecuter : ExecuterBase { 43 44 private JobManager jobManager; 44 private Dictionary<WaitHandle, Execution> activeExecutions;45 private Dictionary<WaitHandle, IAlgorithm> activeAlgorithms; 45 46 46 47 private TimeSpan StartJobInterval { … … 66 67 Thread.Sleep(StartJobInterval); 67 68 // get an execution from the dispatcher and execute in grid via job-manager 68 Execution execution= Dispatcher.GetNextJob();69 if ( execution!= null) {70 AtomicOperation op = new AtomicOperation( execution.Engine.OperatorGraph.InitialOperator, execution.Engine.GlobalScope);71 WaitHandle opWh = jobManager.BeginExecuteOperation( execution.Engine.GlobalScope, op);69 IAlgorithm algorithm = Dispatcher.GetNextJob(); 70 if (algorithm != null) { 71 AtomicOperation op = new AtomicOperation(algorithm.Engine.OperatorGraph.InitialOperator, algorithm.Engine.GlobalScope); 72 WaitHandle opWh = jobManager.BeginExecuteOperation(algorithm.Engine.GlobalScope, op); 72 73 wh.Add(opWh); 73 74 activeOperations.Add(opWh, op); 74 lock (active Executions) {75 active Executions.Add(opWh, execution);75 lock (activeAlgorithms) { 76 activeAlgorithms.Add(opWh, algorithm); 76 77 } 77 78 } … … 84 85 AtomicOperation finishedOp = activeOperations[readyHandle]; 85 86 wh.Remove(readyHandle); 86 Execution finishedExecution= null;87 lock (active Executions) {88 finished Execution = activeExecutions[readyHandle];89 active Executions.Remove(readyHandle);87 IAlgorithm finishedAlgorithm = null; 88 lock (activeAlgorithms) { 89 finishedAlgorithm = activeAlgorithms[readyHandle]; 90 activeAlgorithms.Remove(readyHandle); 90 91 } 91 92 activeOperations.Remove(readyHandle); … … 99 100 } 100 101 if (finishedEngine != null) { 101 StoreResults(finished Execution, finishedEngine);102 StoreResults(finishedAlgorithm); 102 103 } 103 104 } … … 110 111 111 112 public override string[] GetJobs() { 112 lock (active Executions) {113 string[] retVal = new string[active Executions.Count];113 lock (activeAlgorithms) { 114 string[] retVal = new string[activeAlgorithms.Count]; 114 115 int i = 0; 115 foreach ( Execution e in activeExecutions.Values) {116 retVal[i++] = "Target-Variable: " + e.TargetVariable + " " + e.Description;116 foreach (IAlgorithm a in activeAlgorithms.Values) { 117 retVal[i++] = "Target-Variable: " + a.TargetVariable + " " + a.Description; 117 118 } 118 119 return retVal; -
trunk/sources/HeuristicLab.CEDMA.Server/3.3/HeuristicLab.CEDMA.Server-3.3.csproj
r1898 r1922 99 99 <Compile Include="GridExecuter.cs" /> 100 100 <Compile Include="IDispatcher.cs" /> 101 <Compile Include="Execution.cs" />102 101 <Compile Include="Server.cs" /> 103 102 <Compile Include="ServerApplication.cs" /> -
trunk/sources/HeuristicLab.CEDMA.Server/3.3/HiveExecuter.cs
r1898 r1922 39 39 using System.Threading; 40 40 using HeuristicLab.Hive.Engine; 41 using HeuristicLab.Modeling; 41 42 42 43 namespace HeuristicLab.CEDMA.Server { 43 44 public class HiveExecuter : ExecuterBase { 44 private Dictionary<WaitHandle, Execution> activeExecutions;45 private Dictionary<WaitHandle, IAlgorithm> activeAlgorithms; 45 46 private Dictionary<WaitHandle, HiveEngine> activeEngines; 46 47 private string hiveUrl; … … 57 58 : base(dispatcher, store) { 58 59 this.hiveUrl = hiveUrl; 59 active Executions = new Dictionary<WaitHandle, Execution>();60 activeAlgorithms = new Dictionary<WaitHandle, IAlgorithm>(); 60 61 activeEngines = new Dictionary<WaitHandle, HiveEngine>(); 61 62 } … … 68 69 while (wh.Count < MaxActiveJobs) { 69 70 Thread.Sleep(StartJobInterval); 70 // get an executionfrom the dispatcher and execute in grid via job-manager71 Execution execution= Dispatcher.GetNextJob();72 if ( execution!= null) {71 // get an algo from the dispatcher and execute in grid via job-manager 72 IAlgorithm algorithm = Dispatcher.GetNextJob(); 73 if (algorithm != null) { 73 74 HiveEngine engine = new HiveEngine(); 74 75 engine.HiveServerUrl = hiveUrl; 75 IOperator initialOp = execution.Engine.OperatorGraph.InitialOperator;76 IOperator initialOp = algorithm.Engine.OperatorGraph.InitialOperator; 76 77 engine.OperatorGraph.AddOperator(initialOp); 77 78 engine.OperatorGraph.InitialOperator = initialOp; 78 RegisterFinishedCallback(engine, execution, wh);79 RegisterFinishedCallback(engine, algorithm, wh); 79 80 engine.Reset(); 80 81 engine.Execute(); … … 90 91 activeEngines.Remove(readyHandle); 91 92 92 Execution finishedExecution = activeExecutions[readyHandle];93 lock (active Executions) {94 active Executions.Remove(readyHandle);93 IAlgorithm finishedAlgorithm = activeAlgorithms[readyHandle]; 94 lock (activeAlgorithms) { 95 activeAlgorithms.Remove(readyHandle); 95 96 } 96 StoreResults(finished Execution, finishedEngine);97 StoreResults(finishedAlgorithm); 97 98 readyHandle.Close(); 98 99 } … … 104 105 } 105 106 106 private void RegisterFinishedCallback(HiveEngine engine, Execution execution, List<WaitHandle> wh) {107 private void RegisterFinishedCallback(HiveEngine engine, IAlgorithm algorithm, List<WaitHandle> wh) { 107 108 ManualResetEvent waithandle = new ManualResetEvent(false); 108 109 wh.Add(waithandle); 109 110 engine.Finished += (sender, args) => waithandle.Set(); 110 lock (active Executions) {111 active Executions.Add(waithandle, execution);111 lock (activeAlgorithms) { 112 activeAlgorithms.Add(waithandle, algorithm); 112 113 } 113 114 activeEngines.Add(waithandle, engine); … … 115 116 116 117 public override string[] GetJobs() { 117 lock (active Executions) {118 string[] retVal = new string[active Executions.Count];118 lock (activeAlgorithms) { 119 string[] retVal = new string[activeAlgorithms.Count]; 119 120 int i = 0; 120 foreach ( Execution e in activeExecutions.Values) {121 retVal[i++] = "Target-Variable: " + e.TargetVariable + " " + e.Description;121 foreach (IAlgorithm a in activeAlgorithms.Values) { 122 retVal[i++] = "Target-Variable: " + a.TargetVariable + " " + a.Description; 122 123 } 123 124 return retVal; -
trunk/sources/HeuristicLab.CEDMA.Server/3.3/IDispatcher.cs
r1529 r1922 35 35 using HeuristicLab.Data; 36 36 using HeuristicLab.Core; 37 using HeuristicLab.Modeling; 37 38 38 39 namespace HeuristicLab.CEDMA.Server { 39 40 public interface IDispatcher { 40 ExecutionGetNextJob();41 IAlgorithm GetNextJob(); 41 42 } 42 43 } -
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/AlgorithmBase.cs
r1906 r1922 42 42 public virtual string Description { get { return "TODO"; } } 43 43 44 public abstract Dataset Dataset { get; set; } 45 public abstract int TargetVariable { get; set; } 46 44 47 public virtual double MutationRate { 45 48 get { return GetVariableInjector().GetVariable("MutationRate").GetValue<DoubleData>().Data; } … … 457 460 #endregion 458 461 462 459 463 } 460 464 } -
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/StandardGP.cs
r1908 r1922 40 40 41 41 public override string Name { get { return "StandardGP"; } } 42 43 public override int TargetVariable { 44 get { return ProblemInjector.GetVariableValue<IntData>("TargetVariable", null, false).Data; } 45 set { ProblemInjector.GetVariableValue<IntData>("TargetVariable", null, false).Data = value; } 46 } 47 48 public override Dataset Dataset { 49 get { return ProblemInjector.GetVariableValue<Dataset>("Dataset", null, false); } 50 set { ProblemInjector.GetVariable("Dataset").Value = value; } 51 } 42 52 43 53 public virtual int MaxGenerations { … … 315 325 Model model = base.CreateGPModel(bestModelScope); 316 326 model.TestMeanSquaredError = bestModelScope.GetVariableValue<DoubleData>("TestQuality", false).Data; 327 model.TrainingCoefficientOfDetermination = bestModelScope.GetVariableValue<DoubleData>("TrainingR2", false).Data; 328 model.ValidationCoefficientOfDetermination = bestModelScope.GetVariableValue<DoubleData>("ValidationR2", false).Data; 329 model.TestCoefficientOfDetermination = bestModelScope.GetVariableValue<DoubleData>("TestR2", false).Data; 330 model.TrainingMeanAbsolutePercentageError = bestModelScope.GetVariableValue<DoubleData>("TrainingMAPE", false).Data; 331 model.ValidationMeanAbsolutePercentageError = bestModelScope.GetVariableValue<DoubleData>("ValidationMAPE", false).Data; 332 model.TestMeanAbsolutePercentageError = bestModelScope.GetVariableValue<DoubleData>("TestMAPE", false).Data; 333 model.TrainingMeanAbsolutePercentageOfRangeError = bestModelScope.GetVariableValue<DoubleData>("TrainingMAPRE", false).Data; 334 model.ValidationMeanAbsolutePercentageOfRangeError = bestModelScope.GetVariableValue<DoubleData>("ValidationMAPRE", false).Data; 335 model.TestMeanAbsolutePercentageOfRangeError = bestModelScope.GetVariableValue<DoubleData>("TestMAPRE", false).Data; 336 model.TrainingVarianceAccountedFor = bestModelScope.GetVariableValue<DoubleData>("TrainingVAF", false).Data; 337 model.ValidationVarianceAccountedFor = bestModelScope.GetVariableValue<DoubleData>("ValidationVAF", false).Data; 338 model.TestVarianceAccountedFor = bestModelScope.GetVariableValue<DoubleData>("TestVAF", false).Data; 339 317 340 return model; 318 341 } -
trunk/sources/HeuristicLab.Modeling/3.2/IAlgorithm.cs
r1906 r1922 24 24 using System.Text; 25 25 using HeuristicLab.Core; 26 using HeuristicLab.DataAnalysis; 26 27 27 28 namespace HeuristicLab.Modeling { … … 30 31 string Description { get; } 31 32 IOperator ProblemInjector { get; set; } 33 Dataset Dataset { get; set; } 34 int TargetVariable { get; set; } 32 35 IEngine Engine { get; } 33 34 36 IModel Model { get; } 35 37 } -
trunk/sources/HeuristicLab.Modeling/3.2/IModel.cs
r1906 r1922 33 33 double ValidationMeanSquaredError { get; } 34 34 double TestMeanSquaredError { get; } 35 double TrainingMeanAbsolutePercentageError { get; } 36 double ValidationMeanAbsolutePercentageError { get; } 37 double TestMeanAbsolutePercentageError { get; } 38 double TrainingMeanAbsolutePercentageOfRangeError { get; } 39 double ValidationMeanAbsolutePercentageOfRangeError { get; } 40 double TestMeanAbsolutePercentageOfRangeError { get; } 41 double TrainingCoefficientOfDetermination { get; } 42 double ValidationCoefficientOfDetermination { get; } 43 double TestCoefficientOfDetermination { get; } 44 double TrainingVarianceAccountedFor { get; } 45 double ValidationVarianceAccountedFor { get; } 46 double TestVarianceAccountedFor { get; } 47 35 48 IItem Data { get; } 36 49 } -
trunk/sources/HeuristicLab.Modeling/3.2/Model.cs
r1906 r1922 60 60 } 61 61 62 public double TrainingMeanAbsolutePercentageError { 63 get; 64 set; 65 } 66 67 public double ValidationMeanAbsolutePercentageError { 68 get; 69 set; 70 } 71 72 public double TestMeanAbsolutePercentageError { 73 get; 74 set; 75 } 76 77 public double TrainingMeanAbsolutePercentageOfRangeError { 78 get; 79 set; 80 } 81 82 public double ValidationMeanAbsolutePercentageOfRangeError { 83 get; 84 set; 85 } 86 87 public double TestMeanAbsolutePercentageOfRangeError { 88 get; 89 set; 90 } 91 92 public double TrainingCoefficientOfDetermination { 93 get; 94 set; 95 } 96 97 public double ValidationCoefficientOfDetermination { 98 get; 99 set; 100 } 101 102 public double TestCoefficientOfDetermination { 103 get; 104 set; 105 } 106 107 public double TrainingVarianceAccountedFor { 108 get; 109 set; 110 } 111 112 public double ValidationVarianceAccountedFor { 113 get; 114 set; 115 } 116 117 public double TestVarianceAccountedFor { 118 get; 119 set; 120 } 121 62 122 private IItem data; 63 123 public IItem Data { -
trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorRegression.cs
r1906 r1922 44 44 public IEngine Engine { 45 45 get { return engine; } 46 } 47 48 public Dataset Dataset { 49 get { return ProblemInjector.GetVariableValue<Dataset>("Dataset", null, false); } 50 set { ProblemInjector.GetVariable("Dataset").Value = value; } 51 } 52 53 public int TargetVariable { 54 get { return ProblemInjector.GetVariableValue<IntData>("TargetVariable", null, false).Data; } 55 set { ProblemInjector.GetVariableValue<IntData>("TargetVariable", null, false).Data = value; } 46 56 } 47 57 … … 284 294 protected internal virtual Model CreateSVMModel(IScope bestModelScope) { 285 295 Model model = new Model(); 296 model.TrainingMeanSquaredError = bestModelScope.GetVariableValue<DoubleData>("Quality", false).Data; 297 model.ValidationMeanSquaredError = bestModelScope.GetVariableValue<DoubleData>("ValidationQuality", false).Data; 298 model.TestMeanSquaredError = bestModelScope.GetVariableValue<DoubleData>("TestQuality", false).Data; 299 model.TrainingCoefficientOfDetermination = bestModelScope.GetVariableValue<DoubleData>("TrainingR2", false).Data; 300 model.ValidationCoefficientOfDetermination = bestModelScope.GetVariableValue<DoubleData>("ValidationR2", false).Data; 301 model.TestCoefficientOfDetermination = bestModelScope.GetVariableValue<DoubleData>("TestR2", false).Data; 302 model.TrainingMeanAbsolutePercentageError = bestModelScope.GetVariableValue<DoubleData>("TrainingMAPE", false).Data; 303 model.ValidationMeanAbsolutePercentageError = bestModelScope.GetVariableValue<DoubleData>("ValidationMAPE", false).Data; 304 model.TestMeanAbsolutePercentageError = bestModelScope.GetVariableValue<DoubleData>("TestMAPE", false).Data; 305 model.TrainingMeanAbsolutePercentageOfRangeError = bestModelScope.GetVariableValue<DoubleData>("TrainingMAPRE", false).Data; 306 model.ValidationMeanAbsolutePercentageOfRangeError = bestModelScope.GetVariableValue<DoubleData>("ValidationMAPRE", false).Data; 307 model.TestMeanAbsolutePercentageOfRangeError = bestModelScope.GetVariableValue<DoubleData>("TestMAPRE", false).Data; 308 model.TrainingVarianceAccountedFor = bestModelScope.GetVariableValue<DoubleData>("TrainingVAF", false).Data; 309 model.ValidationVarianceAccountedFor = bestModelScope.GetVariableValue<DoubleData>("ValidationVAF", false).Data; 310 model.TestVarianceAccountedFor = bestModelScope.GetVariableValue<DoubleData>("TestVAF", false).Data; 311 286 312 model.Data = bestModelScope.GetVariableValue<SVMModel>("BestValidationModel", false); 313 HeuristicLab.DataAnalysis.Dataset ds = bestModelScope.GetVariableValue<Dataset>("Dataset", true); 314 model.Dataset = ds; 315 model.TargetVariable = ds.GetVariableName(bestModelScope.GetVariableValue<IntData>("TargetVariable", true).Data); 287 316 return model; 288 317 } … … 308 337 309 338 #endregion 339 310 340 } 311 341 }
Note: See TracChangeset
for help on using the changeset viewer.