# FUNCTION

# Public

# TRAIN-SVM (TRAINING-PAIRS &KEY (KKT-TOLERANCE 0.005) (KERNEL 'DOT-PRODUCT) (C 1))

Trains a simple SVM using an arbitrary kernel. Training-pairs is a sequence
of of pairs, where the car of each pair is a vector of numbers and the cdr is either -1 or 1.
This will return three values: The first value is a function that can be called with
an argument of the same dimension as a training example. It will return either t
or nil.
The other two return values are the vector w and the scalar b that define the plane of the form
w . x - b = 0.
Implementation note:
The algorithm used to optimize the SVM is the SMO algorithm first described by Platt. It is
actually not even that algorithm, yet, because we apply no heuristic to choose which
constraints to optimize--we just select random ones. Also we do not account
for the case where n=0 in the code below, which is done in the actual SMO algorithm.

# Undocumented

# DOT-PRODUCT (V1 V2)

# MACRO

# Public

# TRAINING-PAIR-BIND ((X-VAR Y-VAR) TRAINING-PAIR &BODY BODY)

Binds the symbols named by x-var and y-var to the x and y components of a training pair.