Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/24/14 15:16:59 (9 years ago)
Author:
bburlacu
Message:

#2276: Commit initial version of IDataset interface and code refactoring.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicDiscriminantFunctionClassificationModel.cs

    r11171 r11571  
    8888      var classValuesArr = classValues.ToArray();
    8989      var thresholdsArr = thresholds.ToArray();
    90       if (thresholdsArr.Length != classValuesArr.Length || thresholdsArr.Length < 1) 
     90      if (thresholdsArr.Length != classValuesArr.Length || thresholdsArr.Length < 1)
    9191        throw new ArgumentException();
    92       if (!double.IsNegativeInfinity(thresholds.First())) 
     92      if (!double.IsNegativeInfinity(thresholds.First()))
    9393        throw new ArgumentException();
    9494
     
    107107    }
    108108
    109     public IEnumerable<double> GetEstimatedValues(Dataset dataset, IEnumerable<int> rows) {
     109    public IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) {
    110110      return Interpreter.GetSymbolicExpressionTreeValues(SymbolicExpressionTree, dataset, rows).LimitToRange(LowerEstimationLimit, UpperEstimationLimit);
    111111    }
    112112
    113     public override IEnumerable<double> GetEstimatedClassValues(Dataset dataset, IEnumerable<int> rows) {
     113    public override IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows) {
    114114      if (!Thresholds.Any() && !ClassValues.Any()) throw new ArgumentException("No thresholds and class values were set for the current symbolic classification model.");
    115115      foreach (var x in GetEstimatedValues(dataset, rows)) {
Note: See TracChangeset for help on using the changeset viewer.