Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/27/09 18:26:10 (16 years ago)
Author:
gkronber
Message:

#650 (IAlgorithm and derived interfaces should provide properties to retrieve results):

  • Implemented properties to retrieve model quality
  • Changed CEDMA executor to retrieve results via properties
  • Removed obsolete class Execution in CEDMA (replaced by the interface IAlgorithm)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorRegression.cs

    r1906 r1922  
    4444    public IEngine Engine {
    4545      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; }
    4656    }
    4757
     
    284294    protected internal virtual Model CreateSVMModel(IScope bestModelScope) {
    285295      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     
    286312      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);
    287316      return model;
    288317    }
     
    308337
    309338    #endregion
     339
    310340  }
    311341}
Note: See TracChangeset for help on using the changeset viewer.