Free cookie consent management tool by TermsFeed Policy Generator

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

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

Location:
branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4
Files:
3 edited

Legend:

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

    r11171 r11571  
    4141      : base(tree, interpreter, lowerEstimationLimit, upperEstimationLimit) { }
    4242
    43     public abstract IEnumerable<double> GetEstimatedClassValues(Dataset dataset, IEnumerable<int> rows);
     43    public abstract IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows);
    4444    public abstract void RecalculateModelParameters(IClassificationProblemData problemData, IEnumerable<int> rows);
    4545
  • 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)) {
  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicNearestNeighbourClassificationModel.cs

    r11171 r11571  
    6666    }
    6767
    68     public override IEnumerable<double> GetEstimatedClassValues(Dataset dataset, IEnumerable<int> rows) {
     68    public override IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows) {
    6969      var estimatedValues = Interpreter.GetSymbolicExpressionTreeValues(SymbolicExpressionTree, dataset, rows)
    7070                                       .LimitToRange(LowerEstimationLimit, UpperEstimationLimit);
Note: See TracChangeset for help on using the changeset viewer.