Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/25/12 13:11:18 (13 years ago)
Author:
sforsten
Message:

#1776:

  • added two calculators to test purposes
  • ClassificationEnsembleSolutionEstimatedClassValuesView shows the current average confidence of the correct and wrong classified samples
  • some calculators have been excluded from the project, so only relevant calculators are shown
Location:
branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleSolution.cs

    r7596 r8101  
    5656        if (value != null) {
    5757          weightCalculator = value;
    58           if (!ProblemData.IsEmpty)
     58          if (!ProblemData.IsEmpty) {
    5959            RecalculateResults();
     60          }
    6061        }
    6162      }
  • branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/AverageThresholdCalculator.cs

    r7729 r8101  
    5757    }
    5858
    59     protected override double DiscriminantAggregateEstimatedClassValues(IDictionary<IClassificationSolution, double> estimatedClassValues, IDictionary<IDiscriminantFunctionClassificationSolution, double> estimatedValues) {
    60       IList<double> values = estimatedValues.Select(x => x.Value).ToList();
    61       if (values.Count <= 0)
    62         return double.NaN;
    63       double avg = values.Average();
    64       return GetClassValueToAverage(avg);
    65     }
    66     private double GetClassValueToAverage(double avg) {
    67       double classValue = classValues.First();
    68       for (int i = 0; i < classValues.Count(); i++) {
    69         if (avg > threshold[i])
    70           classValue = classValues[i];
    71         else
    72           break;
    73       }
    74       return classValue;
    75     }
    76 
    7759    protected override double GetDiscriminantConfidence(IEnumerable<IDiscriminantFunctionClassificationSolution> solutions, int index, double estimatedClassValue) {
    7860      // only works with binary classification
  • branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/DiscriminantClassificationWeightCalculator.cs

    r7729 r8101  
    6666
    6767    protected virtual double DiscriminantAggregateEstimatedClassValues(IDictionary<IClassificationSolution, double> estimatedClassValues, IDictionary<IDiscriminantFunctionClassificationSolution, double> estimatedValues) {
    68       return AggregateEstimatedClassValues(estimatedClassValues);
     68      return base.AggregateEstimatedClassValues(estimatedClassValues);
    6969    }
    7070
  • branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/MedianThresholdCalculator.cs

    r7729 r8101  
    5757    }
    5858
    59     protected override double DiscriminantAggregateEstimatedClassValues(IDictionary<IClassificationSolution, double> estimatedClassValues, IDictionary<IDiscriminantFunctionClassificationSolution, double> estimatedValues) {
    60       IList<double> values = estimatedValues.Select(x => x.Value).ToList();
    61       if (values.Count <= 0)
    62         return double.NaN;
    63       double median = GetMedian(values);
    64       return GetClassValueToMedian(median);
    65     }
    66     private double GetClassValueToMedian(double median) {
    67       double classValue = classValues.First();
    68       for (int i = 0; i < classValues.Count(); i++) {
    69         if (median > threshold[i])
    70           classValue = classValues[i];
    71         else
    72           break;
    73       }
    74       return classValue;
    75     }
    76 
    7759    protected override double GetDiscriminantConfidence(IEnumerable<IDiscriminantFunctionClassificationSolution> solutions, int index, double estimatedClassValue) {
    7860      // only works with binary classification
     
    10688    }
    10789
    108     private double GetMedian(IList<double> estimatedValues) {
     90    protected double GetMedian(IList<double> estimatedValues) {
    10991      int count = estimatedValues.Count;
    11092      if (count % 2 == 0)
Note: See TracChangeset for help on using the changeset viewer.