Utils#

Binarizer(bins[, edge_bins, method, encoding])

Binarize continuous features into thermometer or one-hot encoded bins.

Profiler([poll_rate, cuda_id])

Context manager for profiling CPU and GPU memory usage over time.

Timer()

Context manager for measuring elapsed wall-clock time.

print_table(id, rows[, force_no_rich])

Print a formatted table to the console.

norm_asymmetric(arr[, eps])

Zero-anchored per-sample normalization.

Progress bar#

Progress bar settings for YTM.

YTM shows a tqdm progress bar during fit and inference (score, predict, transform, …). The tqdm options used for every bar live in KWARGS. Change them with set_config, or turn the bars off with disable or the TQDM_DISABLE=1 environment variable. bar wraps any iterable in a progress bar with these settings.

ytm.pbar.KWARGS: dict = {'bar_format': '{desc}: {percentage:3.0f}% {n_fmt}/{total_fmt} [{elapsed}<{remaining}, {rate_fmt}{postfix}]', 'disable': False, 'dynamic_ncols': True, 'leave': False}#

tqdm options used for every YTM progress bar.

ytm.pbar.bar(iterable, **kwargs)#

Make a TQDM progress bar.

ytm.pbar.disable() → None#

Turn the progress bar off entirely.

ytm.pbar.set_config(**kwargs) → None#

Change the progress bar’s tqdm options, e.g. set_config(bar_format=”…”).