Re: [Numpy-discussion] categorical distributions

2010-11-23 Thread Hagen Fürstenau
Can you compare the speed of your cython solution with the version of Chuck For multiple samples of the same distribution, it would do more or less the same as the searchsorted method, so I don't expect any improvement (except for being easier to find). For multiple samples of different

Re: [Numpy-discussion] N dimensional dichotomy optimization

2010-11-23 Thread Gael Varoquaux
On Tue, Nov 23, 2010 at 08:21:55AM +0100, Matthieu Brucher wrote: optimize.fmin can be enough, I don't know it well enough. Nelder-Mead is not a constrained optimization algorithm, so you can't specify an outer hull. I saw that, after a bit more reading. As for the integer part, I don't know

Re: [Numpy-discussion] N dimensional dichotomy optimization

2010-11-23 Thread Sebastian Walter
Hello Gael, On Tue, Nov 23, 2010 at 10:27 AM, Gael Varoquaux gael.varoqu...@normalesup.org wrote: On Tue, Nov 23, 2010 at 10:18:50AM +0100, Matthieu Brucher wrote: The problem is that I can't tell the Nelder-Mead that the smallest jump it should attempt is .5. I can set xtol to .5, but it

Re: [Numpy-discussion] N dimensional dichotomy optimization

2010-11-23 Thread Gael Varoquaux
On Tue, Nov 23, 2010 at 11:13:23AM +0100, Sebastian Walter wrote: I'm not familiar with dichotomy optimization. Several techniques have been proposed to solve the problem: genetic algorithms, simulated annealing, Nelder-Mead and Powell. To be honest, I find it quite confusing that these

Re: [Numpy-discussion] N dimensional dichotomy optimization

2010-11-23 Thread Sebastian Walter
On Tue, Nov 23, 2010 at 11:17 AM, Gael Varoquaux gael.varoqu...@normalesup.org wrote: On Tue, Nov 23, 2010 at 11:13:23AM +0100, Sebastian Walter wrote: I'm not familiar with dichotomy optimization. Several techniques have been proposed to solve the problem: genetic algorithms, simulated

Re: [Numpy-discussion] N dimensional dichotomy optimization

2010-11-23 Thread Gael Varoquaux
On Tue, Nov 23, 2010 at 11:37:02AM +0100, Sebastian Walter wrote: min_x f(x) s.t.   lo = Ax + b = up            0 = g(x)            0 = h(x) No constraints. didn't you say that you operate only in some convex hull? No. I have an initial guess that allows me to specify a convex hull

Re: [Numpy-discussion] N dimensional dichotomy optimization

2010-11-23 Thread Sebastian Walter
On Tue, Nov 23, 2010 at 11:43 AM, Gael Varoquaux gael.varoqu...@normalesup.org wrote: On Tue, Nov 23, 2010 at 11:37:02AM +0100, Sebastian Walter wrote: min_x f(x) s.t.   lo = Ax + b = up            0 = g(x)            0 = h(x) No constraints. didn't you say that you operate only in

Re: [Numpy-discussion] N dimensional dichotomy optimization

2010-11-23 Thread Gael Varoquaux
On Tue, Nov 23, 2010 at 02:47:10PM +0100, Sebastian Walter wrote: Well, I don't know what the best method is to solve your problem, so take the following with a grain of salt: Wouldn't it be better to change the model than modifying the optimization algorithm? In this case, that's not

Re: [Numpy-discussion] N dimensional dichotomy optimization

2010-11-23 Thread josef . pktd
On Tue, Nov 23, 2010 at 8:50 AM, Gael Varoquaux gael.varoqu...@normalesup.org wrote: On Tue, Nov 23, 2010 at 02:47:10PM +0100, Sebastian Walter wrote: Well, I don't know what the best method is to solve your problem, so take the following with a grain of salt: Wouldn't it be better to change

Re: [Numpy-discussion] numpy.test() errors

2010-11-23 Thread Stéfan van der Walt
On Tue, Nov 23, 2010 at 9:28 AM, Nils Wagner nwag...@iam.uni-stuttgart.de wrote: /data/home/nwagner/local/lib/python2.5/site-packages/numpy/lib/npyio.py, line 66, in seek_gzip_factory     g.name = f.name AttributeError: GzipFile instance has no attribute 'name' This one is mine--the change

Re: [Numpy-discussion] N dimensional dichotomy optimization

2010-11-23 Thread Sebastian Walter
On Tue, Nov 23, 2010 at 2:50 PM, Gael Varoquaux gael.varoqu...@normalesup.org wrote: On Tue, Nov 23, 2010 at 02:47:10PM +0100, Sebastian Walter wrote: Well, I don't know what the best method is to solve your problem, so take the following with a grain of salt: Wouldn't it be better to change

Re: [Numpy-discussion] numpy.test() errors

2010-11-23 Thread Gerrit Holl
2010/11/23 Stéfan van der Walt ste...@sun.ac.za: On Tue, Nov 23, 2010 at 9:28 AM, Nils Wagner nwag...@iam.uni-stuttgart.de wrote: /data/home/nwagner/local/lib/python2.5/site-packages/numpy/lib/npyio.py, line 66, in seek_gzip_factory     g.name = f.name AttributeError: GzipFile instance has

Re: [Numpy-discussion] N dimensional dichotomy optimization

2010-11-23 Thread Gael Varoquaux
On Tue, Nov 23, 2010 at 10:19:06AM -0500, josef.p...@gmail.com wrote: I have a Nelder-Mead that seems to be working quite well on a few toy problems. Assuming your function is well behaved, one possible idea is to try replacing the integer objective function with a continuous

Re: [Numpy-discussion] N dimensional dichotomy optimization

2010-11-23 Thread Zachary Pincus
On Nov 23, 2010, at 10:57 AM, Gael Varoquaux wrote: On Tue, Nov 23, 2010 at 04:33:00PM +0100, Sebastian Walter wrote: At first glance it looks as if a relaxation is simply not possible: either there are additional rows or not. But with some technical transformations it is possible to

Re: [Numpy-discussion] numpy.test() errors

2010-11-23 Thread Nils Wagner
On Tue, 23 Nov 2010 16:39:13 +0100 Gerrit Holl gerrit.h...@gmail.com wrote: 2010/11/23 Stéfan van der Walt ste...@sun.ac.za: On Tue, Nov 23, 2010 at 9:28 AM, Nils Wagner nwag...@iam.uni-stuttgart.de wrote: /data/home/nwagner/local/lib/python2.5/site-packages/numpy/lib/npyio.py, line 66, in

Re: [Numpy-discussion] N dimensional dichotomy optimization

2010-11-23 Thread Matthieu Brucher
2010/11/23 Zachary Pincus zachary.pin...@yale.edu: On Nov 23, 2010, at 10:57 AM, Gael Varoquaux wrote: On Tue, Nov 23, 2010 at 04:33:00PM +0100, Sebastian Walter wrote: At first glance it looks as if a relaxation is simply not possible: either there are additional rows or not. But with some

[Numpy-discussion] Theano 0.3 Released

2010-11-23 Thread Frédéric Bastien
==  Announcing Theano 0.3 == This is an important release. The upgrade is recommended for everybody using Theano 0.1. For those using the bleeding edge version in the mercurial repository, we encourage you to update to the `0.3` tag. This is the first

Re: [Numpy-discussion] numpy.test() errors

2010-11-23 Thread Stéfan van der Walt
2010/11/23 Stéfan van der Walt ste...@sun.ac.za: On Tue, Nov 23, 2010 at 9:28 AM, Nils Wagner nwag...@iam.uni-stuttgart.de wrote: /data/home/nwagner/local/lib/python2.5/site-packages/numpy/lib/npyio.py, line 66, in seek_gzip_factory     g.name = f.name AttributeError: GzipFile instance has

Re: [Numpy-discussion] numpy.test() errors

2010-11-23 Thread Pauli Virtanen
On Tue, 23 Nov 2010 23:24:25 +0200, Stéfan van der Walt wrote: 2010/11/23 Stéfan van der Walt ste...@sun.ac.za: On Tue, Nov 23, 2010 at 9:28 AM, Nils Wagner nwag...@iam.uni-stuttgart.de wrote: /data/home/nwagner/local/lib/python2.5/site-packages/numpy/lib/npyio.py, line 66, in

Re: [Numpy-discussion] numpy.test() errors

2010-11-23 Thread Neil Muller
On 23 November 2010 23:44, Pauli Virtanen p...@iki.fi wrote: On Tue, 23 Nov 2010 23:24:25 +0200, Stéfan van der Walt wrote: There's this on Python 3.2: == ERROR: test_io.test_gzip_load

Re: [Numpy-discussion] N dimensional dichotomy optimization

2010-11-23 Thread Gael Varoquaux
On Tue, Nov 23, 2010 at 07:14:56PM +0100, Matthieu Brucher wrote: Jumping in a little late, but it seems that simulated annealing might be a decent method here: take random steps (drawing from a distribution of integer step sizes), reject steps that fall outside the fitting range, and

[Numpy-discussion] question for numpy import error

2010-11-23 Thread 명광민
I receive the following error when I try to import numpy === [node0]:/home/koojy/KMM python2.6 Python 2.6.4 (r264:75706, Jul 26 2010, 16:55:18) [GCC 3.4.6 20060404 (Red Hat 3.4.6-10)] on linux2 Type help, copyright, credits or license for

Re: [Numpy-discussion] N dimensional dichotomy optimization

2010-11-23 Thread Matthieu Brucher
2010/11/24 Gael Varoquaux gael.varoqu...@normalesup.org: On Tue, Nov 23, 2010 at 07:14:56PM +0100, Matthieu Brucher wrote: Jumping in a little late, but it seems that simulated annealing might be a decent method here: take random steps (drawing from a distribution of integer step sizes),