Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/15/15 17:00:37 (10 years ago)
Author:
ehopf
Message:

#2361: Minor naming changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SensitivityEvaluator/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineWeightedResidualsMeanSquaredErrorCalculator.cs

    r12416 r12448  
    3636
    3737    public double PositiveClassValue { get; private set; }
    38     public double ClassValueMax { get; private set; }
    39     public double ClassValueMin { get; private set; }
    40     public double ObviousResidualsWeight { get; private set; }
     38    public double ClassValuesMax { get; private set; }
     39    public double ClassValuesMin { get; private set; }
     40    public double DefiniteResidualsWeight { get; private set; }
    4141    public double PositiveClassResidualsWeight { get; private set; }
    42     public double NegativeClassResidualsWeight { get; private set; }
     42    public double NegativeClassesResidualsWeight { get; private set; }
    4343
    44     public OnlineWeightedResidualsMeanSquaredErrorCalculator(double positiveClassValue, double classValueMax, double classValueMin,
    45                                                                 double obviousResidualsWeight, double positiveClassResidualsWeight, double negativeClassResidualsWeight) {
     44    public OnlineWeightedResidualsMeanSquaredErrorCalculator(double positiveClassValue, double classValuesMax, double classValuesMin,
     45                                                                double definiteResidualsWeight, double positiveClassResidualsWeight, double negativeClassesResidualsWeight) {
    4646      PositiveClassValue = positiveClassValue;
    47       ClassValueMax = classValueMax;
    48       ClassValueMin = classValueMin;
    49       ObviousResidualsWeight = obviousResidualsWeight;
     47      ClassValuesMax = classValuesMax;
     48      ClassValuesMin = classValuesMin;
     49      DefiniteResidualsWeight = definiteResidualsWeight;
    5050      PositiveClassResidualsWeight = positiveClassResidualsWeight;
    51       NegativeClassResidualsWeight = negativeClassResidualsWeight;
     51      NegativeClassesResidualsWeight = negativeClassesResidualsWeight;
    5252      Reset();
    5353    }
     
    7575        double weight;
    7676        //apply weight
    77         if (estimated > ClassValueMax || estimated < ClassValueMin) {
    78           weight = ObviousResidualsWeight;
    79         } else if (original.IsAlmost(PositiveClassValue))
    80         {
     77        if (estimated > ClassValuesMax || estimated < ClassValuesMin) {
     78          weight = DefiniteResidualsWeight;
     79        } else if (original.IsAlmost(PositiveClassValue)) {
    8180          weight = PositiveClassResidualsWeight;
    82         } else
    83         {
    84           weight = NegativeClassResidualsWeight;
     81        } else {
     82          weight = NegativeClassesResidualsWeight;
    8583        }
    8684        error *= weight;
     
    9290    #endregion
    9391
    94     public static double Calculate(IEnumerable<double> originalValues, IEnumerable<double> estimatedValues, double positiveClassValue, double classValueMax, double classValueMin,
    95                                                                 double obviousValuesWeight, double positiveClassValuesWeight, double negativeClassValuesWeight, out OnlineCalculatorError errorState) {
     92    public static double Calculate(IEnumerable<double> originalValues, IEnumerable<double> estimatedValues, double positiveClassValue, double classValuesMax, double classValuesMin,
     93                                                                double definiteResidualsWeight, double positiveClassResidualsWeight, double negativeClassesResidualsWeight, out OnlineCalculatorError errorState) {
    9694      IEnumerator<double> originalEnumerator = originalValues.GetEnumerator();
    9795      IEnumerator<double> estimatedEnumerator = estimatedValues.GetEnumerator();
    98       OnlineWeightedResidualsMeanSquaredErrorCalculator calculator = new OnlineWeightedResidualsMeanSquaredErrorCalculator(positiveClassValue, classValueMax, classValueMin, obviousValuesWeight, positiveClassValuesWeight, negativeClassValuesWeight);
     96      OnlineWeightedResidualsMeanSquaredErrorCalculator calculator = new OnlineWeightedResidualsMeanSquaredErrorCalculator(positiveClassValue, classValuesMax, classValuesMin, definiteResidualsWeight, positiveClassResidualsWeight, negativeClassesResidualsWeight);
    9997
    10098      // always move forward both enumerators (do not use short-circuit evaluation!)
Note: See TracChangeset for help on using the changeset viewer.