sklearn_tournament.commons

Module Contents

Classes

ItemsPerSecondColumn

Base class for a widget to use in progress display.

SecondsPerItemColumn

Base class for a widget to use in progress display.

Functions

install_rich(conf: Optional[dict] = None) → None

jam_geomean(seq: Sequence[float]) → float

list_compare(a: Any, b: Any) → bool

iround(num: float) → int

round_to_first_significant(num: float, max_digits: int = 3) → float

round_to_first_significant_digits(num: float, digits: int = 1, max_digits: int = 3) → float

ema(x: float, mu: Optional[float] = None, alpha: float = 0.3) → float

Exponential moving average: smoothing to give progressively lower

std_progress(console: Optional[rich.console.Console] = None) → rich.progress.Progress

Attributes

rc

sklearn_tournament.commons.rc[source]
sklearn_tournament.commons.install_rich(conf: Optional[dict] = None)None[source]
sklearn_tournament.commons.jam_geomean(seq: Sequence[float])float[source]
sklearn_tournament.commons.list_compare(a: Any, b: Any)bool[source]
sklearn_tournament.commons.iround(num: float)int[source]
sklearn_tournament.commons.round_to_first_significant(num: float, max_digits: int = 3)float[source]
sklearn_tournament.commons.round_to_first_significant_digits(num: float, digits: int = 1, max_digits: int = 3)float[source]
sklearn_tournament.commons.ema(x: float, mu: Optional[float] = None, alpha: float = 0.3)float[source]

Exponential moving average: smoothing to give progressively lower weights to older values. :param x: New value to include in EMA. :type x: float :param mu: Previous EMA value. :type mu: float, optional :param alpha: Smoothing factor in range [0, 1], [default: 0.3].

Increase to give more weight to recent values. Ranges from 0 (yields mu) to 1 (yields x).

class sklearn_tournament.commons.ItemsPerSecondColumn[source]

Bases: rich.progress.ProgressColumn

Base class for a widget to use in progress display.

max_refresh = 0.5[source]
render(self, task: rich.progress.Task)rich.text.Text[source]

Should return a renderable object.

class sklearn_tournament.commons.SecondsPerItemColumn[source]

Bases: rich.progress.ProgressColumn

Base class for a widget to use in progress display.

max_refresh = 0.5[source]
render(self, task: rich.progress.Task)rich.text.Text[source]

Should return a renderable object.

sklearn_tournament.commons.std_progress(console: Optional[rich.console.Console] = None)rich.progress.Progress[source]