Package pycv :: Package cs :: Package ml :: Package cla :: Module score
[hide private]
[frames] | no frames]

Module score

source code

Classes [hide private]
  ScoringCDataset
A binary CDataset with score s[i] associated with sample i.
  ScoringClassifier
Scoring Classifier
  TLinearClassifier
Thresholded linear classifier.
  AdditiveClassifier
Additive Classifier
  Rejector
Rejector
  Shifter
Shifter
  Resetter
An AdditiveClassifier that resets the score to a predefined value.
Functions [hide private]
 
train_Shifter(scd, sc, criterion, param1)
Train a Shifter to succeed a ScoringClassifier with a different goal.
source code
Function Details [hide private]

train_Shifter(scd, sc, criterion, param1)

source code 
Train a Shifter to succeed a ScoringClassifier with a different goal.
Parameters:
  • scd (ScoringCDataset) - a dataset of points and their current scores, obtained from
  • sc (ScoringClassifier) - the current ScoringClassifier
  • criterion (integer from 0 to 3) - 0: minimize classification error with prior probabilities 1: minimize classification error without prior probabilities 2: minimize FAR while constraining FRR 3: minimize FRR while constraining FAR
  • param1 (double) -
    a parameter representing

    lambda if criterion < 2 maxFRR if criterion == 2 maxFAR if criterion == 3

Returns:
shifter : Shifter

a Shifter succeeding the current ScoringClassifier 'sc'

shifter.err : double

resulting function value after thresholding

scd2 : ScoringCDataset

a new ScoringCDataset shifted (subtracted) from scd by shifter.thresh