Skip to main content

models.InteractionScreen

The result of interaction_screen.

Usage

Source

models.InteractionScreen(
    features,
    pairs,
    single,
    joint,
)

Attributes

features: list of str
pairs: list of (str, str)
single: list of list of float

single[i][j]: on split i, the loss from shuffling feature j alone, L_A.

joint: list of list of float
joint[i][k]: on split i, the loss from shuffling pair k’s two features together, L_AB.

Attributes

Name Description
by_split L_A + L_B - L_AB per split and pair.
std_error The splits’ standard error of each pair’s strength.
strength L_A + L_B - L_AB averaged over the splits, per pair: about 0

by_split

L_A + L_B - L_AB per split and pair.

by_split


std_error

The splits’ standard error of each pair’s strength.

std_error


strength

L_A + L_B - L_AB averaged over the splits, per pair: about 0

strength

when neither feature interacts with anything, positive when they interact with each other or with a common third feature.

Methods

Name Description
combine() One result from several over the same features and pairs.
table() One row per pair, strongest first: a, b, strength,

combine()

One result from several over the same features and pairs.

Usage

Source

combine(results)

table()

One row per pair, strongest first: a, b, strength,

Usage

Source

table()

std_error, and the mean losses loss_a, loss_b and loss_ab, as a list of dicts.