Skip to content

Commit

Permalink
Merge pull request #5 from panyapoc/panyapoc
Browse files Browse the repository at this point in the history
Stable
  • Loading branch information
panyapoc authored Feb 27, 2020
2 parents e5bfa02 + 861eefe commit 2c7ae9a
Show file tree
Hide file tree
Showing 11 changed files with 581 additions and 1,369 deletions.
1,063 changes: 151 additions & 912 deletions Personalize/1.Building_Campaign_HRNN.ipynb

Large diffs are not rendered by default.

188 changes: 31 additions & 157 deletions Personalize/2.Building_Campaign_SIMS.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,7 @@
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"no stored variable bucket\n"
]
}
],
"outputs": [],
"source": [
"%store -r dataset_group_arn\n",
"%store -r GetRecommendationsByItem_arn\n",
Expand Down Expand Up @@ -122,14 +114,14 @@
"output_type": "stream",
"text": [
"{\n",
" \"solutionArn\": \"arn:aws:personalize:us-east-1:962222257213:solution/personalize-demo-soln-sims\",\n",
" \"solutionArn\": \"arn:aws:personalize:us-east-1:011777388888:solution/personalize-demo-soln-sims\",\n",
" \"ResponseMetadata\": {\n",
" \"RequestId\": \"60b5ef84-1ed6-4fba-a796-e4ed59075573\",\n",
" \"RequestId\": \"a322468c-6291-4719-bd7d-7eb8d3e1cf9d\",\n",
" \"HTTPStatusCode\": 200,\n",
" \"HTTPHeaders\": {\n",
" \"content-type\": \"application/x-amz-json-1.1\",\n",
" \"date\": \"Tue, 25 Feb 2020 05:09:36 GMT\",\n",
" \"x-amzn-requestid\": \"60b5ef84-1ed6-4fba-a796-e4ed59075573\",\n",
" \"date\": \"Thu, 27 Feb 2020 05:37:17 GMT\",\n",
" \"x-amzn-requestid\": \"a322468c-6291-4719-bd7d-7eb8d3e1cf9d\",\n",
" \"content-length\": \"96\",\n",
" \"connection\": \"keep-alive\"\n",
" },\n",
Expand Down Expand Up @@ -167,14 +159,14 @@
"output_type": "stream",
"text": [
"{\n",
" \"solutionVersionArn\": \"arn:aws:personalize:us-east-1:962222257213:solution/personalize-demo-soln-sims/82ab4692\",\n",
" \"solutionVersionArn\": \"arn:aws:personalize:us-east-1:011777388888:solution/personalize-demo-soln-sims/534691a8\",\n",
" \"ResponseMetadata\": {\n",
" \"RequestId\": \"6539d4eb-cba7-4b55-986d-2f981331a91b\",\n",
" \"RequestId\": \"2f9fdbfc-b5e8-4b48-adc8-4f097d49c76c\",\n",
" \"HTTPStatusCode\": 200,\n",
" \"HTTPHeaders\": {\n",
" \"content-type\": \"application/x-amz-json-1.1\",\n",
" \"date\": \"Tue, 25 Feb 2020 05:09:36 GMT\",\n",
" \"x-amzn-requestid\": \"6539d4eb-cba7-4b55-986d-2f981331a91b\",\n",
" \"date\": \"Thu, 27 Feb 2020 05:37:17 GMT\",\n",
" \"x-amzn-requestid\": \"2f9fdbfc-b5e8-4b48-adc8-4f097d49c76c\",\n",
" \"content-length\": \"112\",\n",
" \"connection\": \"keep-alive\"\n",
" },\n",
Expand Down Expand Up @@ -250,6 +242,10 @@
"SolutionVersion: CREATE IN_PROGRESS\n",
"SolutionVersion: CREATE IN_PROGRESS\n",
"SolutionVersion: CREATE IN_PROGRESS\n",
"SolutionVersion: CREATE IN_PROGRESS\n",
"SolutionVersion: CREATE IN_PROGRESS\n",
"SolutionVersion: CREATE IN_PROGRESS\n",
"SolutionVersion: CREATE IN_PROGRESS\n",
"SolutionVersion: ACTIVE\n"
]
}
Expand Down Expand Up @@ -288,7 +284,7 @@
"output_type": "stream",
"text": [
"{\n",
" \"solutionVersionArn\": \"arn:aws:personalize:us-east-1:962222257213:solution/personalize-demo-soln-sims/82ab4692\",\n",
" \"solutionVersionArn\": \"arn:aws:personalize:us-east-1:011777388888:solution/personalize-demo-soln-sims/534691a8\",\n",
" \"metrics\": {\n",
" \"coverage\": 0.0832,\n",
" \"mean_reciprocal_rank_at_25\": 0.0195,\n",
Expand All @@ -300,12 +296,12 @@
" \"precision_at_5\": 0.0051\n",
" },\n",
" \"ResponseMetadata\": {\n",
" \"RequestId\": \"05af6ded-2de7-4498-b96d-dee9f7da4641\",\n",
" \"RequestId\": \"72b119ee-cb3b-4daf-b7c5-4a9c8b0bc7fe\",\n",
" \"HTTPStatusCode\": 200,\n",
" \"HTTPHeaders\": {\n",
" \"content-type\": \"application/x-amz-json-1.1\",\n",
" \"date\": \"Tue, 25 Feb 2020 05:48:39 GMT\",\n",
" \"x-amzn-requestid\": \"05af6ded-2de7-4498-b96d-dee9f7da4641\",\n",
" \"date\": \"Thu, 27 Feb 2020 06:20:20 GMT\",\n",
" \"x-amzn-requestid\": \"72b119ee-cb3b-4daf-b7c5-4a9c8b0bc7fe\",\n",
" \"content-length\": \"409\",\n",
" \"connection\": \"keep-alive\"\n",
" },\n",
Expand Down Expand Up @@ -349,14 +345,14 @@
"output_type": "stream",
"text": [
"{\n",
" \"campaignArn\": \"arn:aws:personalize:us-east-1:962222257213:campaign/personalize-camp-sims\",\n",
" \"campaignArn\": \"arn:aws:personalize:us-east-1:011777388888:campaign/personalize-camp-sims\",\n",
" \"ResponseMetadata\": {\n",
" \"RequestId\": \"b2790589-b39c-4769-96e5-b9aecad328d2\",\n",
" \"RequestId\": \"ec30c5a2-dbd1-4ece-9dff-9b303988a2b2\",\n",
" \"HTTPStatusCode\": 200,\n",
" \"HTTPHeaders\": {\n",
" \"content-type\": \"application/x-amz-json-1.1\",\n",
" \"date\": \"Tue, 25 Feb 2020 05:48:39 GMT\",\n",
" \"x-amzn-requestid\": \"b2790589-b39c-4769-96e5-b9aecad328d2\",\n",
" \"date\": \"Thu, 27 Feb 2020 06:20:21 GMT\",\n",
" \"x-amzn-requestid\": \"ec30c5a2-dbd1-4ece-9dff-9b303988a2b2\",\n",
" \"content-length\": \"91\",\n",
" \"connection\": \"keep-alive\"\n",
" },\n",
Expand Down Expand Up @@ -401,8 +397,6 @@
"Campaign: CREATE IN_PROGRESS\n",
"Campaign: CREATE IN_PROGRESS\n",
"Campaign: CREATE IN_PROGRESS\n",
"Campaign: CREATE IN_PROGRESS\n",
"Campaign: CREATE IN_PROGRESS\n",
"Campaign: ACTIVE\n"
]
}
Expand Down Expand Up @@ -440,7 +434,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Item: B000A0REKO\n"
"Item: B004WA63C8\n"
]
}
],
Expand All @@ -452,7 +446,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -482,14 +476,14 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 13,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"SIMS for item_id: B000A0REKO\n"
"SIMS for item_id: B004WA63C8\n"
]
},
{
Expand Down Expand Up @@ -519,138 +513,18 @@
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>Butler Creek Lula Universal Pistol Magazine Lo...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>Howard Leight R-01526 Impact Sport Electronic ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>Rothco 550lb. Type III Nylon Paracord</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>Hoppe's BoreSnake Rifle Bore Cleaner (Choose Y...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>Magnesium Fire Starter</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>Emergency Mylar Thermal Blankets (Pack of 10)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>OFF SET TACTICAL Weapon Mount For Olight M20/M...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>Butler Creek LULA All-in-One Magazine Speed Lo...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>Morakniv Companion Fixed Blade Outdoor Knife w...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>Ultralight Backpacking Canister Camp Stove wit...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>UTG Tactical OP Bipod - Tactical/Sniper Profil...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>LifeStraw Personal Water Filter</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>GDT AR15 AR 15 Front and Rear 45 Degree Rapid ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>Bushnell Trophy TRS-25 Red Dot Sight Riflescop...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>UTG Bipod, SWAT/Combat Profile, Adjustable Height</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15</th>\n",
" <td>Potable Aqua Water Treatment Tablets</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>Rayovac Sportsman LED Lantern SE3DLN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17</th>\n",
" <td>Mirrycle MTB Bar End Mountain Bicycle Mirror</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18</th>\n",
" <td>Light My Fire Original Swedish FireSteel Army ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19</th>\n",
" <td>Survivor HK-106320 Outdoor Fixed Blade Knife 7...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>20</th>\n",
" <td>Hogue Handall Full Size Grip Sleeve</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21</th>\n",
" <td>Ultimate Arms Gear Tactical 4 Reticle Red Dot ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>22</th>\n",
" <td>Chainmate Cm-24ssp 24-inch Survival Pocket Cha...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>23</th>\n",
" <td>Magpul Gen 2 MBUS Rear Flip Sight, Black</td>\n",
" </tr>\n",
" <tr>\n",
" <th>24</th>\n",
" <td>Cold Steel 80PGTK GI Tanto 7&amp;quot; Carbon</td>\n",
" <td>Spec-Ops Brand T.H.E. Wallet J.R.</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Item Description\n",
"0 Butler Creek Lula Universal Pistol Magazine Lo...\n",
"1 Howard Leight R-01526 Impact Sport Electronic ...\n",
"2 Rothco 550lb. Type III Nylon Paracord\n",
"3 Hoppe's BoreSnake Rifle Bore Cleaner (Choose Y...\n",
"4 Magnesium Fire Starter\n",
"5 Emergency Mylar Thermal Blankets (Pack of 10)\n",
"6 OFF SET TACTICAL Weapon Mount For Olight M20/M...\n",
"7 Butler Creek LULA All-in-One Magazine Speed Lo...\n",
"8 Morakniv Companion Fixed Blade Outdoor Knife w...\n",
"9 Ultralight Backpacking Canister Camp Stove wit...\n",
"10 UTG Tactical OP Bipod - Tactical/Sniper Profil...\n",
"11 LifeStraw Personal Water Filter\n",
"12 GDT AR15 AR 15 Front and Rear 45 Degree Rapid ...\n",
"13 Bushnell Trophy TRS-25 Red Dot Sight Riflescop...\n",
"14 UTG Bipod, SWAT/Combat Profile, Adjustable Height\n",
"15 Potable Aqua Water Treatment Tablets\n",
"16 Rayovac Sportsman LED Lantern SE3DLN\n",
"17 Mirrycle MTB Bar End Mountain Bicycle Mirror\n",
"18 Light My Fire Original Swedish FireSteel Army ...\n",
"19 Survivor HK-106320 Outdoor Fixed Blade Knife 7...\n",
"20 Hogue Handall Full Size Grip Sleeve\n",
"21 Ultimate Arms Gear Tactical 4 Reticle Red Dot ...\n",
"22 Chainmate Cm-24ssp 24-inch Survival Pocket Cha...\n",
"23 Magpul Gen 2 MBUS Rear Flip Sight, Black\n",
"24 Cold Steel 80PGTK GI Tanto 7&quot; Carbon"
" Item Description\n",
"0 Spec-Ops Brand T.H.E. Wallet J.R."
]
},
"execution_count": 15,
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -689,14 +563,14 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 14,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'Variables': {'Campaign_ARN': 'arn:aws:personalize:us-east-1:387269085412:campaign/SIM-campaign', 'ddb_tablename': 'teststr-Items'}}\n"
"{'Variables': {'Campaign_ARN': 'arn:aws:personalize:us-east-1:387269085412:campaign/SIM-campaign', 'ddb_tablename': 'pstore-Items'}}\n"
]
}
],
Expand Down
Loading

0 comments on commit 2c7ae9a

Please sign in to comment.