| Home | Trees | Indices | Help |
|---|
|
|
An umbrella package containing all Classification packages.
|
|||
| |||
|
|||
|
BinaryErrorStats Error statistics for binary classification. |
|||
| BinaryClassifier | |||
| CDataset | |||
| Classifier | |||
| CDataGenerator | |||
|
WeightedCDataset A CDataset with weights attached to the samples. |
|||
|
ScoredWCDataset A WeightedCDataset with score s[i] attached to the sample i. |
|||
| Toy3BalancedDataGenerator | |||
| ToyImbalancedDataGenerator | |||
| Toy2BalancedDataGenerator | |||
| ToyBalancedDataGenerator | |||
| NBClassifier | |||
|
TLinearClassifier Thresholded linear classifier. |
|||
|
AdditiveClassifier Additive Classifier |
|||
|
Rejector Rejector |
|||
|
ScoringClassifier Scoring Classifier |
|||
|
Shifter Shifter |
|||
|
ScoringCDataset A binary CDataset with score s[i] associated with sample i. |
|||
|
Resetter An AdditiveClassifier that resets the score to a predefined value. |
|||
|
UAC Univariate Additive Classifier A classifier of the form: Classify x as class y = sgn( s(x) + c sgn(x-b) ) where s(x) is a score function, (c,b) are unknown parameters. |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
| __doc__ | |||
|
|||
Parameters:
wcd : a WeightedCDataset is used as the test set |
Train a NBClassifier using a WeightedCDataset
|
Take a 2-class WeightedCDataset, then train a TLinearClassifier.
The projection direction is LDA. The threshold is trained using one of three criteria:
crit = 0: param1 is 'thelambda', then call gaussian.find_classification_threshold()
crit = 1: param1 is 'minDR', then call gaussian.find_filtering_threshold()
crit = 2: param1 is 'maxFAR', then call gaussian.find_filtering_threshold2()
Input:
classification_dataset: a 2-class WeightedCDataset
crit, param1: as mentioned above
Output:
lc: a LinearClassifier, with lc.err as the estimated 'error'
|
Project down to a line using the LDA projection. Return the direction.
|
|
|
|
Solve threshold-based 1D binary classifier. The function solves the following problem: Given two sets of samples of two classes, a positive one and a negative one, a threshold-based classifier classifies a value x into a positive or a negative class: sign(x - heta). The optimal heta is chosen based on different criteria: - Minimize the classification error: lambda * p(pos)*FRR + p(neg)*FAR - Minimize the error without prior: lambda * FRR + FAR - Minimize FAR with constraint FRR <= maxFRR - Minimize FRR with constraint FAR <= maxFAR
|
Solve the class-conditional Gaussian-assumed classification with thresholding and goal.
This set of functions solve the following problem:
Given two classes normally distributed, a positive one and a negative one,
a threshold-based classifier classifies a value x into a positive or a negative
class: sign(x - heta). The optimal heta is chosen based on different criteria:
- Minimize the classification error: \lambda * p(pos)*FRR + p(neg)*FAR
- Minimize the error without prior: \lambda * FRR + FAR
- Minimize FAR with constraint FRR <= maxFRR
- Minimize FRR with constraint FAR <= maxFAR
:Parameters:
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
stats : Stats2e(J=2,d=1)
REQUIREMENT: mean of class 0 <= mean of class 1
:Returns:
result : array(shape=(2,),dtype='d')
an argout array representing
- result[0]: the threshold
- result[1]: the optimized function value at that threshold
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0beta1 on Mon Feb 25 10:24:15 2008 | http://epydoc.sourceforge.net |