holisticai.bias.plots.long_tail_plot#

holisticai.bias.plots.long_tail_plot(mat_pred, top=None, thresh=0.5, normalize=False, ax=None, size=None, title=None)[source]#

Long Tail Plot.

Description

This function plots the counts in the predictions for all items.

Parameters

mat_predmatrix-like

Matrix with shape (num_users, num_items). A recommender score (binary or soft pred) for each user,item pair.

top (optional)int

If not None, the number of items that are shown to each user.

thresh (optional)float

Threshold indicating value at which a given item is shown to user (if top is None).

normalize (optional)bool

If True, normalises the data matrix to [0,1] range.

ax (optional)matplotlib axes

Pre-existing axes for the plot

size (optional)(int, int)

Size of the figure

title (optional)str

Title of the figure

Returns

matplotlib ax