public PerDatabaseInfo(ScoreTable table, AccuracyMeasure measure)
 {
     CombinedScores = table.GetMultiFingerTable(measure.MultiFingerPolicy);
     ROC.Compute(CombinedScores);
     Range.Compute(ROC, measure.ErrorPolicyFunction);
     Scalar     = measure.ScalarMeasure.Measure(Range.Rate);
     Separation = measure.Separation.Measure(CombinedScores);
 }
 public AccuracyStatistics(ScoreTable[] tables, AccuracyMeasure measure)
 {
     Name        = measure.Name;
     PerDatabase = (from table in tables.AsParallel().AsOrdered()
                    select new PerDatabaseInfo(table, measure)).ToArray();
     AverageError = PerDatabase.Average(db => db.Scalar);
     Separation   = PerDatabase.Average(db => db.Separation);
     TopErrors    = new TopErrors(tables);
 }
Exemple #3
0
        static List <AccuracyMeasure> GenerateDefault()
        {
            List <AccuracyMeasure> all = new List <AccuracyMeasure>();
            AccuracyMeasure        measure;

            measure      = new AccuracyMeasure();
            measure.Name = "Standard";
            all.Add(measure);

            measure      = new AccuracyMeasure();
            measure.Name = "PreferFAR";
            measure.ErrorPolicyFunction = ErrorPolicy.PreferFAR;
            all.Add(measure);

            measure      = new AccuracyMeasure();
            measure.Name = "ZeroFAR";
            measure.ErrorPolicyFunction = ErrorPolicy.ZeroFAR;
            measure.ScalarMeasure       = ScalarErrorMeasure.FRR;
            all.Add(measure);

            measure      = new AccuracyMeasure();
            measure.Name = "FAR100";
            measure.ErrorPolicyFunction = ErrorPolicy.FAR100;
            measure.ScalarMeasure       = ScalarErrorMeasure.FRR;
            all.Add(measure);

            measure      = new AccuracyMeasure();
            measure.Name = "1-of-2";
            measure.MultiFingerPolicy = MultiFingerPolicy.Take1Of2;
            all.Add(measure);

            measure      = new AccuracyMeasure();
            measure.Name = "1-of-3";
            measure.MultiFingerPolicy = MultiFingerPolicy.Take1Of3;
            all.Add(measure);

            measure      = new AccuracyMeasure();
            measure.Name = "2-of-3";
            measure.MultiFingerPolicy = MultiFingerPolicy.Take2Of3;
            all.Add(measure);

            measure      = new AccuracyMeasure();
            measure.Name = "1-of-4";
            measure.MultiFingerPolicy = MultiFingerPolicy.Take1Of4;
            all.Add(measure);

            measure      = new AccuracyMeasure();
            measure.Name = "2-of-4";
            measure.MultiFingerPolicy = MultiFingerPolicy.Take2Of4;
            all.Add(measure);

            measure      = new AccuracyMeasure();
            measure.Name = "1-of-5";
            measure.MultiFingerPolicy = MultiFingerPolicy.Take1Of5;
            all.Add(measure);

            measure      = new AccuracyMeasure();
            measure.Name = "2-of-5";
            measure.MultiFingerPolicy = MultiFingerPolicy.Take2Of5;
            all.Add(measure);

            measure            = new AccuracyMeasure();
            measure.Name       = "MinMax";
            measure.Separation = SeparationMeasure.MinMax;
            all.Add(measure);

            measure            = new AccuracyMeasure();
            measure.Name       = "StandardDeviation";
            measure.Separation = SeparationMeasure.StandardDeviation;
            all.Add(measure);

            measure            = new AccuracyMeasure();
            measure.Name       = "HalfDistance";
            measure.Separation = SeparationMeasure.HalfDistance;
            all.Add(measure);

            return(all);
        }