fcit icon indicating copy to clipboard operation
fcit copied to clipboard

Unexpected Speed

Open nightvision04 opened this issue 4 years ago • 0 comments

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

nightvision04 avatar Apr 28 '21 03:04 nightvision04