Skip to content

Screeners

Bases: _BaseScreener

Truncated Preconditioned Profiled Independence Screening.

Equation (7) of Tanaka and Matsui (2023). Default d and alpha are chosen jointly by the BIC-type criterion (10).

Examples:

>>> import numpy as np
>>> from tppis import TPPIS
>>> rng = np.random.default_rng(0)
>>> X = rng.normal(size=(40, 15))
>>> y = X[:, 0] + X[:, 1] + rng.normal(scale=0.1, size=40)
>>> est = TPPIS(d=2, alpha=0.6, k=2).fit(X, y)
>>> set(est.get_support(indices=True).tolist()) == {0, 1}
True

Bases: _BaseScreener

Preconditioned Profiled Independence Screening (Zhao et al., 2020).

Puffer-style whitening of the tail spectrum (equation (6)). Equivalent to :class:TPPIS at alpha = 1 with matching d.

Examples:

>>> import numpy as np
>>> from tppis import PPIS, TPPIS
>>> rng = np.random.default_rng(0)
>>> X = rng.normal(size=(40, 15))
>>> y = X[:, 0] + X[:, 1] + rng.normal(scale=0.1, size=40)
>>> a = PPIS(d=3, k=2).fit(X, y).omega_
>>> b = TPPIS(d=3, alpha=1.0, k=2).fit(X, y).omega_
>>> np.allclose(a, b)
True

Bases: _BaseScreener

Factor Profiled Sure Independence Screening (Wang, 2012).

Projects out the leading d left singular vectors (equation (4)) and chooses d by the singular-value ratio (3) unless a value is given.

Examples:

>>> import numpy as np
>>> from tppis import FPSIS
>>> rng = np.random.default_rng(0)
>>> X = rng.normal(size=(40, 12))
>>> y = X[:, 0] + X[:, 1] + rng.normal(scale=0.1, size=40)
>>> FPSIS(d=2, k=2).fit(X, y).k_
2

Bases: _BaseScreener

FPSIS with d chosen by the BIC-type criterion (10).

The paper's FPSIS_BIC benchmark, used to isolate the gain from choosing d by BIC versus the gain from truncation.

Examples:

>>> import numpy as np
>>> from tppis import FPSISBIC
>>> rng = np.random.default_rng(0)
>>> X = rng.normal(size=(30, 10))
>>> y = X[:, 0] + rng.normal(scale=0.1, size=30)
>>> est = FPSISBIC(k=1).fit(X, y)
>>> int(est.selected_[0]) in range(10)
True

Bases: _BaseScreener

Sure Independence Screening (Fan and Lv, 2008).

omega = X.T @ y. No factor-analysis transform.

Examples:

>>> import numpy as np
>>> from tppis import SIS
>>> rng = np.random.default_rng(0)
>>> X = rng.normal(size=(40, 12))
>>> y = X[:, 0] + X[:, 1] + rng.normal(scale=0.1, size=40)
>>> SIS(k=2).fit(X, y).get_support(indices=True).tolist()
[0, 1]

Fit a screener in one call.

Parameters:

Name Type Description Default
X ArrayLike

Design and response.

required
y ArrayLike

Design and response.

required
method MethodLiteral

One of "sis", "fpsis", "fpsis_bic", "ppis", "tppis".

'tppis'
**kwargs Any

Forwarded to the corresponding estimator.

{}

Returns:

Type Description
estimator

A fitted instance. All fitted attributes (selected_, grid_, bic_, ...) are available on the return value.

Examples:

>>> import numpy as np
>>> from tppis import screen
>>> rng = np.random.default_rng(0)
>>> X = rng.normal(size=(40, 12))
>>> y = X[:, 0] + rng.normal(scale=0.1, size=40)
>>> result = screen(X, y, method="sis", k=1)
>>> int(result.selected_[0])
0