Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/19/11 11:12:25 (13 years ago)
Author:
mkommend
Message:

#1592: Implemented new estimated class values view for ClassificationEnsembleSolutions.

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

Legend:

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

    r6666 r6672  
    2121
    2222using System.Collections.Generic;
    23 using System.Linq;
    2423using HeuristicLab.Common;
    2524using HeuristicLab.Core;
     
    3332  public class ClassificationEnsembleProblemData : ClassificationProblemData {
    3433
    35     public override IEnumerable<int> TrainingIndizes {
    36       get { return Enumerable.Range(TrainingPartition.Start, TrainingPartition.End - TrainingPartition.Start); }
    37     }
    38     public override IEnumerable<int> TestIndizes {
    39       get { return Enumerable.Range(TestPartition.Start, TestPartition.End - TestPartition.Start); }
     34    public override bool IsTrainingSample(int index) {
     35      return index >= 0 && index < Dataset.Rows &&
     36             TrainingPartition.Start <= index && index < TrainingPartition.End;
    4037    }
    4138
    42     private static ClassificationEnsembleProblemData emptyProblemData;
     39    public override bool IsTestSample(int index) {
     40      return index >= 0 && index < Dataset.Rows &&
     41             TestPartition.Start <= index && index < TestPartition.End;
     42    }
     43
     44    private static readonly ClassificationEnsembleProblemData emptyProblemData;
    4345    public static ClassificationEnsembleProblemData EmptyProblemData {
    4446      get { return emptyProblemData; }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs

    r6666 r6672  
    171171     {1176881,7,5,3,7,4,10,7,5,5,4        }
    172172};
    173     private static Dataset defaultDataset;
    174     private static IEnumerable<string> defaultAllowedInputVariables;
    175     private static string defaultTargetVariable;
    176 
    177     private static ClassificationProblemData emptyProblemData;
     173    private static readonly Dataset defaultDataset;
     174    private static readonly IEnumerable<string> defaultAllowedInputVariables;
     175    private static readonly string defaultTargetVariable;
     176
     177    private static readonly ClassificationProblemData emptyProblemData;
    178178    public static ClassificationProblemData EmptyProblemData {
    179179      get { return EmptyProblemData; }
Note: See TracChangeset for help on using the changeset viewer.