Ignore:
Timestamp:
03/06/12 15:08:13 (8 years ago)
Author:
sforsten
Message:

#1776:

  • bug fix in NeighbourhoodWeightCalculator
  • added GetConfidence method to IClassificationEnsembleSolutionWeightCalculator
  • adjusted the confidence column in ClassificationEnsembleSolutionEstimatedClassValuesView
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleSolution.cs

    r7549 r7562  
    5151    }
    5252
    53     //[Storable]
    54     //private Dictionary<IClassificationModel, IntRange> trainingPartitions;
    55     //[Storable]
    56     //private Dictionary<IClassificationModel, IntRange> testPartitions;
    57 
    5853    private IClassificationEnsembleSolutionWeightCalculator weightCalculator;
    5954
     
    6661        }
    6762      }
     63      get { return weightCalculator; }
    6864    }
    6965
     
    7773      foreach (var model in Model.Models) {
    7874        IClassificationProblemData problemData = (IClassificationProblemData)ProblemData.Clone();
    79         //problemData.TrainingPartition.Start = trainingPartitions[model].Start;
    80         //problemData.TrainingPartition.End = trainingPartitions[model].End;
    81         //problemData.TestPartition.Start = testPartitions[model].Start;
    82         //problemData.TestPartition.End = testPartitions[model].End;
    83 
    8475        classificationSolutions.Add(model.CreateClassificationSolution(problemData));
    8576      }
     
    8980    private ClassificationEnsembleSolution(ClassificationEnsembleSolution original, Cloner cloner)
    9081      : base(original, cloner) {
    91       //trainingPartitions = new Dictionary<IClassificationModel, IntRange>();
    92       //testPartitions = new Dictionary<IClassificationModel, IntRange>();
    93       //foreach (var pair in original.trainingPartitions) {
    94       //  trainingPartitions[cloner.Clone(pair.Key)] = cloner.Clone(pair.Value);
    95       //}
    96       //foreach (var pair in original.testPartitions) {
    97       //  testPartitions[cloner.Clone(pair.Key)] = cloner.Clone(pair.Value);
    98       //}
    99 
    10082      classificationSolutions = cloner.Clone(original.classificationSolutions);
    10183      RegisterClassificationSolutionsEventHandler();
     
    10486    public ClassificationEnsembleSolution()
    10587      : base(new ClassificationEnsembleModel(), ClassificationEnsembleProblemData.EmptyProblemData) {
    106       //trainingPartitions = new Dictionary<IClassificationModel, IntRange>();
    107       //testPartitions = new Dictionary<IClassificationModel, IntRange>();
    10888      classificationSolutions = new CheckedItemCollection<IClassificationSolution>();
    10989
     
    121101    public ClassificationEnsembleSolution(IEnumerable<IClassificationModel> models, IClassificationProblemData problemData, IEnumerable<IntRange> trainingPartitions, IEnumerable<IntRange> testPartitions)
    122102      : base(new ClassificationEnsembleModel(Enumerable.Empty<IClassificationModel>()), new ClassificationEnsembleProblemData(problemData)) {
    123       //this.trainingPartitions = new Dictionary<IClassificationModel, IntRange>();
    124       //this.testPartitions = new Dictionary<IClassificationModel, IntRange>();
    125103      this.classificationSolutions = new CheckedItemCollection<IClassificationSolution>();
    126104
     
    217195          solution.ProblemData = problemData;
    218196      }
    219       //foreach (var trainingPartition in trainingPartitions.Values) {
    220       //  trainingPartition.Start = ProblemData.TrainingPartition.Start;
    221       //  trainingPartition.End = ProblemData.TrainingPartition.End;
    222       //}
    223       //foreach (var testPartition in testPartitions.Values) {
    224       //  testPartition.Start = ProblemData.TestPartition.Start;
    225       //  testPartition.End = ProblemData.TestPartition.End;
    226       //}
    227 
    228197      base.OnProblemDataChanged();
    229198    }
     
    256225      if (Model.Models.Contains(solution.Model)) throw new ArgumentException();
    257226      Model.Add(solution.Model);
    258       //trainingPartitions[solution.Model] = solution.ProblemData.TrainingPartition;
    259       //testPartitions[solution.Model] = solution.ProblemData.TestPartition;
    260227    }
    261228
     
    263230      if (!Model.Models.Contains(solution.Model)) throw new ArgumentException();
    264231      Model.Remove(solution.Model);
    265       //trainingPartitions.Remove(solution.Model);
    266       //testPartitions.Remove(solution.Model);
    267232    }
    268233  }
Note: See TracChangeset for help on using the changeset viewer.