Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/10/11 13:04:09 (13 years ago)
Author:
mkommend
Message:

#1675: Corrected emtpy solution ensembles and adapted views to handle empty ensembles correctly.

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

Legend:

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

    r6666 r6982  
    201201
    202202    public IEnumerable<IEnumerable<double>> GetEstimatedClassValueVectors(Dataset dataset, IEnumerable<int> rows) {
     203      if (!Model.Models.Any()) yield break;
    203204      var estimatedValuesEnumerators = (from model in Model.Models
    204205                                        select model.GetEstimatedClassValues(dataset, rows).GetEnumerator())
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleSolution.cs

    r6666 r6982  
    6464    private void AfterDeserialization() {
    6565      foreach (var model in Model.Models) {
    66         IRegressionProblemData problemData = (IRegressionProblemData) ProblemData.Clone();
     66        IRegressionProblemData problemData = (IRegressionProblemData)ProblemData.Clone();
    6767        problemData.TrainingPartition.Start = trainingPartitions[model].Start;
    6868        problemData.TrainingPartition.End = trainingPartitions[model].End;
     
    202202
    203203    public IEnumerable<IEnumerable<double>> GetEstimatedValueVectors(Dataset dataset, IEnumerable<int> rows) {
     204      if (!Model.Models.Any()) yield break;
    204205      var estimatedValuesEnumerators = (from model in Model.Models
    205206                                        select model.GetEstimatedValues(dataset, rows).GetEnumerator())
Note: See TracChangeset for help on using the changeset viewer.