Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/16/19 11:43:52 (6 years ago)
Author:
mkommend
Message:

#2361: Merged all changes from the sensitivity branch to trunk.

Location:
trunk/HeuristicLab.Problems.DataAnalysis
Files:
5 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Problems.DataAnalysis

  • trunk/HeuristicLab.Problems.DataAnalysis/3.4

  • trunk/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj

    r16658 r16788  
    244244    <Compile Include="OnlineCalculators\OnlineTheilsUStatisticCalculator.cs" />
    245245    <Compile Include="OnlineCalculators\OnlineWeightedDirectionalSymmetryCalculator.cs" />
     246    <Compile Include="OnlineCalculators\OnlineWeightedClassificationMeanSquaredErrorCalculator.cs" />
    246247    <Compile Include="Plugin.cs" />
    247248    <Compile Include="Implementation\Classification\ThresholdCalculators\AccuracyMaximizationThresholdCalculator.cs" />
  • trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationModel.cs

    r16565 r16788  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HEAL.Attic;
    2526using HeuristicLab.Common;
    2627using HeuristicLab.Core;
    27 using HEAL.Attic;
    2828
    2929namespace HeuristicLab.Problems.DataAnalysis {
     
    121121
    122122    public override IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows) {
     123      var estimatedValues = GetEstimatedValues(dataset, rows);
     124      return GetEstimatedClassValues(estimatedValues);
     125    }
     126
     127    public virtual IEnumerable<double> GetEstimatedClassValues(IEnumerable<double> estimatedValues) {
    123128      if (!Thresholds.Any() && !ClassValues.Any()) throw new ArgumentException("No thresholds and class values were set for the current classification model.");
    124       foreach (var x in GetEstimatedValues(dataset, rows)) {
     129      foreach (var x in estimatedValues) {
    125130        int classIndex = 0;
    126131        // find first threshold value which is larger than x => class index = threshold index + 1
     
    132137      }
    133138    }
     139
    134140    #region events
    135141    public event EventHandler ThresholdsChanged;
  • trunk/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Classification/IDiscriminantFunctionClassificationModel.cs

    r16565 r16788  
    3434    void SetThresholdsAndClassValues(IEnumerable<double> thresholds, IEnumerable<double> classValues);
    3535    IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows);
     36    IEnumerable<double> GetEstimatedClassValues(IEnumerable<double> estimatedValues);
    3637
    3738    event EventHandler ThresholdsChanged;
  • trunk/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineWeightedClassificationMeanSquaredErrorCalculator.cs

    r16784 r16788  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2525
    2626namespace HeuristicLab.Problems.DataAnalysis {
    27   public class OnlineWeightedResidualsMeanSquaredErrorCalculator : IOnlineCalculator {
     27  public class OnlineWeightedClassificationMeanSquaredErrorCalculator : IOnlineCalculator {
    2828
    2929    private double sse;
     
    4242    public double NegativeClassesResidualsWeight { get; private set; }
    4343
    44     public OnlineWeightedResidualsMeanSquaredErrorCalculator(double positiveClassValue, double classValuesMax, double classValuesMin,
     44    public OnlineWeightedClassificationMeanSquaredErrorCalculator(double positiveClassValue, double classValuesMax, double classValuesMin,
    4545                                                                double definiteResidualsWeight, double positiveClassResidualsWeight, double negativeClassesResidualsWeight) {
    4646      PositiveClassValue = positiveClassValue;
     
    9393      IEnumerator<double> originalEnumerator = originalValues.GetEnumerator();
    9494      IEnumerator<double> estimatedEnumerator = estimatedValues.GetEnumerator();
    95       OnlineWeightedResidualsMeanSquaredErrorCalculator calculator = new OnlineWeightedResidualsMeanSquaredErrorCalculator(positiveClassValue, classValuesMax, classValuesMin, definiteResidualsWeight, positiveClassResidualsWeight, negativeClassesResidualsWeight);
     95      OnlineWeightedClassificationMeanSquaredErrorCalculator calculator = new OnlineWeightedClassificationMeanSquaredErrorCalculator(positiveClassValue, classValuesMax, classValuesMin, definiteResidualsWeight, positiveClassResidualsWeight, negativeClassesResidualsWeight);
    9696
    9797      // always move forward both enumerators (do not use short-circuit evaluation!)
Note: See TracChangeset for help on using the changeset viewer.