holisticai.bias.plots.exposure_diff_plot#
- holisticai.bias.plots.exposure_diff_plot(group_a, group_b, mat_pred, top=None, thresh=0.5, normalize=False, ax=None, size=None, title=None)[source]#
Exposure Difference plot.
Description
This function plots the difference in the exposure distributions between group_a and group_b.
Parameters
- group_aarray-like
Group membership vector (binary)
- group_barray-like
Group membership vector (binary)
- 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 in (0,1) range 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