sanssouci-org / sanssouci.python

Post hoc inference via multiple testing
GNU General Public License v3.0
6 stars 3 forks source link

Vectorize calibration for any template #24

Closed alexblnn closed 2 years ago

alexblnn commented 3 years ago

Since PR #22 we use a loop in the calibration function to apply the inverse templates :

tkInv_all = np.array([t_inv(p0[:, i], i + 1, p) for i in range(p)]).T

Perhaps this could be avoided. We can see that easily in the linear case, but the general case is not trivial (for example, for beta templates)

bthirion commented 3 years ago

As far as I can see, the fix would be to have t_inv accept an array as a second argument. t_inv would perform the loop internally; I guess that for some templates it can be vectorized easily.

pneuvial commented 2 years ago

too low priority.