fcit
fcit copied to clipboard
Unexpected Speed
At what size dimension should I expect the length of time to be less than 5 seconds? I expected that with these dimensions it wouldn't take longer than a second.
import numpy as np
import time
from fcit import fcit
# Generate some data such that x is indpendent of y given z.
n_samples = 10
z = np.random.dirichlet(alpha=np.ones(2), size=n_samples)
x = np.vstack([np.random.multinomial(2, p) for p in z]).astype(float)
y = np.vstack([np.random.multinomial(2, p) for p in z]).astype(float)
t1 = time.time()
pval_d = fcit.test(x, y)
t2 = time.time()
print(t2-t1)
>>>14.555750846862793