Closed GoogleCodeExporter closed 9 years ago
Could you post the exact code you are trying to run? This way I can check and
see what is going on.
thanks,
Flávio
Original comment by fccoelho
on 27 Jul 2010 at 1:55
dim = len(func.maxs)
params = [(func.mins[i], func.maxs[i] - func.mins[i]) for i in xrange(dim)]
seeds = np.array(lhs([uniform]*dim, params, size, False, np.identity(dim))).T
dim is the number of parameters. params is a list of len(dim) that is (min,
max) tuple.
Original comment by nick.man...@gmail.com
on 27 Jul 2010 at 2:52
I am looking into this. On the bright side, it's not a bug in my code but a
limitation of the method, meaning that you can't do a cholesky decomposition on
a matrix which is not positive-definite.
However, that does not solve the problem that certain combinations of number of
parameters and sample size seem to yield these kinds of matrices....(not only
when params > size).
Anyway, Until I can figure out how to avoid this, assuming it is avoidable, I
suggest trying some workarounds:
1 - Generate larger samples, then throw away the samples you don't need.
2 - If uncorrelated variables are not strictly necessary, set noCorrRestr to
True.
By the way on uniform distributions (scipy.stats.uniform) the parameter are
(min,range) not (min,max).
if You have any suggestions on how to fix this, please let me know
Original comment by fccoelho
on 28 Jul 2010 at 3:30
Thanks, I'll set noCorrRestr to True for now. Also, I realized that was a type.
My params list is (min, range) if you notice in my last post, the 2nd variable
for the tuple is max-min.
Thanks again.
Original comment by nick.man...@gmail.com
on 28 Jul 2010 at 4:17
Can't findo a solution to this. If someone has a solution and want to
contributed please reopen this issue
Original comment by fccoelho
on 26 Aug 2010 at 5:40
Original issue reported on code.google.com by
nick.man...@gmail.com
on 25 Jul 2010 at 8:03