segmentation fault in scipy?

py_genetic conor.robinson at gmail.com
Thu May 11 15:48:47 EDT 2006


>No! matrix objects use matrix multiplication for *. You seem to need elementwise
>multiplication.

No! when you mult a vector with itself transposed, the diagonal of the
resulting matrix is the squares of each error (albeit you do a lot of
extra calc), then sum the squares, ie trace().  Its a nifty trick, if
you don't have too much data 25000x25000 matrix in mem and youre using
matricies ie. batch learning.  The actual equation includes multiply by
1/2*(sum of the squares),  but mean squared error can be more telling
about error and cross entropy is even better, becuase it tells you how
well youre predicting the posterior probabilies...




More information about the Python-list mailing list