Skip to content

Seeding

igl.seed_everything(seed)

Seed python, numpy, and torch global RNGs in one call.

Parameters:

Name Type Description Default
seed int

The seed applied to all three generators.

required

igl.fit_seeds(factory, x, y=None, *, seeds)

Fit one estimator per seed and aggregate the headline read-outs.

Parameters:

Name Type Description Default
factory Callable[[int], fit_seeds[EstimatorT]]

Builds a fresh estimator for a given seed (typically lambda seed: IGLRegressor(..., random_state=seed)).

required
x object

Training inputs, forwarded to fit.

required
y object | None

Optional training targets, forwarded to fit.

None
seeds Sequence[int]

The seed list — e.g. a project's canonical seed protocol.

required

Returns:

Type Description
dict[str, object]

A dict with "seeds", "estimators" (the fitted instances),

dict[str, object]

and "aggregate": for each numeric read-out found on the fitted

dict[str, object]

estimators (effective_dimension_, the final validation metric),

dict[str, object]

its mean, std, median, and IQR across seeds.