{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 122,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>BGGId</th>\n",
       "      <th>Rating</th>\n",
       "      <th>Username</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>213788</td>\n",
       "      <td>8.0</td>\n",
       "      <td>Tonydorrf</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>213788</td>\n",
       "      <td>8.0</td>\n",
       "      <td>tachyon14k</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>213788</td>\n",
       "      <td>8.0</td>\n",
       "      <td>Ungotter</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>213788</td>\n",
       "      <td>8.0</td>\n",
       "      <td>brainlocki3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>213788</td>\n",
       "      <td>8.0</td>\n",
       "      <td>PPMP</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18942210</th>\n",
       "      <td>165521</td>\n",
       "      <td>3.0</td>\n",
       "      <td>rseater</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18942211</th>\n",
       "      <td>165521</td>\n",
       "      <td>3.0</td>\n",
       "      <td>Bluefox86</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18942212</th>\n",
       "      <td>165521</td>\n",
       "      <td>3.0</td>\n",
       "      <td>serginator</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18942213</th>\n",
       "      <td>193488</td>\n",
       "      <td>1.0</td>\n",
       "      <td>CaptainCattan</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18942214</th>\n",
       "      <td>193488</td>\n",
       "      <td>1.0</td>\n",
       "      <td>trodat123</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>18942215 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "           BGGId  Rating       Username\n",
       "0         213788     8.0      Tonydorrf\n",
       "1         213788     8.0     tachyon14k\n",
       "2         213788     8.0       Ungotter\n",
       "3         213788     8.0    brainlocki3\n",
       "4         213788     8.0           PPMP\n",
       "...          ...     ...            ...\n",
       "18942210  165521     3.0        rseater\n",
       "18942211  165521     3.0      Bluefox86\n",
       "18942212  165521     3.0     serginator\n",
       "18942213  193488     1.0  CaptainCattan\n",
       "18942214  193488     1.0      trodat123\n",
       "\n",
       "[18942215 rows x 3 columns]"
      ]
     },
     "execution_count": 122,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "from sklearn.preprocessing import LabelEncoder\n",
    "import numpy as np\n",
    "\n",
    "df = pd.read_csv(\"user_ratings.csv\")\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 123,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([195785, 385050, 200126, ..., 371648,  30181, 394601],\n",
       "      shape=(18942215,))"
      ]
     },
     "execution_count": 123,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "le = LabelEncoder()\n",
    "le.fit_transform(df['Username'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 124,
   "metadata": {},
   "outputs": [],
   "source": [
    "df['Username_Encoded'] = le.transform(df['Username'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 125,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>BGGId</th>\n",
       "      <th>Rating</th>\n",
       "      <th>Username</th>\n",
       "      <th>Username_Encoded</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>213788.0</td>\n",
       "      <td>8.0</td>\n",
       "      <td>Tonydorrf</td>\n",
       "      <td>195785.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>103768</th>\n",
       "      <td>206593.0</td>\n",
       "      <td>8.0</td>\n",
       "      <td>Tonydorrf</td>\n",
       "      <td>195785.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>147923</th>\n",
       "      <td>267333.0</td>\n",
       "      <td>7.0</td>\n",
       "      <td>Tonydorrf</td>\n",
       "      <td>195785.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>171368</th>\n",
       "      <td>249824.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>Tonydorrf</td>\n",
       "      <td>195785.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>184232</th>\n",
       "      <td>301085.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>Tonydorrf</td>\n",
       "      <td>195785.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18801954</th>\n",
       "      <td>252314.0</td>\n",
       "      <td>7.0</td>\n",
       "      <td>Tonydorrf</td>\n",
       "      <td>195785.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18826671</th>\n",
       "      <td>176247.0</td>\n",
       "      <td>8.0</td>\n",
       "      <td>Tonydorrf</td>\n",
       "      <td>195785.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18901732</th>\n",
       "      <td>259857.0</td>\n",
       "      <td>7.0</td>\n",
       "      <td>Tonydorrf</td>\n",
       "      <td>195785.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18905081</th>\n",
       "      <td>246530.0</td>\n",
       "      <td>7.0</td>\n",
       "      <td>Tonydorrf</td>\n",
       "      <td>195785.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18911669</th>\n",
       "      <td>89222.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>Tonydorrf</td>\n",
       "      <td>195785.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>253 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "             BGGId  Rating   Username  Username_Encoded\n",
       "0         213788.0     8.0  Tonydorrf          195785.0\n",
       "103768    206593.0     8.0  Tonydorrf          195785.0\n",
       "147923    267333.0     7.0  Tonydorrf          195785.0\n",
       "171368    249824.0     6.0  Tonydorrf          195785.0\n",
       "184232    301085.0     6.0  Tonydorrf          195785.0\n",
       "...            ...     ...        ...               ...\n",
       "18801954  252314.0     7.0  Tonydorrf          195785.0\n",
       "18826671  176247.0     8.0  Tonydorrf          195785.0\n",
       "18901732  259857.0     7.0  Tonydorrf          195785.0\n",
       "18905081  246530.0     7.0  Tonydorrf          195785.0\n",
       "18911669   89222.0     2.0  Tonydorrf          195785.0\n",
       "\n",
       "[253 rows x 4 columns]"
      ]
     },
     "execution_count": 125,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Depcting that 'Tonydorrf' has a specific encoded value with multiple Board Game Reviews\n",
    "df.where(df['Username'] == 'Tonydorrf').dropna()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 126,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "BGGId                int32\n",
       "Rating               int16\n",
       "Username            object\n",
       "Username_Encoded     int32\n",
       "dtype: object"
      ]
     },
     "execution_count": 126,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['Username_Encoded'] = df['Username_Encoded'].astype(np.int32)\n",
    "df['Rating'] = df['Rating'].astype(np.int16)\n",
    "df['BGGId'] = df['BGGId'].astype(np.int32)\n",
    "df.dtypes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 127,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>BGGId</th>\n",
       "      <th>Rating</th>\n",
       "      <th>Username</th>\n",
       "      <th>Username_Encoded</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>213788</td>\n",
       "      <td>8</td>\n",
       "      <td>Tonydorrf</td>\n",
       "      <td>195785</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>213788</td>\n",
       "      <td>8</td>\n",
       "      <td>tachyon14k</td>\n",
       "      <td>385050</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>213788</td>\n",
       "      <td>8</td>\n",
       "      <td>Ungotter</td>\n",
       "      <td>200126</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>213788</td>\n",
       "      <td>8</td>\n",
       "      <td>brainlocki3</td>\n",
       "      <td>236689</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>213788</td>\n",
       "      <td>8</td>\n",
       "      <td>PPMP</td>\n",
       "      <td>144112</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18942210</th>\n",
       "      <td>165521</td>\n",
       "      <td>3</td>\n",
       "      <td>rseater</td>\n",
       "      <td>365759</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18942211</th>\n",
       "      <td>165521</td>\n",
       "      <td>3</td>\n",
       "      <td>Bluefox86</td>\n",
       "      <td>22977</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18942212</th>\n",
       "      <td>165521</td>\n",
       "      <td>3</td>\n",
       "      <td>serginator</td>\n",
       "      <td>371648</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18942213</th>\n",
       "      <td>193488</td>\n",
       "      <td>1</td>\n",
       "      <td>CaptainCattan</td>\n",
       "      <td>30181</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18942214</th>\n",
       "      <td>193488</td>\n",
       "      <td>1</td>\n",
       "      <td>trodat123</td>\n",
       "      <td>394601</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>18942215 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "           BGGId  Rating       Username  Username_Encoded\n",
       "0         213788       8      Tonydorrf            195785\n",
       "1         213788       8     tachyon14k            385050\n",
       "2         213788       8       Ungotter            200126\n",
       "3         213788       8    brainlocki3            236689\n",
       "4         213788       8           PPMP            144112\n",
       "...          ...     ...            ...               ...\n",
       "18942210  165521       3        rseater            365759\n",
       "18942211  165521       3      Bluefox86             22977\n",
       "18942212  165521       3     serginator            371648\n",
       "18942213  193488       1  CaptainCattan             30181\n",
       "18942214  193488       1      trodat123            394601\n",
       "\n",
       "[18942215 rows x 4 columns]"
      ]
     },
     "execution_count": 127,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 128,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/var/folders/tw/7t5t3x_11sqflkfn0yxds1lr0000gq/T/ipykernel_4739/3299505638.py:2: DeprecationWarning: DataFrameGroupBy.apply operated on the grouping columns. This behavior is deprecated, and in a future version of pandas the grouping columns will be excluded from the operation. Either pass `include_groups=False` to exclude the groupings or explicitly select the grouping columns after groupby to silence this warning.\n",
      "  df_sampled = df.groupby('BGGId').apply(lambda x: x.sample(frac=0.001, random_state=42)).reset_index(drop=True)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>BGGId</th>\n",
       "      <th>Rating</th>\n",
       "      <th>Username</th>\n",
       "      <th>Username_Encoded</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>thedirtyhamm</td>\n",
       "      <td>388576</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>7</td>\n",
       "      <td>RocketSkunk</td>\n",
       "      <td>161894</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1</td>\n",
       "      <td>6</td>\n",
       "      <td>Craigthulu</td>\n",
       "      <td>38438</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>Lassonius</td>\n",
       "      <td>108428</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1</td>\n",
       "      <td>7</td>\n",
       "      <td>rainian44</td>\n",
       "      <td>358660</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17115</th>\n",
       "      <td>338628</td>\n",
       "      <td>7</td>\n",
       "      <td>magnitt</td>\n",
       "      <td>323191</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17116</th>\n",
       "      <td>340466</td>\n",
       "      <td>7</td>\n",
       "      <td>Bayushi Sezaru</td>\n",
       "      <td>18065</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17117</th>\n",
       "      <td>342942</td>\n",
       "      <td>9</td>\n",
       "      <td>DoctorPhil</td>\n",
       "      <td>50091</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17118</th>\n",
       "      <td>343905</td>\n",
       "      <td>8</td>\n",
       "      <td>LanceCorporal</td>\n",
       "      <td>107914</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17119</th>\n",
       "      <td>346703</td>\n",
       "      <td>8</td>\n",
       "      <td>VG182</td>\n",
       "      <td>200834</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>17120 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        BGGId  Rating        Username  Username_Encoded\n",
       "0           1       9    thedirtyhamm            388576\n",
       "1           1       7     RocketSkunk            161894\n",
       "2           1       6      Craigthulu             38438\n",
       "3           1       9       Lassonius            108428\n",
       "4           1       7       rainian44            358660\n",
       "...       ...     ...             ...               ...\n",
       "17115  338628       7         magnitt            323191\n",
       "17116  340466       7  Bayushi Sezaru             18065\n",
       "17117  342942       9      DoctorPhil             50091\n",
       "17118  343905       8   LanceCorporal            107914\n",
       "17119  346703       8           VG182            200834\n",
       "\n",
       "[17120 rows x 4 columns]"
      ]
     },
     "execution_count": 128,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Randomly select .1% of the data, in stretches of consecutive BGGId values\n",
    "df_sampled = df.groupby('BGGId').apply(lambda x: x.sample(frac=0.001, random_state=42)).reset_index(drop=True)\n",
    "\n",
    "#df_sampled = df.sample(frac=0.01, random_state=42)\n",
    "df_sampled"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 129,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Save the sampled data to a new CSV file\n",
    "df_sampled.to_csv(\"user_ratings_sampled.csv\", index=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Create a recommendation System that:\n",
    "- Recommend *New* BoardGameIDs to a User\n",
    "    - Inputs a user\n",
    "    - Outpus BoardGame Recommendations\n",
    "- Allows a user to see which BoardGames are similar to another BoardGame\n",
    "    - Inputs a BoardGame\n",
    "    - Ouputs a Recommended BoardGame"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 130,
   "metadata": {},
   "outputs": [],
   "source": [
    "sampled_df = pd.read_csv(\"user_ratings_sampled.csv\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Quickly inspect the data (EDA)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Using the BGGId and Username_Encoded Features; Create the Sparse (Mostly NaN) User-Item Matrix via pivot table"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Perform SVD, then recostruct the User-Item Matrix"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## User - User Colaborative Filtering"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 131,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Compute cosine similarity between users\n",
    "\n",
    "\n",
    "# Convert back to a DataFrame for ease of use\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 132,
   "metadata": {},
   "outputs": [],
   "source": [
    "# View your user similarity matrix as a DataFrame"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 133,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Save the user similarity matrix to csv\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Item - Item Colaborative Filtering"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 134,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Compute cosine similarity between items\n",
    "\n",
    "\n",
    "# Convert to a DataFrame for ease of use\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 135,
   "metadata": {},
   "outputs": [],
   "source": [
    "# View your user similarity matrix as a DataFrame"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 136,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Save the user similarity matrix to csv"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
