## Item Matrix

This matrix, loaded from `talent.csv` into a Pandas dataframe, includes a row for each talent on the platform with columns for their features.

These variables, imported earlier, allow you reference the talent features:

- `READABLE_LABELS`: the pretty names of each category, in the order of the columns in the multi-label matrix.
- `COLUMN_LABELS`: the actual names of each column in the multi-label matrix, in order.
- `ATTRIBUTES`: the dataframe columns that are not part of the multi-label matrix.

The attributes for each talent are:

- `id`: a unique identifier for the talent, also the URL of their webpage: `cameo.com/${id}`.
- `name`: display name for the talent.
- `price`: price in dollars to book the talent.
- `reactions`: the number of users who have reacted to videos from the talent (non-negative integer).
- `stars`: the cumulative rating from users who booked the talent (float between 0 and 5, inclusive).
- `joined`: the month and year in which the talent first became available on the platform.
- `categories`: a list of readable category names the talent belongs to, more convenient to view than the item matrix.

## Transaction Matrix

These matrices, loaded from a pickle file, include a row for each user and a column for each talent, with an entry of `1` if the user likes that talent and `0` otherwise.

For space efficiency, the transaction matrices are stored in a format called [Compressed Sparse Row (CSR)](https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.csr_matrix.html). The cell below converts them to dense scipy matrices and then shows an example of loading the data into a Pandas dataframe.

The train/test split for recommender systems is slightly different from the split for classification or regression. We have four matrices:

- **Train:** Transaction matrix with rows of train data.
- **Test:** Transaction matrix with rows of test data. This is essentially ignored, in favor of the next two.
- **Input:** Transaction matrix with rows of test data. However, some entries in each row have been removed.
- **Hidden:** Transaction matrix with rows of test data. Contains only the entries removed from the input matrix.

Our job is to predict the **Hidden** entries, given the **Input** entries, based on the **Train** records.

## Sets Representation

The matrices above are nice because they match how textbooks and research papers describe recommender algorithms. The matrix format is well-suited for matrix decomposition approaches to recommender systems or other large-scale methods.

Since the transaction matrix is sparse, for our purposes, it may be more efficient to work with a list of sets. Each entry in the list is a set of column indices of talent that the user liked.