Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/25/15 13:46:24 (9 years ago)
Author:
mkommend
Message:

#2276: Reintegrated branch for dataset refactoring.

Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification
Files:
4 edited

Legend:

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

    r12012 r12509  
    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
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleSolution.cs

    r12504 r12509  
    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
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs

    r12067 r12509  
    324324    }
    325325
    326     public ClassificationProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null)
     326    public ClassificationProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null)
    327327      : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<ITransformation>()) {
    328328      var validTargetVariableValues = CheckVariablesForPossibleTargetVariables(dataset).Select(x => new StringValue(x).AsReadOnly()).ToList();
     
    338338    }
    339339
    340     public static IEnumerable<string> CheckVariablesForPossibleTargetVariables(Dataset dataset) {
     340    public static IEnumerable<string> CheckVariablesForPossibleTargetVariables(IDataset dataset) {
    341341      int maxSamples = Math.Min(InspectedRowsToDetermineTargets, dataset.Rows);
    342342      var validTargetVariables = (from v in dataset.DoubleVariables
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationModel.cs

    r12012 r12509  
    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.