{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Module 4. Custom Metric 으로 성능 데이터 및 Cold Start 성능 체크 하기\n",
    "이번 모듈에서는 모듈2에서 테스트 용으로 분리했던 데이터를 가지고 Custom 지표를 통해 추가적인 성능을 평가해 보도록 합니다. \n",
    "또한 Coldstart 성능도 추가적으로 확인해 보도록 합니다."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Requirement already satisfied: tqdm in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (4.42.1)\n",
      "\u001b[33mWARNING: You are using pip version 20.0.2; however, version 20.3.2 is available.\n",
      "You should consider upgrading via the '/home/ec2-user/anaconda3/envs/python3/bin/python -m pip install --upgrade pip' command.\u001b[0m\n"
     ]
    }
   ],
   "source": [
    "import pandas as pd, numpy as np\n",
    "import io\n",
    "import scipy.sparse as ss\n",
    "import json\n",
    "import time\n",
    "import os\n",
    "import boto3\n",
    "import uuid\n",
    "from botocore.exceptions import ClientError\n",
    "from metrics import mean_reciprocal_rank, ndcg_at_k, precision_at_k\n",
    "!pip install tqdm\n",
    "from tqdm import tqdm_notebook\n",
    "from datetime import datetime\n",
    "from random import randint"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "%store -r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Configure the SDK to Personalize:\n",
    "personalize = boto3.client('personalize')\n",
    "personalize_runtime = boto3.client('personalize-runtime')\n",
    "personalize_events = boto3.client('personalize-events')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_all=pd.read_csv(interaction_all_file)\n",
    "df_train=pd.read_csv(interaction_train_file)\n",
    "df_test=pd.read_csv(interaction_test_file)\n",
    "\n",
    "item_all=pd.read_csv(item_file)\n",
    "item_cold=pd.read_csv(item_cold_file)\n",
    "item_warm=pd.read_csv(item_warm_file)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "unique_user_from_all dataset: 6023\n",
      "unique_user_from_train dataset: 4641\n",
      "unique_user_from_test dataset: 1983\n",
      "Existing users in test dataset: 601\n",
      "New users in test dataset: 1382\n",
      "User with cold item interactions in test dataset: 57\n",
      "Exisiting User with cold item interaction in test dataset: 12\n"
     ]
    }
   ],
   "source": [
    "#Unique users\n",
    "unique_users=df_all['USER_ID'].unique()\n",
    "print(\"unique_user_from_all dataset:\", len(unique_users))\n",
    "\n",
    "unique_user_from_train=df_train['USER_ID'].unique()\n",
    "print(\"unique_user_from_train dataset:\", len(unique_user_from_train))\n",
    "\n",
    "unique_user_from_test=df_test['USER_ID'].unique()\n",
    "print(\"unique_user_from_test dataset:\", len(unique_user_from_test))\n",
    "\n",
    "old_user_from_test=df_test['USER_ID'][df_test['USER_ID'].isin(unique_user_from_train)].unique()\n",
    "print(\"Existing users in test dataset:\",len(old_user_from_test))\n",
    "\n",
    "new_user_from_test=df_test['USER_ID'][-df_test['USER_ID'].isin(unique_user_from_train)].unique()\n",
    "print(\"New users in test dataset:\",len(new_user_from_test))\n",
    "\n",
    "cold_item_interaction=df_test[df_test['ITEM_ID'].isin(item_cold['ITEM_ID'].unique())]\n",
    "cold_interaction_user=cold_item_interaction['USER_ID'].unique()\n",
    "print(\"User with cold item interactions in test dataset:\",len(cold_interaction_user))\n",
    "\n",
    "old_user_from_test_with_cold=cold_item_interaction['USER_ID'][cold_item_interaction['USER_ID'].isin(old_user_from_test)].unique()\n",
    "print(\"Exisiting User with cold item interaction in test dataset:\", len(old_user_from_test_with_cold))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "#### 조금더 상세하고 Custum 평가 지표를 얻기 위해서 이전에 분리해둔 테스트 데이터를 가지고 캠페인 생성 후 별도 테스트를 진행하도록 합니다."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ipykernel/__main__.py:3: TqdmDeprecationWarning: This function will be removed in tqdm==5.0.0\n",
      "Please use `tqdm.notebook.tqdm` instead of `tqdm.tqdm_notebook`\n",
      "  app.launch_new_instance()\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "7a1bc8915c4f4c059519d09bc553b650",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "HBox(children=(FloatProgress(value=0.0, max=1983.0), HTML(value='')))"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    }
   ],
   "source": [
    "# 테스트 인터렉션 셋에 있는 모든 사용자를 대상으로 선능을 확인해 봅니다.\n",
    "relevance = []\n",
    "counts=[]\n",
    "for user_id in tqdm_notebook(unique_user_from_test):\n",
    "    true_items = set(df_test[df_test['USER_ID']==user_id]['ITEM_ID'].values)\n",
    "    #print(true_items)\n",
    "  \n",
    "    rec_response = personalize_runtime.get_recommendations(\n",
    "            campaignArn =user_personalization_campaign_arn ,\n",
    "            userId = str(user_id)\n",
    "        )\n",
    "    rec_items = [int(x['itemId']) for x in rec_response['itemList']] \n",
    "    relevance.append([int(x in true_items) for x in rec_items])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "mean_reciprocal_rank 0.3944173097544351\n",
      "precision_at_5 0.21321230458900658\n",
      "precision_at_10 0.20342914775592538\n",
      "precision_at_25 0.22642460917801316\n",
      "normalized_discounted_cumulative_gain_at_5 0.2598970789183912\n",
      "normalized_discounted_cumulative_gain_at_10 0.2904870526842617\n",
      "normalized_discounted_cumulative_gain_at_25 0.4707628802541746\n"
     ]
    }
   ],
   "source": [
    "print('mean_reciprocal_rank', np.mean([mean_reciprocal_rank(r) for r in relevance]))\n",
    "print('precision_at_5', np.mean([precision_at_k(r, 5) for r in relevance]))\n",
    "print('precision_at_10', np.mean([precision_at_k(r, 10) for r in relevance]))\n",
    "print('precision_at_25', np.mean([precision_at_k(r, 25) for r in relevance]))\n",
    "print('normalized_discounted_cumulative_gain_at_5', np.mean([ndcg_at_k(r, 5) for r in relevance]))\n",
    "print('normalized_discounted_cumulative_gain_at_10', np.mean([ndcg_at_k(r, 10) for r in relevance]))\n",
    "print('normalized_discounted_cumulative_gain_at_25', np.mean([ndcg_at_k(r, 25) for r in relevance]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "mean_reciprocal_rank 0.2426\n",
      "precision_at_5 0.0993\n",
      "precision_at_10 0.0916\n",
      "precision_at_25 0.0767\n",
      "normalized_discounted_cumulative_gain_at_5 0.1682\n",
      "normalized_discounted_cumulative_gain_at_10 0.2283\n",
      "normalized_discounted_cumulative_gain_at_25 0.3348\n"
     ]
    }
   ],
   "source": [
    "# 퍼스널라이즈에서 제공하는 메트릭과 비슷한지 비교해 봅니다.\n",
    "\n",
    "get_solution_metrics_response = personalize.get_solution_metrics(\n",
    "    solutionVersionArn = user_personalization_solution_version_arn\n",
    ")\n",
    "\n",
    "#print(json.dumps(get_solution_metrics_response, indent=2))\n",
    "\n",
    "print('mean_reciprocal_rank',get_solution_metrics_response[\"metrics\"][\"mean_reciprocal_rank_at_25\"], )\n",
    "print('precision_at_5', get_solution_metrics_response[\"metrics\"][\"precision_at_5\"])\n",
    "print('precision_at_10', get_solution_metrics_response[\"metrics\"][\"precision_at_10\"])\n",
    "print('precision_at_25', get_solution_metrics_response[\"metrics\"][\"precision_at_25\"])\n",
    "print('normalized_discounted_cumulative_gain_at_5', get_solution_metrics_response[\"metrics\"][\"normalized_discounted_cumulative_gain_at_5\"])\n",
    "print('normalized_discounted_cumulative_gain_at_10', get_solution_metrics_response[\"metrics\"][\"normalized_discounted_cumulative_gain_at_10\"])\n",
    "print('normalized_discounted_cumulative_gain_at_25', get_solution_metrics_response[\"metrics\"][\"normalized_discounted_cumulative_gain_at_25\"])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 이벤트 트랙커 생성 \n",
    "\n",
    "아래 코드 셀은 특정 item과 상호 작용하는 사용자를 시뮬레이트하는 코드 입니다. 이벤트 트레커를 통해 실시간 스트림을 보내도록 하여 고객의 클릭정보에 따라 추천 항목이 변하는 것을 확인할 수 있습니다. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "arn:aws:personalize:ap-northeast-2:870180618679:dataset-group/20201215-dataset-group\n",
      "user-personalization-event-tracker-20201215\n"
     ]
    }
   ],
   "source": [
    "event_tracker_name=\"user-personalization-event-tracker-\"+WORK_DATE\n",
    "print(dataset_group_arn)\n",
    "print(event_tracker_name)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "eventTrackerArn:arn:aws:personalize:ap-northeast-2:870180618679:event-tracker/81e1bae6,\n",
      " eventTrackingId:401c2330-c611-4fb6-bfdf-2858747ca001\n"
     ]
    }
   ],
   "source": [
    "event_tracker_response = personalize.create_event_tracker( \n",
    "    name=event_tracker_name,\n",
    "    datasetGroupArn=dataset_group_arn\n",
    ")\n",
    "event_tracker_arn  = event_tracker_response['eventTrackerArn']\n",
    "event_tracking_id = event_tracker_response['trackingId']\n",
    "\n",
    "print('eventTrackerArn:{},\\n eventTrackingId:{}'.format(event_tracker_arn, event_tracking_id))\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 사용자 행동 시뮬레이션\n",
    "\n",
    "아래 코드 셀은 특정 item과 상호 작용하는 사용자를 시뮬레이트하는 코드 샘플을 제공하며, 시작할 때와 다른 추천 목록을 얻습니다."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_movie_title(movie_id):\n",
    "    \"\"\"\n",
    "    Takes in an ID, returns a title\n",
    "    \"\"\"\n",
    "    movie_id = int(movie_id)\n",
    "    movie_title=item_all[item_all['ITEM_ID']==movie_id]['TITLE']\n",
    "    return (movie_title.tolist())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "session_dict = {}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "def send_movie_click(USER_ID, ITEM_ID):\n",
    "    \"\"\"\n",
    "    Simulates a click as an envent\n",
    "    to send an event to Amazon Personalize's Event Tracker\n",
    "    \"\"\"\n",
    "    # Configure Session\n",
    "    try:\n",
    "        session_ID = session_dict[USER_ID]\n",
    "    except:\n",
    "        session_dict[USER_ID] = str(uuid.uuid1())\n",
    "        session_ID = session_dict[USER_ID]\n",
    "   \n",
    "    value=randint(0,5)\n",
    "    \n",
    "    # Configure Properties:\n",
    "    event = {\n",
    "    \"itemId\": str(ITEM_ID),\n",
    "    \"eventValue\": value\n",
    "    }\n",
    "    event_json = json.dumps(event)\n",
    "    \n",
    "    # Make Call\n",
    "    personalize_events.put_events(\n",
    "    trackingId = event_tracking_id, # 이벤트트래커에서 생성한 아이디\n",
    "    userId= USER_ID,\n",
    "    sessionId = session_ID,\n",
    "    eventList = [{\n",
    "        'sentAt': int(time.time()),\n",
    "        'eventType': 'RATING',\n",
    "        'properties': event_json\n",
    "        }]\n",
    ")\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "
\n",
       "\n",
       "
\n",
       "  \n",
       "    \n",
       "      | \n",
       " | OriginalRecs\n",
       " | 
\n",
       "  \n",
       "  \n",
       "    \n",
       "      | 0\n",
       " | Braveheart (1995)\n",
       " | 
\n",
       "    \n",
       "      | 1\n",
       " | Star Wars: Episode VI - Return of the Jedi (1983)\n",
       " | 
\n",
       "    \n",
       "      | 2\n",
       " | Forrest Gump (1994)\n",
       " | 
\n",
       "    \n",
       "      | 3\n",
       " | One Flew Over the Cuckoo's Nest (1975)\n",
       " | 
\n",
       "    \n",
       "      | 4\n",
       " | Star Wars: Episode V - The Empire Strikes Back...\n",
       " | 
\n",
       "    \n",
       "      | 5\n",
       " | Star Wars: Episode I - The Phantom Menace (1999)\n",
       " | 
\n",
       "    \n",
       "      | 6\n",
       " | Star Wars: Episode IV - A New Hope (1977)\n",
       " | 
\n",
       "    \n",
       "      | 7\n",
       " | Schindler's List (1993)\n",
       " | 
\n",
       "    \n",
       "      | 8\n",
       " | Titanic (1997)\n",
       " | 
\n",
       "    \n",
       "      | 9\n",
       " | Silence of the Lambs, The (1991)\n",
       " | 
\n",
       "    \n",
       "      | 10\n",
       " | Godfather, The (1972)\n",
       " | 
\n",
       "    \n",
       "      | 11\n",
       " | Rain Man (1988)\n",
       " | 
\n",
       "    \n",
       "      | 12\n",
       " | Saving Private Ryan (1998)\n",
       " | 
\n",
       "    \n",
       "      | 13\n",
       " | Raiders of the Lost Ark (1981)\n",
       " | 
\n",
       "    \n",
       "      | 14\n",
       " | Jurassic Park (1993)\n",
       " | 
\n",
       "    \n",
       "      | 15\n",
       " | Godfather: Part III, The (1990)\n",
       " | 
\n",
       "    \n",
       "      | 16\n",
       " | Rocky II (1979)\n",
       " | 
\n",
       "    \n",
       "      | 17\n",
       " | L.A. Confidential (1997)\n",
       " | 
\n",
       "    \n",
       "      | 18\n",
       " | Casablanca (1942)\n",
       " | 
\n",
       "    \n",
       "      | 19\n",
       " | Princess Bride, The (1987)\n",
       " | 
\n",
       "    \n",
       "      | 20\n",
       " | Robin Hood: Prince of Thieves (1991)\n",
       " | 
\n",
       "    \n",
       "      | 21\n",
       " | Gone with the Wind (1939)\n",
       " | 
\n",
       "    \n",
       "      | 22\n",
       " | Back to the Future (1985)\n",
       " | 
\n",
       "    \n",
       "      | 23\n",
       " | Lethal Weapon 4 (1998)\n",
       " | 
\n",
       "    \n",
       "      | 24\n",
       " | Last Action Hero (1993)\n",
       " | 
\n",
       "  \n",
       "
\n",
       "
\n",
       "\n",
       "
\n",
       "  \n",
       "    \n",
       "      | \n",
       " | OriginalRecs\n",
       " | (Toy Story (1995),)\n",
       " | 
\n",
       "  \n",
       "  \n",
       "    \n",
       "      | 0\n",
       " | Braveheart (1995)\n",
       " | Braveheart (1995)\n",
       " | 
\n",
       "    \n",
       "      | 1\n",
       " | Star Wars: Episode VI - Return of the Jedi (1983)\n",
       " | Star Wars: Episode VI - Return of the Jedi (1983)\n",
       " | 
\n",
       "    \n",
       "      | 2\n",
       " | Forrest Gump (1994)\n",
       " | Forrest Gump (1994)\n",
       " | 
\n",
       "    \n",
       "      | 3\n",
       " | One Flew Over the Cuckoo's Nest (1975)\n",
       " | One Flew Over the Cuckoo's Nest (1975)\n",
       " | 
\n",
       "    \n",
       "      | 4\n",
       " | Star Wars: Episode V - The Empire Strikes Back...\n",
       " | Star Wars: Episode V - The Empire Strikes Back...\n",
       " | 
\n",
       "    \n",
       "      | 5\n",
       " | Star Wars: Episode I - The Phantom Menace (1999)\n",
       " | Star Wars: Episode I - The Phantom Menace (1999)\n",
       " | 
\n",
       "    \n",
       "      | 6\n",
       " | Star Wars: Episode IV - A New Hope (1977)\n",
       " | Star Wars: Episode IV - A New Hope (1977)\n",
       " | 
\n",
       "    \n",
       "      | 7\n",
       " | Schindler's List (1993)\n",
       " | Schindler's List (1993)\n",
       " | 
\n",
       "    \n",
       "      | 8\n",
       " | Titanic (1997)\n",
       " | Titanic (1997)\n",
       " | 
\n",
       "    \n",
       "      | 9\n",
       " | Silence of the Lambs, The (1991)\n",
       " | Silence of the Lambs, The (1991)\n",
       " | 
\n",
       "    \n",
       "      | 10\n",
       " | Godfather, The (1972)\n",
       " | Godfather, The (1972)\n",
       " | 
\n",
       "    \n",
       "      | 11\n",
       " | Rain Man (1988)\n",
       " | Rain Man (1988)\n",
       " | 
\n",
       "    \n",
       "      | 12\n",
       " | Saving Private Ryan (1998)\n",
       " | Saving Private Ryan (1998)\n",
       " | 
\n",
       "    \n",
       "      | 13\n",
       " | Raiders of the Lost Ark (1981)\n",
       " | Raiders of the Lost Ark (1981)\n",
       " | 
\n",
       "    \n",
       "      | 14\n",
       " | Jurassic Park (1993)\n",
       " | Jurassic Park (1993)\n",
       " | 
\n",
       "    \n",
       "      | 15\n",
       " | Godfather: Part III, The (1990)\n",
       " | Godfather: Part III, The (1990)\n",
       " | 
\n",
       "    \n",
       "      | 16\n",
       " | Rocky II (1979)\n",
       " | Rocky II (1979)\n",
       " | 
\n",
       "    \n",
       "      | 17\n",
       " | L.A. Confidential (1997)\n",
       " | L.A. Confidential (1997)\n",
       " | 
\n",
       "    \n",
       "      | 18\n",
       " | Casablanca (1942)\n",
       " | Casablanca (1942)\n",
       " | 
\n",
       "    \n",
       "      | 19\n",
       " | Princess Bride, The (1987)\n",
       " | Princess Bride, The (1987)\n",
       " | 
\n",
       "    \n",
       "      | 20\n",
       " | Robin Hood: Prince of Thieves (1991)\n",
       " | Robin Hood: Prince of Thieves (1991)\n",
       " | 
\n",
       "    \n",
       "      | 21\n",
       " | Gone with the Wind (1939)\n",
       " | Gone with the Wind (1939)\n",
       " | 
\n",
       "    \n",
       "      | 22\n",
       " | Back to the Future (1985)\n",
       " | Back to the Future (1985)\n",
       " | 
\n",
       "    \n",
       "      | 23\n",
       " | Lethal Weapon 4 (1998)\n",
       " | Lethal Weapon 4 (1998)\n",
       " | 
\n",
       "    \n",
       "      | 24\n",
       " | Last Action Hero (1993)\n",
       " | Last Action Hero (1993)\n",
       " | 
\n",
       "  \n",
       "
\n",
       "
\n",
       "\n",
       "
\n",
       "  \n",
       "    \n",
       "      | \n",
       " | ITEM_ID\n",
       " | TITLE\n",
       " | GENRE\n",
       " | 
\n",
       "  \n",
       "  \n",
       "    \n",
       "      | 0\n",
       " | 136\n",
       " | From the Journals of Jean Seberg (1995)\n",
       " | Documentary\n",
       " | 
\n",
       "    \n",
       "      | 1\n",
       " | 138\n",
       " | Neon Bible, The (1995)\n",
       " | Drama\n",
       " | 
\n",
       "    \n",
       "      | 2\n",
       " | 192\n",
       " | Show, The (1995)\n",
       " | Documentary\n",
       " | 
\n",
       "    \n",
       "      | 3\n",
       " | 402\n",
       " | Open Season (1996)\n",
       " | Comedy\n",
       " | 
\n",
       "    \n",
       "      | 4\n",
       " | 576\n",
       " | Fausto (1993)\n",
       " | Comedy\n",
       " | 
\n",
       "    \n",
       "      | ...\n",
       " | ...\n",
       " | ...\n",
       " | ...\n",
       " | 
\n",
       "    \n",
       "      | 56\n",
       " | 3542\n",
       " | Coming Apart (1969)\n",
       " | Drama\n",
       " | 
\n",
       "    \n",
       "      | 57\n",
       " | 3647\n",
       " | Running Free (2000)\n",
       " | Drama\n",
       " | 
\n",
       "    \n",
       "      | 58\n",
       " | 3772\n",
       " | Hatchet For the Honeymoon (Rosso Segno Della F...\n",
       " | Horror\n",
       " | 
\n",
       "    \n",
       "      | 59\n",
       " | 3800\n",
       " | Criminal Lovers (Les Amants Criminels) (1999)\n",
       " | Drama|Romance\n",
       " | 
\n",
       "    \n",
       "      | 60\n",
       " | 3892\n",
       " | Anatomy (Anatomie) (2000)\n",
       " | Horror\n",
       " | 
\n",
       "  \n",
       "
\n",
       "
61 rows × 3 columns
\n",
       "
\n",
       "\n",
       "
\n",
       "  \n",
       "    \n",
       "      | \n",
       " | recipe\n",
       " | mrr\n",
       " | p@5\n",
       " | p@10\n",
       " | p@25\n",
       " | ndcg@5\n",
       " | ndcg@10\n",
       " | ndcg@25\n",
       " | cold_item_count\n",
       " | 
\n",
       "  \n",
       "  \n",
       "    \n",
       "      | 0\n",
       " | user-personalization-coldstart-meta-update-100%\n",
       " | 0.093627\n",
       " | 0.038602\n",
       " | 0.038602\n",
       " | 0.038602\n",
       " | 0.057205\n",
       " | 0.078424\n",
       " | 0.154592\n",
       " | 10.840266\n",
       " | 
\n",
       "    \n",
       "      | 1\n",
       " | random\n",
       " | 0.001343\n",
       " | 0.000333\n",
       " | 0.000333\n",
       " | 0.000333\n",
       " | 0.001050\n",
       " | 0.001693\n",
       " | 0.003824\n",
       " | 25.000000\n",
       " | 
\n",
       "    \n",
       "      | 2\n",
       " | user-personalization-coldstart-30%\n",
       " | 0.090295\n",
       " | 0.037604\n",
       " | 0.036273\n",
       " | 0.036273\n",
       " | 0.054435\n",
       " | 0.073911\n",
       " | 0.150536\n",
       " | 11.118136\n",
       " | 
\n",
       "    \n",
       "      | 3\n",
       " | user-personalization-coldstart-0%\n",
       " | 0.182314\n",
       " | 0.084526\n",
       " | 0.080699\n",
       " | 0.080699\n",
       " | 0.124571\n",
       " | 0.159256\n",
       " | 0.251051\n",
       " | 0.000000\n",
       " | 
\n",
       "  \n",
       "
\n",
       "