Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11545 for trunk


Ignore:
Timestamp:
11/12/14 19:46:50 (10 years ago)
Author:
bburlacu
Message:

#2234: Updated test resources.

Location:
trunk/sources/HeuristicLab.Tests/Test Resources/Script Sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Tests/Test Resources/Script Sources/GridSearch_SVM_Classification_Script.cs

    r11514 r11545  
    4141        { "gamma", ValueGenerator.GenerateSteps(-4m, -1, 1).Select(x => Math.Pow(2,(double)x)) },
    4242//        { "eps", ValueGenerator.GenerateSteps(-8m, -1, 1).Select(x => Math.Pow(2, (double)x)) },
    43 //        { "nu" , ValueGenerator.GenerateSteps(0m, 1, 0.05m).Select(x => Math.Pow(2, (double)x)) },
     43        { "nu" , ValueGenerator.GenerateSteps(-10m, 0, 1m).Select(x => Math.Pow(2, (double)x)) },
    4444//        { "degree", ValueGenerator.GenerateSteps(1m, 4, 1).Select(x => (double)x) }
    4545  };
     
    5757  };
    5858
    59   private static SupportVectorClassificationSolution SvmGridSearch(IClassificationProblemData problemData, out svm_parameter bestParameters, out int nSv) {
    60     bestParameters = SupportVectorMachineUtil.GridSearch(problemData, svmParameterRanges, numberOfFolds, shuffleFolds, maximumDegreeOfParallelism);
     59  private static SupportVectorClassificationSolution SvmGridSearch(IClassificationProblemData problemData, out svm_parameter bestParameters, out int nSv, out double cvMse) {
     60    bestParameters = SupportVectorMachineUtil.GridSearch(out cvMse, problemData, svmParameterRanges, numberOfFolds, shuffleFolds, maximumDegreeOfParallelism);
    6161    double trainingError, testError;
    6262    string svmType = svmTypes[bestParameters.svm_type];
     
    8181
    8282    int nSv; // number of support vectors
     83    double cvMse;
    8384    svm_parameter bestParameters;
    84     var bestSolution = SvmGridSearch(problemData, out bestParameters, out nSv);
     85    var bestSolution = SvmGridSearch(problemData, out bestParameters, out nSv, out cvMse);
    8586
    8687    vars["bestSolution"] = bestSolution;
     
    103104  }
    104105}
     106
  • trunk/sources/HeuristicLab.Tests/Test Resources/Script Sources/GridSearch_SVM_Regression_Script.cs

    r11514 r11545  
    3838        { "svm_type", new List<double> {svm_parameter.NU_SVR } },
    3939        { "kernel_type", new List<double> { svm_parameter.RBF }},
    40         { "C", ValueGenerator.GenerateSteps(-1m, 10, 1).Select(x => Math.Pow(2, (double)x)) },
     40        { "C", ValueGenerator.GenerateSteps(-1m, 12, 1).Select(x => Math.Pow(2, (double)x)) },
    4141        { "gamma", ValueGenerator.GenerateSteps(-4m, -1, 1).Select(x => Math.Pow(2, (double)x)) },
    4242//        { "eps", ValueGenerator.GenerateSteps(-8m, -1, 1).Select(x => Math.Pow(2, (double)x)) },
    43 //        { "nu" , ValueGenerator.GenerateSteps(0m, 1, 0.05m).Select(x => Math.Pow(2, (double)x)) },
     43        { "nu" , ValueGenerator.GenerateSteps(-10m, 0, 1m).Select(x => Math.Pow(2, (double)x)) },
    4444//        { "degree", ValueGenerator.GenerateSteps(1m, 4, 1).Select(x => (double)x) }
    4545  };
     
    5757  };
    5858
    59   private static SupportVectorRegressionSolution SvmGridSearch(IRegressionProblemData problemData, out svm_parameter bestParameters, out int nSv) {
    60     bestParameters = SupportVectorMachineUtil.GridSearch(problemData, svmParameterRanges, numberOfFolds, shuffleFolds, maximumDegreeOfParallelism);
     59  private static SupportVectorRegressionSolution SvmGridSearch(IRegressionProblemData problemData, out svm_parameter bestParameters, out int nSv, out double cvMse) {
     60    bestParameters = SupportVectorMachineUtil.GridSearch(out cvMse, problemData, svmParameterRanges, numberOfFolds, shuffleFolds, maximumDegreeOfParallelism);
    6161    double trainingError, testError;
    6262    string svmType = svmTypes[bestParameters.svm_type];
     
    8181
    8282    int nSv; // number of support vectors
     83    double cvMse;
    8384    svm_parameter bestParameters;
    84     var bestSolution = SvmGridSearch(problemData, out bestParameters, out nSv);
     85    var bestSolution = SvmGridSearch(problemData, out bestParameters, out nSv, out cvMse);
    8586
    8687    vars["bestSolution"] = bestSolution;
     
    104105  }
    105106}
     107
Note: See TracChangeset for help on using the changeset viewer.