## Pattern Recognition is schooling me in math all over again

2009-09-27Discriminant functions:

g(x) = x⃗ᵗ W⃗ᵢ x⃗ + w⃗ᵢx⃗ + wᵢ₀

the first is the product of a 1×2 row vector, 2×2 matrix, and 2×1 column vector. This should return a scalar. Leaving x⃗ as an independent variable (e.g. x⃗ = {{x₁},{x₂}}), yields a quadratic equation such as Ax₁² + Bx₂² + (C+D)x₁x₂. The second part gives Ex₁ + Fx₂, and the last part is just a scalar with no variable coefficient attached.

I’ve been using Numpy within Python with Matplotlib and a bit of Scipy in order to do my homework for this class. In creating my functions to take data and crunch it, I’m being very general with the dimensionality of the data set. I have a function that can take in the W⃗ matrix and the w⃗ vector, and produce as its output a list of coefficients of the resulting quadratic, using the size of the list and the order of its elements to encode the independent variables x₁² x₂² x₁x₂ x₁ x₂ and so on.

## Leave a Reply