Skip to content

Commit

Permalink
conclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
eugeniegg committed Dec 20, 2024
1 parent 4fff2a7 commit 488941b
Showing 1 changed file with 19 additions and 33 deletions.
52 changes: 19 additions & 33 deletions milestoneP3.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1005,31 +1005,15 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": null,
"id": "9be1c937",
"metadata": {
"ExecuteTime": {
"end_time": "2024-12-20T16:04:00.765577Z",
"start_time": "2024-12-20T15:48:28.872234Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 2048878/2048878 [01:09<00:00, 29625.17it/s]\n",
"/Users/eugeniecyrot/Documents/epfl/Master/MA3/ADA/ada-2024-project-databrewers/src/scripts/semantic_analysis.py:35: SettingWithCopyWarning:\n",
"\n",
"\n",
"A value is trying to be set on a copy of a slice from a DataFrame.\n",
"Try using .loc[row_indexer,col_indexer] = value instead\n",
"\n",
"See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
"\n"
]
}
],
"outputs": [],
"source": [
"clean_reviews = sem_ana.get_cleaned_reviews(reviews)"
]
Expand All @@ -1044,27 +1028,15 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": null,
"id": "83d8112202a396e8",
"metadata": {
"ExecuteTime": {
"end_time": "2024-12-20T13:13:10.659226Z",
"start_time": "2024-12-20T13:10:22.588656Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"[nltk_data] Downloading package stopwords to\n",
"[nltk_data] /Users/eugeniecyrot/nltk_data...\n",
"[nltk_data] Package stopwords is already up-to-date!\n",
"Processing: 100%|██████████| 2048878/2048878 [00:06<00:00, 333051.64it/s]\n",
"Processing: 100%|██████████| 253627098/253627098 [00:28<00:00, 8888480.07it/s]\n"
]
}
],
"outputs": [],
"source": [
"top_20_words,word_freq = sem_ana.top_n_words(clean_reviews, 20)"
]
Expand Down Expand Up @@ -1103,7 +1075,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 50,
"id": "7ec3aaf3748fc17e",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -1649,6 +1621,20 @@
"Additionally, consumers seem to like a \"creamy\" and \"smooth\" mouthfeel, which stays quite common across the seasons.\n",
"Finally, \"sweet\" tastes are more favored during this time period."
]
},
{
"cell_type": "markdown",
"id": "899e57f4",
"metadata": {},
"source": [
"## Conclusion\n",
"\n",
"Our analysis reveals significant seasonal trends in beer preferences, providing valuable insights for brewers and marketers. Lighter, fruitier styles such as Pale Lager and IPA are favoured in the warmer months, while richer, full-bodied styles such as Stout and Barleywine dominate in the colder seasons. Regional differences also play a role, with preferences for certain styles such as Lambic-Fruit or Wild Beer varying by state and season.\n",
"\n",
"Sentiment and semantic analysis shows that consumers value 'full-bodied' and 'dark chocolate' flavours in positive reviews, while terms such as 'light-bodied' and 'pale yellow' appear in negative reviews. Seasonal shifts in flavour and taste preferences - such as 'sweet' and 'citrus' in summer and 'rich' and 'creamy' in winter - reflect evolving consumer expectations.\n",
"\n",
"These insights enable brewers to tailor production and marketing strategies to seasonal demand, ensuring better alignment with consumer preferences and enhancing the overall beer experience."
]
}
],
"metadata": {
Expand Down

0 comments on commit 488941b

Please sign in to comment.