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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourModel.cs

    r11171 r11571  
    9696        this.classValues = (double[])original.classValues.Clone();
    9797    }
    98     public NearestNeighbourModel(Dataset dataset, IEnumerable<int> rows, int k, string targetVariable, IEnumerable<string> allowedInputVariables, double[] classValues = null) {
     98    public NearestNeighbourModel(IDataset dataset, IEnumerable<int> rows, int k, string targetVariable, IEnumerable<string> allowedInputVariables, double[] classValues = null) {
    9999      Name = ItemName;
    100100      Description = ItemDescription;
     
    135135    }
    136136
    137     public IEnumerable<double> GetEstimatedValues(Dataset dataset, IEnumerable<int> rows) {
     137    public IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) {
    138138      double[,] inputData = AlglibUtil.PrepareInputMatrix(dataset, allowedInputVariables, rows);
    139139
     
    163163    }
    164164
    165     public IEnumerable<double> GetEstimatedClassValues(Dataset dataset, IEnumerable<int> rows) {
     165    public IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows) {
    166166      if (classValues == null) throw new InvalidOperationException("No class values are defined.");
    167167      double[,] inputData = AlglibUtil.PrepareInputMatrix(dataset, allowedInputVariables, rows);
Note: See TracChangeset for help on using the changeset viewer.