| Trees | Index | Help |
|---|
| Package Bio :: Module LogisticRegression |
|
This module provides code for doing logistic regressions.
Classes: LogisticRegression Holds information for a LogisticRegression classifier.
Functions: train Train a new classifier. calculate Calculate the probabilities of each class, given an observation. classify Classify an observation into a class.| Classes | |
|---|---|
LogisticRegression |
Holds information necessary to do logistic regression classification. |
| Function Summary | |
|---|---|
calculate(lr, x) -> list of probabilities | |
classify(lr, x) -> 1 or 0 | |
train(xs, ys[, update_fn]) -> LogisticRegression | |
| Function Details |
|---|
calculate(lr, x)calculate(lr, x) -> list of probabilities Calculate the probability for each class. lr is a LogisticRegression object. x is the observed data. Returns a list of the probability that it fits each class. |
classify(lr, x)classify(lr, x) -> 1 or 0 Classify an observation into a class. |
train(xs, ys, update_fn=None, typecode=None)train(xs, ys[, update_fn]) -> LogisticRegression Train a logistic regression classifier on a training set. xs is a list of observations and ys is a list of the class assignments, which should be 0 or 1. xs and ys should contain the same number of elements. update_fn is an optional callback function that takes as parameters that iteration number and log likelihood. |
| Trees | Index | Help |
|---|
| Generated by Epydoc 2.1 on Wed Jan 31 09:58:01 2007 | http://epydoc.sf.net |