Table of Contents

Class: SVM Bio/Tools/Classification/SVM.py

Holds information for a non-linear Support Vector Machine.

Members: xs A list of the input vectors. ys A list of the output values. Must be either 1 or -1. alphas A list of the Lagrange multipliers for each point. b The threshold value for the machine. kernel_fn Should take 2 vectors and return a distance.

  • xs, ys, and alphas should be a parallel list of vectors. ** There's a special read-only member variable w. For linear SVM's, this is the w vector so that the decision hyperplane is at wx-b=0

Methods   
__getattr__
__init__
  __getattr__ 
__getattr__ ( self,  x )

Exceptions   
AttributeError, x
  __init__ 
__init__ (
        self,
        xs,
        ys,
        alphas=None,
        b=None,
        kernel_fn=LinearKernel(),
        )

Exceptions   
ValueError, "Output must be either 1 or -1"
ValueError, "xs and alphas must be parallel arrays"
ValueError, "xs and ys must be parallel arrays"

Table of Contents

This document was automatically generated on Mon Jul 1 12:03:03 2002 by HappyDoc version 2.0.1