segmentation fault in scipy?

py_genetic conor.robinson at
Thu May 11 21:48:47 CEST 2006

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

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