segmentation fault in scipy?

Robert Kern robert.kern at gmail.com
Thu May 11 21:57:17 CEST 2006


py_genetic wrote:
>>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...

But, again, why bother calculating an enormous matrix just to take its trace
when you can use elementwise multiplication and not waste any time or memory
calculating values that you don't need? It's not a trick. It's just wrong.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco




More information about the Python-list mailing list