streamsight.utils

Utility

The utility module provides a set of utility functions that are used in the Streamsight library. These function are general functions that are not class specific and also contains functions that are used in the top level such as preparing the logger and creating the configuration file.

create_config_yaml(filename)

Create a configuration file for the logger.

safe_dir(path)

Check if directory is safe

add_columns_to_csr_matrix(matrix[, n])

Add a column of zeros to a csr_matrix.

add_rows_to_csr_matrix(matrix[, n])

Add a row of zeros to a csr_matrix.

arg_to_str(arg)

Converts a type to its name or returns the string.

df_to_sparse(df, item_ix, user_ix[, ...])

prepare_logger(path)

Prepare the logger.

to_binary(X)

Converts a matrix to binary by setting all non-zero values to 1.

to_tuple(el)

Whether single element or tuple, always returns as tuple.

ProgressBar()

Progress bar as visual.