- Timestamp:
- 06/25/15 13:46:24 (10 years ago)
- 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 51 51 } 52 52 53 public IEnumerable<double> GetEstimatedValues( Dataset dataset, IEnumerable<int> rows) {53 public IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) { 54 54 return rows.Select(row => Constant); 55 55 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleModel.cs
r12012 r12509 80 80 } 81 81 82 public IEnumerable<IEnumerable<double>> GetEstimatedValueVectors( Dataset dataset, IEnumerable<int> rows) {82 public IEnumerable<IEnumerable<double>> GetEstimatedValueVectors(IDataset dataset, IEnumerable<int> rows) { 83 83 var estimatedValuesEnumerators = (from model in models 84 84 select model.GetEstimatedValues(dataset, rows).GetEnumerator()) … … 95 95 #region IRegressionModel Members 96 96 97 public IEnumerable<double> GetEstimatedValues( Dataset dataset, IEnumerable<int> rows) {97 public IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) { 98 98 foreach (var estimatedValuesVector in GetEstimatedValueVectors(dataset, rows)) { 99 99 yield return estimatedValuesVector.Average(); -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleSolution.cs
r12504 r12509 232 232 } 233 233 234 public IEnumerable<IEnumerable<double>> GetEstimatedValueVectors( Dataset dataset, IEnumerable<int> rows) {234 public IEnumerable<IEnumerable<double>> GetEstimatedValueVectors(IDataset dataset, IEnumerable<int> rows) { 235 235 if (!Model.Models.Any()) yield break; 236 236 var estimatedValuesEnumerators = (from model in Model.Models -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs
r12012 r12509 137 137 } 138 138 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) 140 140 : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<ITransformation>()) { 141 141 var variables = InputVariables.Select(x => x.AsReadOnly()).ToList(); -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolution.cs
r12485 r12509 63 63 64 64 public override IEnumerable<double> GetEstimatedValues(IEnumerable<int> rows) { 65 var rowsToEvaluate = rows. Except(evaluationCache.Keys);65 var rowsToEvaluate = rows.Where(row => !evaluationCache.ContainsKey(row)); 66 66 var rowsEnumerator = rowsToEvaluate.GetEnumerator(); 67 67 var valuesEnumerator = Model.GetEstimatedValues(ProblemData.Dataset, rowsToEvaluate).GetEnumerator();
Note: See TracChangeset
for help on using the changeset viewer.