Trees | Indices | Help |
|
---|
|
This is a support module, used by many types of classifiers.
Classes | |
datum_c This is an unclassified datum, either in the test or training set. |
|
datum_tr This is a datum where we know the true class, presumably in the training set. |
|
grouper_c A 'grouper' function takes a DUID (a unique i.d. |
|
model_template This class describes how to compute the relative probability that a datum is a member of a particular class. |
|
qmodel | |
lmodel | |
classifier_desc This is a thing that describes and generates classifiers. |
|
classifier This is the base class for all kinds of classifers. |
|
evaluate_match_w_rare This is called in the same way as evaluate_match or evaluate_Bayes. |
Functions | |||
str |
|
||
str |
|
||
|
|||
|
|||
list (datum_tr)
|
|
||
int |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
int |
|
||
float |
|
||
|
|||
|
|||
|
|||
str |
|
||
|
|||
|
Variables | |
ERGCOVER = 4.0
|
|
D = False
|
|
CONSTRAIN = 1e-06
|
|
__package__ =
|
Imports: re, math, zlib, numpy, chunkio, DS, die, mcmc, mcmc_helper, g_implements, fiatio, dictops, gpkmisc, DV, gpkavg
Function Details |
|
|
This computes the probability of correct classification, assuming you can't see the feature vector. It is used to compute P(chance). It assumes that you choose class C with probability 1 if P(C) is the biggest among all the classes. |
Reads in feature vectors where the first element is the true class. This is the main data input for l_classifier, qdg_classifier and qd_classifier.
|
This function takes a list of data (type datum_tr) and makes sure that they all have the same length feature vector. If so, it reports the length (dimension) of the feature vector.
|
Build classifiers based on the training set, and test them on the testing set. Modelchoice here is the completed class object, not a closure. |
This function makes sure that the training set and testing set come from different groups. The 'grouper' returns a group name, when given a datum. Modelchoice is expected to take one argument, the training set.
|
Build a forest of classifiers.
|
This can be passed into a classifier descriptor as the evaluate argument. It returns the number of exact matches between the classified data and the input, true classification.
|
Evaluates the negative log of the probability that the classifier would assign to the datum being in the observed class (i.e. whatever class is specified in the datum_tr). Obviously, you want this to be a relatively small number.
|
This writes out classifiers to a data file. Attention: out needs to be a list, not an iterator, because we use it twice. |
Count how many instances there are of each class.
|
List the names of the classes in a dataset, with the most populus classes first.
|
Used to get the name of an evaluator, to write it to a file header.
|
Maps a name to a function that will evaluate how well a classifier performs.
|
Modifies a classifier so it isn't so dominated by the most frequent classes.
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Dec 8 11:00:41 2010 | http://epydoc.sourceforge.net |