Closed GoogleCodeExporter closed 8 years ago
Arnar,
Thanks for your bug report.
1. <type 'exceptions.AttributeError'>: 'module' object has no attribute
'repmat':
Response:
I learned that repmat has been moved out of the main numpy module into
numpy.matlib.
This problem has been fixed in the latest SVN. I will do a release later
tonight that
will include this fix.
-------------------------------
2. import numpy
import hcluster
x1 = numpy.random.randn(10,)
x2 = numpy.random.randn(10,)
xx = numpy.vstack((x1, x2))
# <> error
hcluster.correlation(x1, x2)
Response:
First, you know you can do xx = numpy.random.randn(2,10)?
Second, you're right the output of hcluster.correlation does not look right.
In fact, once I fix problem (1), I get a different output.
---------------------------
3. I dont really get the documentation with the manhatten norm and all :-)
Response:
The Manhattan norm of a vector x is ||x||_1=\frac{1}{n}\sum_{x=1}^{n}{x_i} or
just the mean of the elements of the vector. It is the city block walking
distance between the origin and the point x.
---------------------------
4. What is the expected output? What do you see instead? I expected
1-pearson correlation coeff.
Response:
I think it was a parenthesis error. It's supposed to be the correlation
coefficient. The problem has been fixed, and now its output corresponds
with MATLAB's.
---------------------------
5. + X2 = X - X.mean(1)[:,numpy.newaxis]
- X2 = X - numpy.matlib.repmat(numpy.mean(X, axis=1).reshape(m, 1), 1, n)
Response:
Your diff fix is more memory efficient. Thanks.
---------------------------
You should see a release later in the evening.
Damian Eads
Original comment by damian.e...@gmail.com
on 25 Feb 2008 at 2:04
Original issue reported on code.google.com by
arnar.fl...@gmail.com
on 20 Feb 2008 at 3:14