API - hyperparameter optimization routines#
- class found.tune.Tuner[source]#
abstract base class for a hyper parameter tuner which wraps some pipeline
- class found.tune.NaiveMaxScoreTuner(score_fn, k_range)[source]#
tuner class which attempts to select for an optimal k by selecting the k with maximal score as calculated by
self.score_fnfor each provided k inself.k_rangeassumes that provided pipeline takes an argument
kat invocation which dictates the number of dimensions to calculate in the reduction
- class found.tune.FixPointTuner(min_stable, start_k, pct_delta, force_dec=False)[source]#
tuner class which attempts to select for an optimal k (k_opt) >
self.start_ksuch that where:v_hat(x, k): is the adjusted label for a cell x under dimensionality reduction of dimension k
n_change(k): is # of cells x for which it is true that v_hat(x, k) != v_hat(x, k-1)
for all k in (k_opt-
self.min_stable, k_opt]: n_change(k) < # of cells *self.pct_delta(e.g. first dimension g.t.self.start_ksuch that for previousself.min_stabledimensions, labels haven’t changed by more thanself.pct_deltapercent)if
self.force_decisTrue, we also enforce the property that: for all k in (k_opt-self.min_stable, k_opt]: n_change(k) <= n_change(k-1) (e.g. number of changing labels was decreasing for allself.min_stablek prior to selected optimal k)assumes that provided pipeline takes an argument
kat invocation which dictates the number of dimensions to calculate in the reduction- Parameters:
min_stable (
int) – number of dimensions for which stability property outlined above must holdstart_k (
int) – number of dimensions to start iteration process withpct_delta (
float) – percent change in label considered allowableforce_dec (
bool) – whether to also enforce decreasing property outlined above, defaults toFalse