segmentation fault in scipy?

conor.robinson at gmail.com conor.robinson at gmail.com
Thu May 11 14:48:14 EDT 2006


>I'm afraid you're using terminology (and abbreviations!) that I can't follow.
>Let me try to restate what's going on and you can correct me as I screw up. You
>have a neural net that has 80 output units. You have 25000 observations that you
>are using to train the neural net. Each observation vector (and consequently,
>each error vector) has 80 elements.

First, sorry for not quoting and using abbreviations.  Second, your
obsevation is correct, except that I have *one* output unit, not 80.  I
have ~80 input units + bias (for each of the 25000 observations), x +
bias number of hidden units and one output unit leaving me with an
output array/matrix of shape =(25000,), as well as my desired output
having the same shape.

RPROP = Resilliant BackPropogation, uses chages in the error gradiant
ignores the magnitude of the gradiant, which can be harmful.  See "A
Direct Adaptive Method for Faster Backpropogation Learning: The RPROP
Algorithm" -Martin Riedmiller and Heinrich Braun, just google it and
read Section D, it's well written.

tanh = hyperbolic tangent function [-1, 1] y vals, often times better
for its steeper derivative and wider range.

sigmoid function = popular for its [0,1] range and can calculate
posterior probabilities when using a the cross entropy error function
which I have commented out since it takes more time to process and I'm
not using my error function in this specific case at this point in
time, thus SSE is not really needed, however I'd like use it as a
check.  Also, popular for its easily calculatable derivative.


>The answer I gave also used the wrong name for the result. It seems that you
>want the sum of the squared errors across all of the observations. In this case,
>you can use axis=None to specify that every element should be summed:
>
>  SSE = sum(multiply(error, error), axis=None)
>
>trace(dot(error, transpose(error))) wastes a *huge* amount of time and memory
>since you are calculating (if your machine was capable of it) a gigantic matrix,
>then throwing away all of the off-diagonal elements. The method I give above
>wastes a little memory; there is one temporary matrix the size of error.

This is great advise and much appreciated.  It was the answer to my
problem, thank you.  However, isn't this faster...
scipy.sum(scipy.array(scipy.matrix(error)*scipy.matrix(error)), axis =
None)
as we you explained in my other posting?

Thanks again.




More information about the Python-list mailing list