Changeset 2161 for trunk/sources/HeuristicLab.SupportVectorMachines
- Timestamp:
- 07/15/09 16:23:29 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorRegression.cs
r2127 r2161 142 142 seq.Name = "Initialization"; 143 143 seq.AddSubOperator(CreateGlobalInjector()); 144 seq.AddSubOperator(new ProblemInjector()); 144 ProblemInjector probInjector = new ProblemInjector(); 145 probInjector.GetVariableInfo("MaxNumberOfTrainingSamples").Local = true; 146 probInjector.AddVariable(new Variable("MaxNumberOfTrainingSamples", new IntData(5000))); 147 seq.AddSubOperator(probInjector); 145 148 seq.AddSubOperator(new RandomInjector()); 149 150 DatasetShuffler shuffler = new DatasetShuffler(); 151 shuffler.GetVariableInfo("ShuffleStart").ActualName = "TrainingSamplesStart"; 152 shuffler.GetVariableInfo("ShuffleEnd").ActualName = "TrainingSamplesEnd"; 153 seq.AddSubOperator(shuffler); 146 154 return seq; 147 155 } … … 246 254 247 255 SupportVectorCreator modelCreator = new SupportVectorCreator(); 248 modelCreator.GetVariableInfo("SamplesStart").ActualName = " TrainingSamplesStart";249 modelCreator.GetVariableInfo("SamplesEnd").ActualName = " TrainingSamplesEnd";256 modelCreator.GetVariableInfo("SamplesStart").ActualName = "ActualTrainingSamplesStart"; 257 modelCreator.GetVariableInfo("SamplesEnd").ActualName = "ActualTrainingSamplesEnd"; 250 258 modelCreator.GetVariableInfo("SVMCost").ActualName = "Cost"; 251 259 modelCreator.GetVariableInfo("SVMGamma").ActualName = "Gamma"; … … 256 264 257 265 modelProcessor.AddSubOperator(modelCreator); 258 CombinedOperator trainingEvaluator = (CombinedOperator)CreateEvaluator(" Training");266 CombinedOperator trainingEvaluator = (CombinedOperator)CreateEvaluator("ActualTraining"); 259 267 trainingEvaluator.OperatorGraph.InitialOperator.SubOperators[1].GetVariableInfo("MSE").ActualName = "Quality"; 260 268 modelProcessor.AddSubOperator(trainingEvaluator); … … 415 423 model.ValidationMeanSquaredError = bestModelScope.GetVariableValue<DoubleData>("ValidationQuality", false).Data; 416 424 model.TestMeanSquaredError = bestModelScope.GetVariableValue<DoubleData>("TestQuality", false).Data; 417 model.TrainingCoefficientOfDetermination = bestModelScope.GetVariableValue<DoubleData>(" TrainingR2", false).Data;425 model.TrainingCoefficientOfDetermination = bestModelScope.GetVariableValue<DoubleData>("ActualTrainingR2", false).Data; 418 426 model.ValidationCoefficientOfDetermination = bestModelScope.GetVariableValue<DoubleData>("ValidationR2", false).Data; 419 427 model.TestCoefficientOfDetermination = bestModelScope.GetVariableValue<DoubleData>("TestR2", false).Data; 420 model.TrainingMeanAbsolutePercentageError = bestModelScope.GetVariableValue<DoubleData>(" TrainingMAPE", false).Data;428 model.TrainingMeanAbsolutePercentageError = bestModelScope.GetVariableValue<DoubleData>("ActualTrainingMAPE", false).Data; 421 429 model.ValidationMeanAbsolutePercentageError = bestModelScope.GetVariableValue<DoubleData>("ValidationMAPE", false).Data; 422 430 model.TestMeanAbsolutePercentageError = bestModelScope.GetVariableValue<DoubleData>("TestMAPE", false).Data; 423 model.TrainingMeanAbsolutePercentageOfRangeError = bestModelScope.GetVariableValue<DoubleData>(" TrainingMAPRE", false).Data;431 model.TrainingMeanAbsolutePercentageOfRangeError = bestModelScope.GetVariableValue<DoubleData>("ActualTrainingMAPRE", false).Data; 424 432 model.ValidationMeanAbsolutePercentageOfRangeError = bestModelScope.GetVariableValue<DoubleData>("ValidationMAPRE", false).Data; 425 433 model.TestMeanAbsolutePercentageOfRangeError = bestModelScope.GetVariableValue<DoubleData>("TestMAPRE", false).Data; 426 model.TrainingVarianceAccountedFor = bestModelScope.GetVariableValue<DoubleData>(" TrainingVAF", false).Data;434 model.TrainingVarianceAccountedFor = bestModelScope.GetVariableValue<DoubleData>("ActualTrainingVAF", false).Data; 427 435 model.ValidationVarianceAccountedFor = bestModelScope.GetVariableValue<DoubleData>("ValidationVAF", false).Data; 428 436 model.TestVarianceAccountedFor = bestModelScope.GetVariableValue<DoubleData>("TestVAF", false).Data;
Note: See TracChangeset
for help on using the changeset viewer.