algorithms.stopping_rules¶
Module: algorithms.stopping_rules
¶
Stopping rules used in sequential FDR control.
Functions¶
-
selectinf.algorithms.stopping_rules.
forward_stop
(pvalues, alpha)[source]¶ Compute the number of rejections using forward stop of `http://arxiv.org/abs/1309.5352`_
>>> forward_stop(np.array([0.5,0.6,0.7,0.8,0.9]), 0.05) 0 >>> forward_stop(np.array([0.001, 0.002, 0.0015, 0.0013, 0.05, 0.6]), 0.05) 5
In R:
> forwardstop(c(0.5,0.6,0.7,0.8,0.9), 0.05) [1] 0 > forwardstop(c(0.001, 0.002, 0.0015, 0.0013, 0.05, 0.6), 0.05) [1] 5 >
- Parameters
pvalues : np.float
alpha : float
- Returns
num_rejections : int
-
selectinf.algorithms.stopping_rules.
simple_stop
(pvalues, alpha)[source]¶ Compute the number of rejections using simple stop, the first time a p-value is above alpha.
- Parameters
pvalues : np.float
alpha : float
- Returns
num_rejections : int
-
selectinf.algorithms.stopping_rules.
strong_stop
(pvalues, alpha)[source]¶ Compute the number of rejections using strong stop of `http://arxiv.org/abs/1309.5352`_
>>> strong_stop(np.array([0.5,0.6,0.7,0.8,0.9]), 0.05) 0 >>> strong_stop(np.array([0.001, 0.002, 0.0015, 0.0013, 0.05, 0.6]), 0.05) 3
In R:
> strongstop(c(0.001, 0.002, 0.0015, 0.0013, 0.05, 0.6), 0.05) [1] 3 > strongstop(c(0.5,0.6,0.7,0.8,0.9), 0.05) [1] 0
- Parameters
pvalues : np.float
alpha : float
- Returns
num_rejections : int