src.utils package

Submodules

src.utils.data module

src.utils.data.matrix_from_df_with_vect(df, groupby_column, data_column, vectorizer)[source]
src.utils.data.recommendations_from_similarity_matrix(movie_ids, sim_matrix, n_recommendations, input_kind)[source]
src.utils.data.sparse_matrix_from_df(df, groupby, indicator)[source]

Make a scipy sparse matrix from a pandas Dataframe

Parameters:
  • df (pd.DataFrame) – Dataframe with the matrix desired rows as index
  • groupby (str) – Name of the column to set as matrix column
  • indicator (str) – Name of the column that will serve as data
Returns:

sparse matrix (scipy.sparse.csr_matrix) row values (list) column values (list)

src.utils.logging module

src.utils.logging.setup_logging(config_path)[source]

Setup logging configuration