Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5823


Ignore:
Timestamp:
03/24/11 13:24:09 (14 years ago)
Author:
gkronber
Message:

#1418 fixed minor issues in symbolic data analysis classes.

Location:
trunk/sources
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveOverfittingAnalyzer.cs

    r5809 r5823  
    8585                                    select EvaluatorParameter.ActualValue.Evaluate(childContext, tree, ProblemDataParameter.ActualValue, rows))
    8686                                   .ToArray();
    87       double r = alglib.spearmancorr2(trainingQuality, validationQuality);
     87      double r = 0.0;
     88      try {
     89        r = alglib.spearmancorr2(trainingQuality, validationQuality);
     90      }
     91      catch (alglib.alglibexception) {
     92        r = 0.0;
     93      }
    8894
    8995      TrainingValidationQualityCorrelationParameter.ActualValue = new DoubleValue(r);
    90 
    9196      if (TrainingValidationQualityCorrelationTableParameter.ActualValue == null) {
    9297        var dataTable = new DataTable(TrainingValidationQualityCorrelationTableParameter.Name, TrainingValidationQualityCorrelationTableParameter.Description);
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator.cs

    r5809 r5823  
    5959      }
    6060      catch (ArgumentException) {
    61         // if R² cannot be calculated because of NaN or ininity elements => return worst possible fitness valuse
     61        // if R² cannot be calculated because of NaN or ininity elements => return worst possible fitness value
    6262        return 0.0;
    6363      }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveOverfittingAnalyzer.cs

    r5809 r5823  
    8585                                    select EvaluatorParameter.ActualValue.Evaluate(childContext, tree, ProblemDataParameter.ActualValue, rows))
    8686                                   .ToArray();
    87       double r = alglib.spearmancorr2(trainingQuality, validationQuality);
     87      double r = 0.0;
     88      try {
     89        r = alglib.spearmancorr2(trainingQuality, validationQuality);
     90      }
     91      catch (alglib.alglibexception) {
     92        r = 0.0;
     93      }
    8894
    8995      TrainingValidationQualityCorrelationParameter.ActualValue = new DoubleValue(r);
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.cs

    r5809 r5823  
    5959      }
    6060      catch (ArgumentException) {
    61         // if R² cannot be calculated because of NaN or ininity elements => return worst possible fitness valuse
     61        // if R² cannot be calculated because of NaN or ininity elements => return worst possible fitness value
    6262        return 0.0;
    6363      }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Evaluators/SymbolicDataAnalysisEvaluator.cs

    r5809 r5823  
    9393      int samplesStart = EvaluationPartitionParameter.ActualValue.Start;
    9494      int samplesEnd = EvaluationPartitionParameter.ActualValue.End;
     95      int testPartitionStart = ProblemDataParameter.ActualValue.TestPartition.Start;
     96      int testPartitionEnd = ProblemDataParameter.ActualValue.TestPartition.End;
    9597
    9698      if (samplesEnd < samplesStart) throw new ArgumentException("Start value is larger than end value.");
     
    98100      if (count == 0) count = 1;
    99101      return RandomEnumerable.SampleRandomNumbers(seed, samplesStart, samplesEnd, count)
    100         .Where(i => i < ProblemDataParameter.ActualValue.TestPartition.Start || ProblemDataParameter.ActualValue.TestPartition.End <= i);
     102        .Where(i => i < testPartitionStart || testPartitionEnd <= i);
    101103    }
    102104  }
Note: See TracChangeset for help on using the changeset viewer.