Free cookie consent management tool by TermsFeed Policy Generator

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

#2276: Reintegrated branch for dataset refactoring.

Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/ConstantRegressionModel.cs

    r12012 r12509  
    5151    }
    5252
    53     public IEnumerable<double> GetEstimatedValues(Dataset dataset, IEnumerable<int> rows) {
     53    public IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) {
    5454      return rows.Select(row => Constant);
    5555    }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleModel.cs

    r12012 r12509  
    8080    }
    8181
    82     public IEnumerable<IEnumerable<double>> GetEstimatedValueVectors(Dataset dataset, IEnumerable<int> rows) {
     82    public IEnumerable<IEnumerable<double>> GetEstimatedValueVectors(IDataset dataset, IEnumerable<int> rows) {
    8383      var estimatedValuesEnumerators = (from model in models
    8484                                        select model.GetEstimatedValues(dataset, rows).GetEnumerator())
     
    9595    #region IRegressionModel Members
    9696
    97     public IEnumerable<double> GetEstimatedValues(Dataset dataset, IEnumerable<int> rows) {
     97    public IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) {
    9898      foreach (var estimatedValuesVector in GetEstimatedValueVectors(dataset, rows)) {
    9999        yield return estimatedValuesVector.Average();
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleSolution.cs

    r12504 r12509  
    232232    }
    233233
    234     public IEnumerable<IEnumerable<double>> GetEstimatedValueVectors(Dataset dataset, IEnumerable<int> rows) {
     234    public IEnumerable<IEnumerable<double>> GetEstimatedValueVectors(IDataset dataset, IEnumerable<int> rows) {
    235235      if (!Model.Models.Any()) yield break;
    236236      var estimatedValuesEnumerators = (from model in Model.Models
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs

    r12012 r12509  
    137137    }
    138138
    139     public RegressionProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null)
     139    public RegressionProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null)
    140140      : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<ITransformation>()) {
    141141      var variables = InputVariables.Select(x => x.AsReadOnly()).ToList();
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolution.cs

    r12485 r12509  
    6363
    6464    public override IEnumerable<double> GetEstimatedValues(IEnumerable<int> rows) {
    65       var rowsToEvaluate = rows.Except(evaluationCache.Keys);
     65      var rowsToEvaluate = rows.Where(row => !evaluationCache.ContainsKey(row));
    6666      var rowsEnumerator = rowsToEvaluate.GetEnumerator();
    6767      var valuesEnumerator = Model.GetEstimatedValues(ProblemData.Dataset, rowsToEvaluate).GetEnumerator();
Note: See TracChangeset for help on using the changeset viewer.