Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/25/15 13:46:24 (9 years ago)
Author:
mkommend
Message:

#2276: Reintegrated branch for dataset refactoring.

Location:
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorClassification.cs

    r12504 r12509  
    149149    public static SupportVectorClassificationSolution CreateSupportVectorClassificationSolution(IClassificationProblemData problemData, IEnumerable<string> allowedInputVariables,
    150150      int svmType, int kernelType, double cost, double nu, double gamma, int degree, out double trainingAccuracy, out double testAccuracy, out int nSv) {
    151       Dataset dataset = problemData.Dataset;
     151      var dataset = problemData.Dataset;
    152152      string targetVariable = problemData.TargetVariable;
    153153      IEnumerable<int> rows = problemData.TrainingIndices;
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorMachineModel.cs

    r12012 r12509  
    120120
    121121    #region IRegressionModel Members
    122     public IEnumerable<double> GetEstimatedValues(Dataset dataset, IEnumerable<int> rows) {
     122    public IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) {
    123123      return GetEstimatedValuesHelper(dataset, rows);
    124124    }
     
    132132
    133133    #region IClassificationModel Members
    134     public IEnumerable<double> GetEstimatedClassValues(Dataset dataset, IEnumerable<int> rows) {
     134    public IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows) {
    135135      if (classValues == null) throw new NotSupportedException();
    136136      // return the original class value instead of the predicted value of the model
     
    159159    }
    160160    #endregion
    161     private IEnumerable<double> GetEstimatedValuesHelper(Dataset dataset, IEnumerable<int> rows) {
     161    private IEnumerable<double> GetEstimatedValuesHelper(IDataset dataset, IEnumerable<int> rows) {
    162162      // calculate predictions for the currently requested rows
    163163      svm_problem problem = SupportVectorMachineUtil.CreateSvmProblem(dataset, targetVariable, allowedInputVariables, rows);
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorMachineUtil.cs

    r12012 r12509  
    4040    /// <param name="rowIndices">The rows of the dataset that should be contained in the resulting SVM-problem</param>
    4141    /// <returns>A problem data type that can be used to train a support vector machine.</returns>
    42     public static svm_problem CreateSvmProblem(Dataset dataset, string targetVariable, IEnumerable<string> inputVariables, IEnumerable<int> rowIndices) {
     42    public static svm_problem CreateSvmProblem(IDataset dataset, string targetVariable, IEnumerable<string> inputVariables, IEnumerable<int> rowIndices) {
    4343      double[] targetVector = dataset.GetDoubleValues(targetVariable, rowIndices).ToArray();
    4444      svm_node[][] nodes = new svm_node[targetVector.Length][];
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorRegression.cs

    r12504 r12509  
    152152      string svmType, string kernelType, double cost, double nu, double gamma, double epsilon, int degree,
    153153      out double trainingR2, out double testR2, out int nSv) {
    154       Dataset dataset = problemData.Dataset;
     154      var dataset = problemData.Dataset;
    155155      string targetVariable = problemData.TargetVariable;
    156156      IEnumerable<int> rows = problemData.TrainingIndices;
Note: See TracChangeset for help on using the changeset viewer.