Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6754 for trunk


Ignore:
Timestamp:
09/13/11 17:01:47 (13 years ago)
Author:
gkronber
Message:

#1640 fixed a problem with empty trainingindizes when using cross-validation

Location:
trunk/sources
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveProblem.cs

    r6740 r6754  
    7373
    7474    private void UpdateEstimationLimits() {
    75       if (ProblemData.TrainingPartition.Start < ProblemData.TrainingPartition.End) {
     75      if (ProblemData.TrainingIndizes.Any()) {
    7676        var targetValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToList();
    7777        var mean = targetValues.Average();
     
    7979        EstimationLimits.Upper = mean + PunishmentFactor * range;
    8080        EstimationLimits.Lower = mean - PunishmentFactor * range;
     81      } else {
     82        EstimationLimits.Upper = double.MaxValue;
     83        EstimationLimits.Lower = double.MinValue;
    8184      }
    8285    }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs

    r6740 r6754  
    7272
    7373    private void UpdateEstimationLimits() {
    74       if (ProblemData.TrainingPartition.Start < ProblemData.TrainingPartition.End) {
     74      if (ProblemData.TrainingIndizes.Any()) {
    7575        var targetValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToList();
    7676        var mean = targetValues.Average();
     
    7878        EstimationLimits.Upper = mean + PunishmentFactor * range;
    7979        EstimationLimits.Lower = mean - PunishmentFactor * range;
     80      } else {
     81        EstimationLimits.Upper = double.MaxValue;
     82        EstimationLimits.Lower = double.MinValue;
    8083      }
    8184    }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveProblem.cs

    r6740 r6754  
    7777
    7878    private void UpdateEstimationLimits() {
    79       if (ProblemData.TrainingPartition.Start < ProblemData.TrainingPartition.End) {
     79      if (ProblemData.TrainingIndizes.Any()) {
    8080        var targetValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToList();
    8181        var mean = targetValues.Average();
     
    8383        EstimationLimits.Upper = mean + PunishmentFactor * range;
    8484        EstimationLimits.Lower = mean - PunishmentFactor * range;
     85      } else {
     86        EstimationLimits.Upper = double.MaxValue;
     87        EstimationLimits.Lower = double.MinValue;
    8588      }
    8689    }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs

    r6740 r6754  
    7474
    7575    private void UpdateEstimationLimits() {
    76       if (ProblemData.TrainingPartition.Start < ProblemData.TrainingPartition.End) {
     76      if (ProblemData.TrainingIndizes.Any()) {
    7777        var targetValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToList();
    7878        var mean = targetValues.Average();
     
    8080        EstimationLimits.Upper = mean + PunishmentFactor * range;
    8181        EstimationLimits.Lower = mean - PunishmentFactor * range;
     82      } else {
     83        EstimationLimits.Upper = double.MaxValue;
     84        EstimationLimits.Lower = double.MinValue;
    8285      }
    8386    }
Note: See TracChangeset for help on using the changeset viewer.