Changeset 7504 for branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/AccuracyWeightCalculator.cs
- Timestamp:
- 02/21/12 16:44:20 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ClassificationEnsembleVoting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/WeightCalculators/AccuracyWeightCalculator.cs
r7464 r7504 48 48 } 49 49 50 public override IEnumerable<double> CalculateWeights(ItemCollection<IClassificationSolution> classificationSolutions) { 51 double sum = classificationSolutions.Select(s => s.TestAccuracy).Sum(); 52 List<double> weights = new List<double>(); 53 foreach (var item in classificationSolutions) { 54 weights.Add(item.TestAccuracy / sum); 55 } 56 return weights; 50 protected override IEnumerable<double> CalculateWeights(ItemCollection<IClassificationSolution> classificationSolutions) { 51 return classificationSolutions.Select(s => s.TrainingAccuracy); 57 52 } 58 53 }
Note: See TracChangeset
for help on using the changeset viewer.