SciPy.org SciPy 0.6.0 API Documentation Generated by Endo, 2007-10-17

Vector Quantization Module

Provides several routines used in creating a code book from a set of observations and comparing a set of observations to a code book.

All routines expect an "observation vector" to be stored in each row of the obs matrix. Similarly the codes are stored row wise in the code book matrix.

whiten(obs) --
Normalize a group of observations on a per feature basis
vq(obs,code_book) --
Calculate code book membership of obs
kmeans(obs,k_or_guess,iter=20,thresh=1e-5) --
Train a codebook for mimimum distortion using the kmeans algorithm
kmeans2
Similar to kmeans, but with several initialization methods.

Classes

Function summary

Functions

Imported Names

Local nameRefers to
arangenumpy.arange
argminnumpy.argmin
arraynumpy.array
common_typenumpy.common_type
compressnumpy.compress
doublenumpy.double
equalnumpy.equal
meannumpy.mean
minimumnumpy.minimum
Nnumpy
newaxisnumpy.newaxis
randintnumpy.random.randint
shapenumpy.shape
singlenumpy.single
sqrtnumpy.sqrt
stdnumpy.std
takenumpy.take
warningswarnings
zerosnumpy.zeros