{"id":545,"date":"2022-11-23T16:13:15","date_gmt":"2022-11-23T13:13:15","guid":{"rendered":"https:\/\/acua.qcri.org\/blog\/?p=545"},"modified":"2022-11-24T09:10:27","modified_gmt":"2022-11-24T06:10:27","slug":"which-engagement-level-can-we-predict-better-on-instagram-a-classification-approach","status":"publish","type":"post","link":"https:\/\/acua.qcri.org\/blog\/which-engagement-level-can-we-predict-better-on-instagram-a-classification-approach\/","title":{"rendered":"Which engagement level can we predict better on Instagram? A classification approach"},"content":{"rendered":"<p><span style=\"font-weight: 400\">In social media, likes and comments are key metrics for success.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">If you can predict how many likes and comments a post will get, you can better manage your content strategy and create content that resonates with your audience.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">There are a few ways to build a prediction model for the number of likes.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">In this blog post, we examine and compare the prediction of likes and comments. Through following the framework for predicting audience engagement based on linguistic features [1]. We set the problem as a classification problem of two classes &#8211; high and low. We use Instagram data from a popular news media, but you can examine the same for your own account as well. Here we use a small dataset for the sake of faster examination of the prediction experiment.<\/span><\/p>\n<h3><b>Dataset<\/b><\/h3>\n<p><span style=\"font-weight: 400\">Using only the title of 7391 Instagram posts for one account, we analyze the text to extract language features for building prediction models. The input data contains three columns [&#8216;comments&#8217;, &#8216;likes&#8217;, &#8216;title&#8217; ].\u00a0<\/span><\/p>\n<h3><b>Language Features<\/b><\/h3>\n<p><span style=\"font-weight: 400\">To construct the language features for the Instagram dataset, we take the title of all posts, and we remove all the special characters; then, we apply tokenization and stemming. Once we have cleaned the posts, we construct a TF-IDF matrix by setting the maximum number of features (i.e., words) at 1,000.<\/span><\/p>\n<h3><b>Prediction Experiment<\/b><\/h3>\n<p><span style=\"font-weight: 400\">We build a model that predicts the user engagement level of Instagram posts. We use binary classification models to predict the scale of engagement. The model predicts whether a given Instagram post\u2019s title will have high or low audience engagement.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">We consider the bottom 50% as posts with low engagement (label 1) and the top 50% as posts with high engagement (label 2).\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">For evaluating and comparing the prediction results, we use F1-score. We test a number of different classification algorithms, including Random Forest Classifier, Decision Tree Classifier, Support Vector Machines SVC, Logistic Regression, K Neighbors Classifier, and Gaussian Naive Bayes.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-547 \" src=\"https:\/\/acua.qcri.org\/blog\/wp-content\/uploads\/2022\/11\/comments-e1669269781463-300x217.png\" alt=\"\" width=\"414\" height=\"300\" srcset=\"https:\/\/acua.qcri.org\/blog\/wp-content\/uploads\/2022\/11\/comments-e1669269781463-300x217.png 300w, https:\/\/acua.qcri.org\/blog\/wp-content\/uploads\/2022\/11\/comments-e1669269781463.png 580w\" sizes=\"(max-width: 414px) 100vw, 414px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-548 \" style=\"color: var(--global--color-primary);font-family: var(--global--font-secondary);font-size: var(--global--font-size-base)\" src=\"https:\/\/acua.qcri.org\/blog\/wp-content\/uploads\/2022\/11\/likes-e1669269811643-300x217.png\" alt=\"\" width=\"414\" height=\"300\" srcset=\"https:\/\/acua.qcri.org\/blog\/wp-content\/uploads\/2022\/11\/likes-e1669269811643-300x217.png 300w, https:\/\/acua.qcri.org\/blog\/wp-content\/uploads\/2022\/11\/likes-e1669269811643.png 580w\" sizes=\"(max-width: 414px) 100vw, 414px\" \/><\/p>\n<p><b>Figure 1: The bar chart showing the frequency of the posts in the classification classes low (1) and high (2) for Comments on the left side and likes on the right side.<\/b><\/p>\n<h3><b>Prediction Results<\/b><\/h3>\n<p>&nbsp;<\/p>\n<table style=\"height: 677px\" width=\"957\">\n<tbody>\n<tr>\n<td><b>Prediction Models<\/b><\/td>\n<td colspan=\"2\"><b>f1-score macro avg<\/b><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><b>Comments<\/b><\/td>\n<td><b>Likes<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>Random Forest Classifier<\/b><\/td>\n<td><span style=\"font-weight: 400\">0.68<\/span><\/td>\n<td><span style=\"font-weight: 400\">0.66<\/span><\/td>\n<\/tr>\n<tr>\n<td><b>Decision Tree Classifier<\/b><\/td>\n<td><span style=\"font-weight: 400\">0.66<\/span><\/td>\n<td><span style=\"font-weight: 400\">0.64<\/span><\/td>\n<\/tr>\n<tr>\n<td><b>Support Vector Machines SVC\u00a0<\/b><\/td>\n<td><b>0.73<\/b><\/td>\n<td><b>0.68<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>Logistic Regression<\/b><\/td>\n<td><span style=\"font-weight: 400\">0.73<\/span><\/td>\n<td><span style=\"font-weight: 400\">0.67<\/span><\/td>\n<\/tr>\n<tr>\n<td><b>K Neighbors Classifier<\/b><\/td>\n<td><span style=\"font-weight: 400\">0.68<\/span><\/td>\n<td><span style=\"font-weight: 400\">0.62<\/span><\/td>\n<\/tr>\n<tr>\n<td><b>Gaussian Naive Bayes<\/b><\/td>\n<td><span style=\"font-weight: 400\">0.70<\/span><\/td>\n<td><span style=\"font-weight: 400\">0.66<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3><b>Observations<\/b><\/h3>\n<p><span style=\"font-weight: 400\">We tested different basic models to compare the predictability power of both likes and comments. The best-performing model for predicting the number of comments <\/span><span style=\"font-weight: 400\">(73%) <\/span><span style=\"font-weight: 400\">and likes <\/span><span style=\"font-weight: 400\">(68%)<\/span><span style=\"font-weight: 400\"> is the Support Vector Machines SVC model.<\/span><span style=\"font-weight: 400\"> The engagement metric that had the highest accuracy in predictability, using the TF-IDF language features and the tested models, was the number of comments. Whereas there is a 5% difference compared with the highest-performing model for predicting the likes. For all tested models, likes prediction performed less than comments prediction.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Based on the results of the prediction experiment, we can say that the number of likes is the engagement metric that is more difficult to predict. The number of comments can be predicted with higher accuracy.<\/span><\/p>\n<p><span style=\"font-weight: 400\">The results can still be improved by fine-tuning the model parameters to get better results and increasing the size of the dataset. Also, by adding more metadata of the posts, such as the posting time, post frequency, hashtags, etc.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Using such an approach, <\/span><span style=\"font-weight: 400\">you can predict how many likes and comments an Instagram post will get. With these prediction insights, you can better manage your content strategy and create content that will better resonate with your audience.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">[1]\u00a0 Aldous, K, An, J, and Jansen, B. J. (2019) <\/span><a href=\"http:\/\/www.bernardjjansen.com\/uploads\/2\/4\/1\/8\/24188166\/aldous_audience_engagement.pdf\"><span style=\"font-weight: 400\">Predicting Audience Engagement Across Social Media Platforms in the News Domain<\/span><\/a><span style=\"font-weight: 400\">. 11th International Conference on Social Informatics (SocInfo2019). Doha, Qatar. 18-21 November, 173-187.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In social media, likes and comments are key metrics for success.\u00a0 If you can predict how many likes and comments a post will get, you can better manage your content strategy and create content that resonates with your audience.\u00a0 There are a few ways to build a prediction model for the number of likes.\u00a0 In&hellip; <a class=\"more-link\" href=\"https:\/\/acua.qcri.org\/blog\/which-engagement-level-can-we-predict-better-on-instagram-a-classification-approach\/\">Continue reading <span class=\"screen-reader-text\">Which engagement level can we predict better on Instagram? A classification approach<\/span><\/a><\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.13 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Which engagement level can we predict better on Instagram? A classification approach - Team Acua<\/title>\n<meta name=\"description\" content=\"In social media, engagement prediction can help you better manage your content strategy and create content that resonates with your audience.\u00a0\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/acua.qcri.org\/blog\/which-engagement-level-can-we-predict-better-on-instagram-a-classification-approach\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Which engagement level can we predict better on Instagram? A classification approach - Team Acua\" \/>\n<meta property=\"og:description\" content=\"In social media, engagement prediction can help you better manage your content strategy and create content that resonates with your audience.\u00a0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/acua.qcri.org\/blog\/which-engagement-level-can-we-predict-better-on-instagram-a-classification-approach\/\" \/>\n<meta property=\"og:site_name\" content=\"Team Acua\" \/>\n<meta property=\"article:published_time\" content=\"2022-11-23T13:13:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-24T06:10:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/acua.qcri.org\/blog\/wp-content\/uploads\/2022\/11\/comments-e1669269781463-300x217.png\" \/>\n<meta name=\"author\" content=\"Kholoud Aldous\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kholoud Aldous\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/acua.qcri.org\/blog\/which-engagement-level-can-we-predict-better-on-instagram-a-classification-approach\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/acua.qcri.org\/blog\/which-engagement-level-can-we-predict-better-on-instagram-a-classification-approach\/\"},\"author\":{\"name\":\"Kholoud Aldous\",\"@id\":\"https:\/\/acua.qcri.org\/blog\/#\/schema\/person\/84104ee571377175f3d99eb4e21e2a13\"},\"headline\":\"Which engagement level can we predict better on Instagram? A classification approach\",\"datePublished\":\"2022-11-23T13:13:15+00:00\",\"dateModified\":\"2022-11-24T06:10:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/acua.qcri.org\/blog\/which-engagement-level-can-we-predict-better-on-instagram-a-classification-approach\/\"},\"wordCount\":615,\"publisher\":{\"@id\":\"https:\/\/acua.qcri.org\/blog\/#organization\"},\"articleSection\":[\"Customer segmentation\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/acua.qcri.org\/blog\/which-engagement-level-can-we-predict-better-on-instagram-a-classification-approach\/\",\"url\":\"https:\/\/acua.qcri.org\/blog\/which-engagement-level-can-we-predict-better-on-instagram-a-classification-approach\/\",\"name\":\"Which engagement level can we predict better on Instagram? A classification approach - Team Acua\",\"isPartOf\":{\"@id\":\"https:\/\/acua.qcri.org\/blog\/#website\"},\"datePublished\":\"2022-11-23T13:13:15+00:00\",\"dateModified\":\"2022-11-24T06:10:27+00:00\",\"description\":\"In social media, engagement prediction can help you better manage your content strategy and create content that resonates with your audience.\u00a0\",\"breadcrumb\":{\"@id\":\"https:\/\/acua.qcri.org\/blog\/which-engagement-level-can-we-predict-better-on-instagram-a-classification-approach\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/acua.qcri.org\/blog\/which-engagement-level-can-we-predict-better-on-instagram-a-classification-approach\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/acua.qcri.org\/blog\/which-engagement-level-can-we-predict-better-on-instagram-a-classification-approach\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/acua.qcri.org\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Which engagement level can we predict better on Instagram? A classification approach\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/acua.qcri.org\/blog\/#website\",\"url\":\"https:\/\/acua.qcri.org\/blog\/\",\"name\":\"Team Acua\",\"description\":\"Audience, Customer, and User Analytics\",\"publisher\":{\"@id\":\"https:\/\/acua.qcri.org\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/acua.qcri.org\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/acua.qcri.org\/blog\/#organization\",\"name\":\"Team Acua\",\"url\":\"https:\/\/acua.qcri.org\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/acua.qcri.org\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/acua.qcri.org\/blog\/wp-content\/uploads\/2022\/10\/cropped-cropped-logo.png\",\"contentUrl\":\"https:\/\/acua.qcri.org\/blog\/wp-content\/uploads\/2022\/10\/cropped-cropped-logo.png\",\"width\":1466,\"height\":770,\"caption\":\"Team Acua\"},\"image\":{\"@id\":\"https:\/\/acua.qcri.org\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/acua.qcri.org\/blog\/#\/schema\/person\/84104ee571377175f3d99eb4e21e2a13\",\"name\":\"Kholoud Aldous\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/acua.qcri.org\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2d623007d31bfcee2409f387825ae07d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2d623007d31bfcee2409f387825ae07d?s=96&d=mm&r=g\",\"caption\":\"Kholoud Aldous\"},\"url\":\"https:\/\/acua.qcri.org\/blog\/author\/kkaldous\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Which engagement level can we predict better on Instagram? A classification approach - Team Acua","description":"In social media, engagement prediction can help you better manage your content strategy and create content that resonates with your audience.\u00a0","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/acua.qcri.org\/blog\/which-engagement-level-can-we-predict-better-on-instagram-a-classification-approach\/","og_locale":"en_US","og_type":"article","og_title":"Which engagement level can we predict better on Instagram? A classification approach - Team Acua","og_description":"In social media, engagement prediction can help you better manage your content strategy and create content that resonates with your audience.\u00a0","og_url":"https:\/\/acua.qcri.org\/blog\/which-engagement-level-can-we-predict-better-on-instagram-a-classification-approach\/","og_site_name":"Team Acua","article_published_time":"2022-11-23T13:13:15+00:00","article_modified_time":"2022-11-24T06:10:27+00:00","og_image":[{"url":"https:\/\/acua.qcri.org\/blog\/wp-content\/uploads\/2022\/11\/comments-e1669269781463-300x217.png"}],"author":"Kholoud Aldous","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kholoud Aldous","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/acua.qcri.org\/blog\/which-engagement-level-can-we-predict-better-on-instagram-a-classification-approach\/#article","isPartOf":{"@id":"https:\/\/acua.qcri.org\/blog\/which-engagement-level-can-we-predict-better-on-instagram-a-classification-approach\/"},"author":{"name":"Kholoud Aldous","@id":"https:\/\/acua.qcri.org\/blog\/#\/schema\/person\/84104ee571377175f3d99eb4e21e2a13"},"headline":"Which engagement level can we predict better on Instagram? A classification approach","datePublished":"2022-11-23T13:13:15+00:00","dateModified":"2022-11-24T06:10:27+00:00","mainEntityOfPage":{"@id":"https:\/\/acua.qcri.org\/blog\/which-engagement-level-can-we-predict-better-on-instagram-a-classification-approach\/"},"wordCount":615,"publisher":{"@id":"https:\/\/acua.qcri.org\/blog\/#organization"},"articleSection":["Customer segmentation"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/acua.qcri.org\/blog\/which-engagement-level-can-we-predict-better-on-instagram-a-classification-approach\/","url":"https:\/\/acua.qcri.org\/blog\/which-engagement-level-can-we-predict-better-on-instagram-a-classification-approach\/","name":"Which engagement level can we predict better on Instagram? A classification approach - Team Acua","isPartOf":{"@id":"https:\/\/acua.qcri.org\/blog\/#website"},"datePublished":"2022-11-23T13:13:15+00:00","dateModified":"2022-11-24T06:10:27+00:00","description":"In social media, engagement prediction can help you better manage your content strategy and create content that resonates with your audience.\u00a0","breadcrumb":{"@id":"https:\/\/acua.qcri.org\/blog\/which-engagement-level-can-we-predict-better-on-instagram-a-classification-approach\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/acua.qcri.org\/blog\/which-engagement-level-can-we-predict-better-on-instagram-a-classification-approach\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/acua.qcri.org\/blog\/which-engagement-level-can-we-predict-better-on-instagram-a-classification-approach\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/acua.qcri.org\/blog\/"},{"@type":"ListItem","position":2,"name":"Which engagement level can we predict better on Instagram? A classification approach"}]},{"@type":"WebSite","@id":"https:\/\/acua.qcri.org\/blog\/#website","url":"https:\/\/acua.qcri.org\/blog\/","name":"Team Acua","description":"Audience, Customer, and User Analytics","publisher":{"@id":"https:\/\/acua.qcri.org\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/acua.qcri.org\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/acua.qcri.org\/blog\/#organization","name":"Team Acua","url":"https:\/\/acua.qcri.org\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/acua.qcri.org\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/acua.qcri.org\/blog\/wp-content\/uploads\/2022\/10\/cropped-cropped-logo.png","contentUrl":"https:\/\/acua.qcri.org\/blog\/wp-content\/uploads\/2022\/10\/cropped-cropped-logo.png","width":1466,"height":770,"caption":"Team Acua"},"image":{"@id":"https:\/\/acua.qcri.org\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/acua.qcri.org\/blog\/#\/schema\/person\/84104ee571377175f3d99eb4e21e2a13","name":"Kholoud Aldous","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/acua.qcri.org\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2d623007d31bfcee2409f387825ae07d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2d623007d31bfcee2409f387825ae07d?s=96&d=mm&r=g","caption":"Kholoud Aldous"},"url":"https:\/\/acua.qcri.org\/blog\/author\/kkaldous\/"}]}},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/acua.qcri.org\/blog\/wp-json\/wp\/v2\/posts\/545"}],"collection":[{"href":"https:\/\/acua.qcri.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/acua.qcri.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/acua.qcri.org\/blog\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/acua.qcri.org\/blog\/wp-json\/wp\/v2\/comments?post=545"}],"version-history":[{"count":9,"href":"https:\/\/acua.qcri.org\/blog\/wp-json\/wp\/v2\/posts\/545\/revisions"}],"predecessor-version":[{"id":549,"href":"https:\/\/acua.qcri.org\/blog\/wp-json\/wp\/v2\/posts\/545\/revisions\/549"}],"wp:attachment":[{"href":"https:\/\/acua.qcri.org\/blog\/wp-json\/wp\/v2\/media?parent=545"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/acua.qcri.org\/blog\/wp-json\/wp\/v2\/categories?post=545"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/acua.qcri.org\/blog\/wp-json\/wp\/v2\/tags?post=545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}