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/3.4/Implementation/Classification
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleModel.cs

    r11171 r11571  
    6767    }
    6868
    69     public IEnumerable<IEnumerable<double>> GetEstimatedClassValueVectors(Dataset dataset, IEnumerable<int> rows) {
     69    public IEnumerable<IEnumerable<double>> GetEstimatedClassValueVectors(IDataset dataset, IEnumerable<int> rows) {
    7070      var estimatedValuesEnumerators = (from model in models
    7171                                        select model.GetEstimatedClassValues(dataset, rows).GetEnumerator())
     
    8282    #region IClassificationModel Members
    8383
    84     public IEnumerable<double> GetEstimatedClassValues(Dataset dataset, IEnumerable<int> rows) {
     84    public IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows) {
    8585      foreach (var estimatedValuesVector in GetEstimatedClassValueVectors(dataset, rows)) {
    8686        // return the class which is most often occuring
  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleSolution.cs

    r11171 r11571  
    231231    }
    232232
    233     public IEnumerable<IEnumerable<double>> GetEstimatedClassValueVectors(Dataset dataset, IEnumerable<int> rows) {
     233    public IEnumerable<IEnumerable<double>> GetEstimatedClassValueVectors(IDataset dataset, IEnumerable<int> rows) {
    234234      if (!Model.Models.Any()) yield break;
    235235      var estimatedValuesEnumerators = (from model in Model.Models
  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs

    r11171 r11571  
    300300    }
    301301
    302     public ClassificationProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null)
     302    public ClassificationProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null)
    303303      : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<ITransformation>()) {
    304304      var validTargetVariableValues = CheckVariablesForPossibleTargetVariables(dataset).Select(x => new StringValue(x).AsReadOnly()).ToList();
     
    313313    }
    314314
    315     public static IEnumerable<string> CheckVariablesForPossibleTargetVariables(Dataset dataset) {
     315    public static IEnumerable<string> CheckVariablesForPossibleTargetVariables(IDataset dataset) {
    316316      int maxSamples = Math.Min(InspectedRowsToDetermineTargets, dataset.Rows);
    317317      var validTargetVariables = (from v in dataset.DoubleVariables
  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationModel.cs

    r11171 r11571  
    111111
    112112
    113     public IEnumerable<double> GetEstimatedValues(Dataset dataset, IEnumerable<int> rows) {
     113    public IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) {
    114114      return model.GetEstimatedValues(dataset, rows);
    115115    }
    116116
    117     public IEnumerable<double> GetEstimatedClassValues(Dataset dataset, IEnumerable<int> rows) {
     117    public IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows) {
    118118      if (!Thresholds.Any() && !ClassValues.Any()) throw new ArgumentException("No thresholds and class values were set for the current classification model.");
    119119      foreach (var x in GetEstimatedValues(dataset, rows)) {
Note: See TracChangeset for help on using the changeset viewer.