Closed AlxndrMlk closed 1 year ago
Hi!
I was using the hsic_test() function from the castle.common.independence_tests module for one of the chapters of my book.
hsic_test()
castle.common.independence_tests
The documentation says:
Returns ------- out: int, 0 or 1 If 0, x and y are independent. If 1, x and y are not independent.
The results seem to suggest that this is actually reversed:
# Generate random data z = np.random.randn(1000) w = np.random.randn(1000) # Dependent hsic_test( x = z.reshape(-1, 1), y = (z*2).reshape(-1, 1) )
returns 0.
0
At the same time:
# Independent hsic_test( x = z.reshape(-1, 1), y = w.reshape(-1, 1) )
returns 1.
1
It seems to me that the documentation incorrectly describes the return values.
Hi @AlxndrMlk,
Yes, you are correct. The documentation here is incorrect and the values should be swapped. I will update the source code here on github with a fix. Thanks for alerting us of the problem!
Hi!
I was using the
hsic_test()
function from thecastle.common.independence_tests
module for one of the chapters of my book.The documentation says:
The results seem to suggest that this is actually reversed:
returns
0
.At the same time:
returns
1
.It seems to me that the documentation incorrectly describes the return values.