<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Syifa Addini on Medium]]></title>
        <description><![CDATA[Stories by Syifa Addini on Medium]]></description>
        <link>https://medium.com/@syifaaddini?source=rss-929c81e8791f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*NRRhYIUfbADDkuA1.</url>
            <title>Stories by Syifa Addini on Medium</title>
            <link>https://medium.com/@syifaaddini?source=rss-929c81e8791f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 14:16:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@syifaaddini/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Diving into Indonesian Skincare Reviews — Part 4: Battle of Top Indonesian Gel Moisturizers’…]]></title>
            <link>https://medium.com/@syifaaddini/diving-into-indonesian-skincare-reviews-part-4-battle-of-top-indonesian-gel-moisturizers-c9e26d1d6c67?source=rss-929c81e8791f------2</link>
            <guid isPermaLink="false">https://medium.com/p/c9e26d1d6c67</guid>
            <category><![CDATA[bertopic]]></category>
            <category><![CDATA[text-analysis]]></category>
            <category><![CDATA[indonesian-skincare]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[skincare-analysis]]></category>
            <dc:creator><![CDATA[Syifa Addini]]></dc:creator>
            <pubDate>Mon, 01 Jul 2024 10:53:00 GMT</pubDate>
            <atom:updated>2024-07-03T08:00:38.625Z</atom:updated>
            <content:encoded><![CDATA[<h3>Diving into Indonesian Skincare Reviews — Part 4: Battle of Top Indonesian Gel Moisturizers’ Branding</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*OOPmlSBf2HzZdX41lKYZnA.png" /></figure><p>Reviews are very useful to gain insight of brands’ customers, to check what they love or hate about the products. With thousands of reviews. It would take a very long and rigorous effort to read them all and get some insights.</p><p>From this <a href="https://towardsdatascience.com/topics-per-class-using-bertopic-252314f2640">story</a>, I learned that Basic Topic Modelling is one of the method that can give you an understanding of the main topics in texts (for example, reviews) and their mixture.</p><p>In my previous story, I utilized Topic Modelling (BERTopic module) to dive into the <a href="https://medium.com/@syifaaddini/diving-into-indonesian-skincare-reviews-part-2-topic-modelling-using-bertopic-and-llama-2-45c87ab13810">nitty gritty of Skintific’s reviews</a>. Now, we’re utilizing it again to compare Skintific’s reviews with other brands’ reviews.</p><p>I adjusted and followed the code from <a href="https://towardsdatascience.com/topics-per-class-using-bertopic-252314f2640">the story</a>, which is particularly using BERTopic by Class, means we can also compare topics across categories. In the end we will get such insightful graphs for each topic. Then, we can investigate how a product’s branding works among its competitors.</p><p>Since, I don’t change anything as in the core of the codes, just change the data, I will go straight to the analyzing the result below.</p><p>For disclaimer before going further, the reviews that I use here are the positive ones, which are 4 and 5 stars only. Thus, the brands that “not winning” in certain claim don’t mean that they are not as they claim to be, it just means that the reviewers here think that the others are better in presenting the claims.</p><h3>Which Brand Wins Certain Area of Branding/Claim?</h3><h4>1. Acne Warrior</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*roeFigztnTI9WPqqgtmlzw.png" /><figcaption>Acne Topics</figcaption></figure><p>As Emina product is especially called <em>Emina Ms. Pimple Moisturizing Gel</em>, it’s no wonder that it wins the Acne Warrior branding among thousand of reviews. Its reviews about topics like acne and breakout is standing out comparing to the others.</p><h4>2. Skin Barrier Warrior</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r0ABWYazs5ADaV538CNPqQ.png" /><figcaption>Barrier Topics</figcaption></figure><p>Once again, as in the name of the product, <em>Skintific 5X Ceramide Barrier Repair Moisture Gel Moisturizer</em> is also a very viral product in social media, thus helping the reviewers to talk about “barrier” at top of the mind.</p><p>However, <em>True to Skin Mugwort Tripeptide Moisturizer Gel Cream</em>’s teams deserved kudos for able to imprint this too to their users, making them also winning the Skin Barrier Warrior branding.</p><h4>3. Lightweight Formula Warrior</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PNuSxjZDgiuSOjOokJg7pw.png" /><figcaption>Lightweight Topics</figcaption></figure><p>From the BERTopic analysis, it derived topics talking about how certain moisturizers are having lightweight formula, helping acne, and suitable to be used in tropical country. <em>Emina Ms. Pimple Moisturizing Gel </em>once again is winning in this department. Followed by Clinique and Skintific.</p><h4>4. Hydrating Warrior</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bm7nyB3iEfvIExObQEE9WA.png" /><figcaption>Hydrating Topics</figcaption></figure><p>Moisturizers’ main goal is moisturizing their users’ skin, means the skin should be felt hydrated after applying the products. The percentage of the reviews are also a lot distributed here (up to ~20%).</p><p><em>Hada Labo Perfect 3D Gel</em>’s users are mainly thinking about this benefit after using the product. While Somethinc, Neutrogena, and Skintific’s users are not falling far behind when thinking about “hydrating” as the products’ benefits.</p><h4>5. Plumping Warrior</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tkbLd68_gj9Ki77Menxa1Q.png" /><figcaption>Plumper Topics</figcaption></figure><p>Not only hydrating, some of this moisturizers are making the users thinking that they are good at making their skin plumper and felt healthier at the morning. This kind of branding is won by <em>Somethinc Ceramic Skin Saviour Moisturizer Gel</em>,<em> </em>followed by Hadalabo and Whitelab.</p><h4>6. Brightening Warrior</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ul0Dtn9ed5BhPfnIDkD89w.png" /><figcaption>Brightening Topics</figcaption></figure><p>Aside from comments about plumper skin, BERTopic also analyzed talking points about certain moisturizers are great at making their skin brighter. Neutrogena and True to Skin’s skins users are greatly thinking this about their moisturizers. Followed by Ponds.</p><h4>7. Price-to-Value Warrior</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pbKrKg68IFHu4JPyMxadrQ.png" /><figcaption>Price Value Topics</figcaption></figure><p>Skintific is retailed at around IDR 130,000 for 30ml. It’s not really cheap, but the marketing team did so great to push the product to be very viral and many people are trying it. And indeed, the product is thought to be work well too by their users, thus even though it’s quite pricey, eventually it’s still felt recommended or worth the price.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c9e26d1d6c67" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Diving into Indonesian Skincare Reviews — Part 3: Battle of Top Indonesian Gel Moisturizers’ Users]]></title>
            <link>https://medium.com/@syifaaddini/diving-into-indonesian-skincare-reviews-part-3-battle-of-top-indonesian-gel-moisturizers-users-1fc9e7a0dd66?source=rss-929c81e8791f------2</link>
            <guid isPermaLink="false">https://medium.com/p/1fc9e7a0dd66</guid>
            <category><![CDATA[skintific]]></category>
            <category><![CDATA[indonesian-skincare]]></category>
            <category><![CDATA[skincare-analysis]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[exploratory-data-analysis]]></category>
            <dc:creator><![CDATA[Syifa Addini]]></dc:creator>
            <pubDate>Sat, 29 Jun 2024 01:47:55 GMT</pubDate>
            <atom:updated>2024-06-30T03:57:57.352Z</atom:updated>
            <content:encoded><![CDATA[<h3>Diving into Indonesian Skincare Reviews — Part 3: Battle of Top Indonesian Gel Moisturizers’ Users</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*l3mSaPDUll32LtVbwpF8lQ.png" /></figure><p>Hi Folks!</p><p>Back again at dissecting thousands of Indonesian skincare reviews from Female Daily webpage, especially on <a href="https://reviews.femaledaily.com/products/moisturizer/gel?brand=&amp;order=popular&amp;page=1"><strong>Gel Moisturizer</strong></a>. In my previous 2 stories, I dove on one particular product only, <a href="https://reviews.femaledaily.com/products/moisturizer/gel/skintific/5x-ceramide-barrier-repair-moisture-gel-moisturizer?cat=&amp;cat_id=0&amp;age_range=&amp;skin_type=&amp;skin_tone=&amp;skin_undertone=&amp;hair_texture=&amp;hair_type=&amp;order=newest&amp;page=1"><em>Skintific 5X Ceramide Barrier Repair Moisture Gel Moisturizer</em></a>, which is the most popular or the most reviewed on Female Daily.</p><p>Here is the link where I analyze the <a href="https://medium.com/@syifaaddini/diving-into-indonesian-skincare-reviews-part-1-sentiment-analysis-788294efbd95?source=your_stories_page-------------------------------------">Skintific’s sentiments of 3-stars reviews</a>. And, here’s the link where I get to <a href="https://medium.com/@syifaaddini/diving-into-indonesian-skincare-reviews-part-2-topic-modelling-using-bertopic-and-llama-2-45c87ab13810?source=your_stories_page-------------------------------------">the nitty gritty of what are the 4,387 reviews talk about</a>.</p><p>Now, I’ll compare the Top 12 most reviewed Gel Moisturizers of Female Daily. On this story, I’ll compare behavior each of the products’ users. Then, one more story ahead, I’ll compare which brand who won in certain area of branding, such as who won “The Skin-barrier Warrior” branding, who won “The Plump Warrior” branding, and so on.</p><h3>The Products</h3><p>These are the Top 12 Most Reviewed Gel Moisturizers based on Female Daily with their price estimations when I scrapped the webpage in early June 2024:</p><ol><li>Skintific 5X Ceramide Barrier Repair Moisture Gel Moisturizer (30ml — IDR ~130,000)</li><li>L’Oreal Paris Revitalift Crystal Gel Cream (50ml — IDR ~185,000)</li><li>Hada Labo Perfect 3D Gel (40ml — IDR ~125,000)</li><li>Wardah Nature Daily Witch Hazel Purifying Moisturizer Gel (40ml — IDR ~25,000)</li><li>Somethinc Ceramic Skin Saviour Moisturizer Gel (50ml — IDR ~299,000)</li><li>Neutrogena Hydro Boost Hyaluronic Acid Water Gel (50ml — IDR ~229,000)</li><li>Ponds Juice Collection Gel Cream Moisturizer Day &amp; Night (20ml — IDR ~24,500)</li><li>Emina Ms. Pimple Moisturizing Gel (20ml — IDR ~20,000)</li><li>Clinique Dramatically Different Moisturizing Gel (125ml — IDR ~660,000)</li><li>Whitelab Cera-Mug Barrier Moisturizing Gel (20m — IDR ~95,400)</li><li>True to Skin Mugwort Tripeptide Moisturizer Gel Cream (30ml — IDR ~122,500)</li><li>Laneige Water Bank Gel Cream (50ml — IDR ~650,000)</li></ol><h3>More Expensive means Longer Usage Period before Submitting Reviews?</h3><p>Based on their listing price estimation, the cheapest is Ponds and the most expensive one is Clinique.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*6y51jyi8vQ_02LddhbDGhA.png" /><figcaption>Listing Price from Cheapest to the most Expensive</figcaption></figure><p><strong><em>However</em></strong>, if we sort based on price per ml, the cheapest is Wardah at IDR 625 per ml. And, the most expensive is Laneige at IDR 13,000 per ml.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*VfmjQZ_IDrcicFwEkYh0pQ.png" /><figcaption>Price per ML from Cheapest to the Most Expensive</figcaption></figure><p>So, if we look at the pricing, it should be that the users of Somethinc, Laneige, and Clinique give the longest time to try or use the product first before submitting. <strong><em>But</em></strong>, it’s not an obvious case here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eK500NIHgaBmQSbgSNTMgQ.png" /><figcaption>Length of Product Usage before Reviews Submitted</figcaption></figure><p>The only visible products whose users are having tendency to take longer time to submit reviews are only Laneige and Clinique, while the others are following trends, which is ≤ 3 months.</p><h3><strong>When Target Market is Targeted</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7CPBrXaVrTYFUYrtnLkVIw.png" /><figcaption>Gel Moisturizers’ User Ages</figcaption></figure><p>A gel moisturizer, usually is a product for the mass, the early twenties up to the early thirties. This is proven to be in accordance to those who left reviews at Female Daily.</p><p><strong><em>However,</em></strong> Emina and Ponds are both in general are brands that have strong youth or for beginner images. Therefore, a lot of their reviewers/users are indeed more in the younger side. This is a case where target market is rightly getting targeted.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1fc9e7a0dd66" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CRM/Loyalty strategy that doesn’t need storing personal data]]></title>
            <link>https://medium.com/@syifaaddini/crm-loyalty-strategy-that-doesnt-need-storing-personal-data-96c0815801b9?source=rss-929c81e8791f------2</link>
            <guid isPermaLink="false">https://medium.com/p/96c0815801b9</guid>
            <category><![CDATA[crm]]></category>
            <category><![CDATA[loyalty]]></category>
            <category><![CDATA[loyalty-strategy]]></category>
            <category><![CDATA[crm-strategy]]></category>
            <dc:creator><![CDATA[Syifa Addini]]></dc:creator>
            <pubDate>Mon, 27 May 2024 10:40:24 GMT</pubDate>
            <atom:updated>2024-06-29T00:47:52.334Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*1Do1EPt1cjmjzDRUFHYnFg.png" /></figure><p>Do you know that nowadays, active CRM marketing strategy always include asking then storing customers’ data, such as the most basic thing asked is phone number?</p><p>In my own opinion, CRM as a method to increase customers’ loyalty shouldn’t be defined in a box of modern marketing technology only. Why? Because small and medium business can and should be able to do CRM too. There used to be a CRM or loyalty system where company gives stamp card that will give you one stamp every time you buy from them, then if you get 10 stamps, you’ll get a special discount voucher.</p><p>I asked ChatGPT of any CRM method like this stamp card. It gave me some examples, let’s check one by one whether it’s really doable without storing customers data.</p><h3>1. Punch Cards</h3><p>Similar to stamp cards, punch cards are given to customers and punched each time they make a purchase. After a certain number of punches, the customer receives a reward.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/215/1*v3Z4deuGG8q8UgGjPPIYOw.jpeg" /><figcaption>Punch Cards</figcaption></figure><p><em>Verdict</em>: Doable. Companies can give customers motivation to re-purchase without storing any data.</p><h3>2. Paper Coupons</h3><p>Businesses distribute paper coupons through various means, such as newspapers, mail, or in-store handouts. Customers redeem these coupons for discounts or special offers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/301/1*5RYyIRBCyBoq2wq7EyI23g.jpeg" /><figcaption>Paper Coupons</figcaption></figure><p><em>Verdict</em>: Doable. Though with higher cost, some companies have been doing this in Indonesia, like Indomaret or Burger King. Usually, it’s in routine date, so companies can give these to increase buying motivation in certain date that lack of sales.</p><h3>3. In-Store Events and Promotions</h3><p>Hosting special events, such as flash sales or exclusive shopping hours, can encourage repeat visits and loyalty without needing to gather customer information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/1*BXwr_IpRH1qBBIQ1lAiX4g.jpeg" /><figcaption>Regular Limited Time Offers</figcaption></figure><p><em>Verdict</em>: Doable. Usually this will be held as Seasonal Sales and Limited-Time Offers. Offering seasonal discounts or limited-time offers can create a sense of urgency and encourage repeat business, relying on regular advertising rather than personal customer data. Especially if it’s regular thing, customers will usually remember to shop at these times. Some of the additional or complementary activities could be:</p><ul><li><strong>Buy One, Get One Free (BOGO)</strong>: This promotion encourages customers to purchase more by offering a free item for every item purchased. It’s a straightforward offer that doesn’t require customer data.</li><li><strong>Scratch Cards and Instant Wins</strong>: Customers receive a scratch card with each purchase, and they can win instant prizes, discounts, or products, adding an element of fun and surprise to the shopping experience.</li></ul><h3>4. Membership Programs</h3><p>Customers pay a small fee to join a membership program that offers ongoing discounts or special benefits.</p><p><em>Verdict</em>: Doable with caution. The membership card itself can be the only identifier needed, without storing personal data into companies’ database. The minimum, companies can only save the membership ID only, to check on their system whether the ID exist or not before any checkout to prevent unwanted fraud. For these members, we can hold activities like:</p><ul><li><strong>Gift with Purchase:</strong> Customers receive a free gift after making a purchase of a certain value or buying a specific product. To track the spending, there is a <strong>Paper-based Loyalty Card</strong> which is similar to modern loyalty apps but in a non-digital format, where customers receive booklets or cards to track their purchases and rewards manually. This strategy encourages repeat purchases without needing to track customer data. I know, this looks very outdated, but can be made fun too, especially if the gift is very desirable.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*CqtkRxZPryKZrcDGJ7fbkw.jpeg" /><figcaption>Cute loyalty card</figcaption></figure><ul><li><strong>Referral Discounts:</strong> Customers who refer new customers receive a discount or reward for their next purchase. The new customer may also receive a discount. This can be managed manually without tracking extensive data.</li></ul><p>These methods can effectively build customer loyalty through tangible rewards and incentives without the need for collecting and storing personal customer information. Thus, small and medium companies don’t need to invest millions money into modern marketing technology and still get the benefit of increased customers’ loyalty. Also nowadays, a lot of customers grow more and more careful in sharing their data. So, these campaigns could be one of useful USP.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96c0815801b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Diving into Indonesian Skincare Reviews — Part 2: Topic Modelling using BERTopic and Llama 2]]></title>
            <link>https://medium.com/@syifaaddini/diving-into-indonesian-skincare-reviews-part-2-topic-modelling-using-bertopic-and-llama-2-45c87ab13810?source=rss-929c81e8791f------2</link>
            <guid isPermaLink="false">https://medium.com/p/45c87ab13810</guid>
            <category><![CDATA[bahasa-indonesia]]></category>
            <category><![CDATA[text-analysis]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[bertopic]]></category>
            <category><![CDATA[skincare-review]]></category>
            <dc:creator><![CDATA[Syifa Addini]]></dc:creator>
            <pubDate>Mon, 27 May 2024 03:37:15 GMT</pubDate>
            <atom:updated>2024-06-29T00:49:55.334Z</atom:updated>
            <content:encoded><![CDATA[<h3>Diving into Indonesian Skincare Reviews — Part 2: Topic Modelling using BERTopic and Llama 2</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*5oJvZM4QUup84zkAL2Fejw.png" /></figure><p>So, in the <a href="https://medium.com/@syifaaddini/diving-into-indonesian-skincare-reviews-part-1-sentiment-analysis-788294efbd95">first post</a> analyzing the 4,387 reviews of 5X Ceramide Barrier Repair Moisture Gel Moisturizer by Skintific, we utilized WordCloud to find out the most common words being talked about.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/1*UPmiTIEg376hD3kHSC05tg.jpeg" /><figcaption>Positive reviews WordCloud</figcaption></figure><p>For positive words, we got:</p><ul><li>moisturizer/moist/melembabkan/pelembab</li><li>tekstur</li><li>barrier</li><li>wangi (in terms of smell)</li><li>calming</li><li>hidrasi</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*chjoiZYJW65eM5VPZ5EuPQ.jpeg" /><figcaption>Negative reviews WordCloud</figcaption></figure><p>While for negative reviews, we got:</p><ul><li>jerawat</li><li>bruntusan</li><li>kering</li><li>minyak/oily</li></ul><p>Nowadays, I’m also been learning about BERTopic. It’s one of Topic Modelling method. What is a Topic Modelling?</p><blockquote><strong>Topic modeling</strong> is a technique that involves <strong>assigning topics</strong> to a given corpus of text based on the words that are present within it. It is a powerful technique that helps in <strong>uncovering the hidden themes or topics</strong> present in a large corpus of unstructured text data. (source: <a href="https://medium.com/@ananyajoshi20/discovering-themes-in-news-articles-a-step-by-step-guide-to-supervised-bertopic-8cb77a8f3fe5">https://medium.com/@ananyajoshi20?source=post_page-----8cb77a8f3fe5--------------------------------</a>)</blockquote><p>So, let’s say in the negative reviews, people are saying that this product gives them these bad effects of acne, dry skin, oily skin, but is that all? Is there more to unveil?</p><p>The data I use is a csv file consist of 3 columns: ID, Sentiment, and the Reviews.</p><pre>import pandas as pd<br>import requests<br>from nltk.corpus import stopwords<br>import nltk<br>from nltk.tokenize import word_tokenize<br><br><br># Load the dataset<br>df = pd.read_csv(&#39;reviews_skintific_5xceramide - Copy.csv&#39;, encoding=&quot;ISO-8859-1&quot;)<br><br>df_neg = df[df[&#39;Sentiment&#39;] == &#39;negative&#39;]<br>df_pos = df[df[&#39;Sentiment&#39;] == &#39;positive&#39;]<br><br>df_neg.head()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/1*6fgMPuyOr1Dcge64I1qzRg.png" /></figure><p>Then, I constructed custom Indonesian stopwords. Part of it is inspired by <a href="https://medium.com/@yasirabd/sentiment-analysis-dengan-logistic-regression-50315cd2c836">this story</a>.</p><pre># CONSTRUCT STOPWORDS<br>rama_stopword = &quot;https://raw.githubusercontent.com/ramaprakoso/analisis-sentimen/master/kamus/stopword.txt&quot;<br>yutomo_stopword = &quot;https://raw.githubusercontent.com/yasirutomo/python-sentianalysis-id/master/data/feature_list/stopwordsID.txt&quot;<br>fpmipa_stopword = &quot;https://raw.githubusercontent.com/onlyphantom/elangdev/master/elang/word2vec/utils/stopwords-list/fpmipa-stopwords.txt&quot;<br>sastrawi_stopword = &quot;https://raw.githubusercontent.com/onlyphantom/elangdev/master/elang/word2vec/utils/stopwords-list/sastrawi-stopwords.txt&quot;<br>aliakbar_stopword = &quot;https://raw.githubusercontent.com/onlyphantom/elangdev/master/elang/word2vec/utils/stopwords-list/aliakbars-bilp.txt&quot;<br>pebahasa_stopword = &quot;https://raw.githubusercontent.com/onlyphantom/elangdev/master/elang/word2vec/utils/stopwords-list/pebbie-pebahasa.txt&quot;<br>elang_stopword = &quot;https://raw.githubusercontent.com/onlyphantom/elangdev/master/elang/word2vec/utils/stopwords-id.txt&quot;<br>nltk_stopword = stopwords.words(&#39;indonesian&#39;)<br><br># create path url for each stopword<br>path_stopwords = [rama_stopword, yutomo_stopword, fpmipa_stopword, sastrawi_stopword, <br>                  aliakbar_stopword, pebahasa_stopword, elang_stopword]<br><br># combine stopwords<br>stopwords_l = nltk_stopword<br>for path in path_stopwords:<br>    response = requests.get(path)<br>    stopwords_l += response.text.split(&#39;\n&#39;)<br><br># Remove specific words from the combined stopwords list<br>specific_stopwords = {&quot;buat&quot;, &quot;membuat&quot;, &quot;tidak&quot;,&quot;no&quot;}<br>stopwords_l = [word for word in stopwords_l if word not in specific_stopwords]<br><br>custom_st = &#39;&#39;&#39;<br>yg yang dgn ane smpai bgt gua gwa si tu ama utk udh btw gt<br>ntar lol ttg emg aj aja tll sy sih kalo nya trsa mnrt nih<br>ma dr ajaa tp akan bs bikin kta pas pdahl bnyak guys tnx<br>bang ...........<br>&#39;&#39;&#39;<br><br># create dictionary with unique stopword<br>st_words = set(stopwords_l)<br>custom_stopword = set(custom_st.split())<br><br># result stopwords<br>custom_stop_words = st_words | custom_stopword</pre><p>After that I pre-processed the reviews until it became tokenized.</p><pre># Function to preprocess Indonesian text<br>def preprocess_text(text):<br>    # Tokenize the text using NLTK<br>    tokens = word_tokenize(text)<br>    # Remove punctuation<br>    tokens = [word for word in tokens if word.isalnum()]<br>    # Remove stopwords<br>    stop_words = custom_stop_words<br>    tokens = [word for word in tokens if not word.lower() in stop_words]<br>    # Remove &#39;nya&#39; suffix at the end of words<br>    tokens = [word[:-3] if word.endswith(&#39;nya&#39;) else word for word in tokens]<br>    return &quot; &quot;.join(tokens)<br><br><br># Preprocess negative reviews<br>preprocessed_reviews_neg = [preprocess_text(review) for review in df_neg.review.values]<br><br># Preprocess positive reviews<br>preprocessed_reviews_pos = [preprocess_text(review) for review in df_pos.review.values]<br><br>print(&#39;preprocess done&#39;)</pre><p>For a reminder, this is the result of tokenized sentence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vh8d6exsa6GggMvzTWyP9g.jpeg" /><figcaption>Tokenized sentence</figcaption></figure><p>Finally we are coming to training the preprocessed reviews to get the topics. The code below is inspired by <a href="https://pub.towardsai.net/topic-modeling-on-customer-reviews-using-bertopic-and-llama2-f40e1b972131">this story</a> and <a href="https://towardsdatascience.com/topics-per-class-using-bertopic-252314f2640">this story</a>.</p><pre>from sklearn.feature_extraction.text import CountVectorizer<br>from bertopic.representation import KeyBERTInspired, MaximalMarginalRelevance<br><br>main_representation_model = KeyBERTInspired()<br>aspect_representation_model = [KeyBERTInspired(top_n_words=30), <br>                                MaximalMarginalRelevance(diversity=.5)]<br><br>representation_model = {<br>   &quot;Main&quot;: main_representation_model,<br>   &quot;Aspect&quot;:  aspect_representation_model<br>}<br><br>vectorizer_model = CountVectorizer(min_df=5)<br><br># Initialize BERTopic models for negative and positive reviews<br>topic_model_neg = BERTopic(nr_topics = 10, <br>                           vectorizer_model = vectorizer_model,<br>                           representation_model=representation_model)<br>topic_model_pos = BERTopic(nr_topics = 10, <br>                           vectorizer_model = vectorizer_model,<br>                           representation_model=representation_model)<br><br>print(&#39;Training topic model for negative reviews...&#39;)<br>topics_neg, ini_probs_neg = topic_model_neg.fit_transform(preprocessed_reviews_neg)<br><br>print(&#39;Training topic model for positive reviews...&#39;)<br>topics_pos, ini_probs_pos = topic_model_pos.fit_transform(preprocessed_reviews_pos)<br><br>df_neg[&#39;topic&#39;] = topics_neg<br>df_neg[&#39;topic_prob&#39;] = ini_probs_neg<br>df_pos[&#39;topic&#39;] = topics_pos<br>df_pos[&#39;topic_prob&#39;] = ini_probs_pos<br><br>topics_info_neg = topic_model_neg.get_topic_info()<br>topics_info_pos = topic_model_pos.get_topic_info()<br><br><br># Obtain the number of topics for negative and positive reviews<br>num_topics_neg = len(set(topics_neg))<br>num_topics_pos = len(set(topics_pos))<br><br>print(f&#39;Number of topics for negative reviews: {num_topics_neg}&#39;)<br>print(f&#39;Number of topics for positive reviews: {num_topics_pos}&#39;)</pre><p>I limit the result of the topics to be 10 only for both negative and positive reviews. The reason is after running it in nr_topics = ‘auto’, then I got like 30 to 40 topics, the difference between the resulted topics are not so vastly different.</p><p>So, this is the result I got:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/387/1*CoF_ZEW3HJm_Jzex_LJaBQ.png" /></figure><h3>Negative Reviews</h3><p>First, let’s take a look at the result of Negative Reviews topics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7V0yjbOuRxkkgTe-OyfvBA.png" /><figcaption>Topics for Negative Reviews</figcaption></figure><p>It’s resulted in 5 topics, labelled from Topic 0 until Topic 4. The -1 topic is the outlier that BERTopic thinks couldn’t fit into the other topic groups.</p><p>At glance, we can see that all the topics talk about “sayang jerawatan”, so this emphasize what the WordCloud has told us about. However, from this topics, we can draw <strong>more context</strong>, like</p><blockquote>Topic 0 is talking about how the consumers are trying the product because of its virality, it’s giving the moist, but then unfortunately causing breakout/acne.</blockquote><p>The topics look similar but also have subtle differences on different pov of how the reviews are written. Below is the Intertopic Distance Map of the topics. From the map, it concurs that those 5 topics are different.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*Ji2WXqOck8-1_G9BJpDZeQ.png" /><figcaption>Intertopic Distance Map</figcaption></figure><p>Now, I’m about to give short label to each of the topic.</p><ul><li>Topic 0: Viral but</li><li>Topic 1: Pricey but</li><li>Topic 2: Tried travel size but then</li></ul><p>However, I found that Topic 3 and Topic 4 are very similar. Let’s take a look at the representative docs (reviews) of them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-lpJk7zsLzwTF7k_9tZupA.png" /><figcaption>Representative Negative Reviews of Topic 3</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ppff8C1hhDm7j5fxacDjzg.png" /><figcaption>Representative Negative Reviews of Topic 4</figcaption></figure><p>In my opinion, those two topics have same angle, the broad general one: it was good but then causing breakout, no additional pov like bought due to virality. So, I merge these two topics.</p><p>However, due to still lack of my skills, I don’t know why this merged topics became Topic 0, then the original Topic 0 became Topic 1, the original Topic 1 became Topic 2, and the original Topic 2 became Topic 3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-ydpKpl8TQ_pI1yj6X3UlA.png" /></figure><p>So, the labels became:</p><ul><li>Topic 0 (the merged topics): It was giving moist but</li><li>Topic 1: Viral but</li><li>Topic 2: Pricey but</li><li>Topic 3: Tried travel size but</li></ul><p><em>In conclusion</em>, utilizing this BERTopic, we can gather more POV of the disappointment.</p><h3>Positive Reviews</h3><p>Now, let’s take a look at the positive reviews topics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kW8ifEhJubj1W6oelns97A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Knr0yJEpYvppfCzaBL0KOg.png" /><figcaption>Topics for Positive Reviews</figcaption></figure><p>For these positive topics, I am trying to utilize Llama 2, an AI to help me with the short labelling, drawing clearer conclusion from those words in each topics. This is also due to my curiosity if it can be used for Indonesian language.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*t6ZhLnefwQ27G4_Aq7dedg.png" /><figcaption>Short Labelling with Llama 2</figcaption></figure><p>In my opinion, looking at the result above, it’s surprisingly makes sense even though not perfect. I try to smooth out those labels below:</p><ul><li>Topic 0 and 3 will be merged : Good product that moisture and brighten</li><li>Topic 1 and 2 will be merged: Moisturizer for sensitive, oily, and acne-prone skin</li><li>Topic 4: Viral but works</li><li>Topic 5: Loving the travel size</li><li>Topic 6: Product that repair the skin barrier</li><li>Topic 7: Would love a pump packaging or jumbo jar</li><li>Topic 8: Love the added spatula to the packaging</li></ul><p>So, for these positive reviews, we can see not only the general praise of moisturizing, the topics also gave additional pov such as how a lot of customers like buying travel size and would love another type of packaging.</p><p>Thank you for following this reviews analysis project. See you on the next one!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45c87ab13810" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cataloguing Indonesian Perfume — Part 2: Recommender System]]></title>
            <link>https://medium.com/@syifaaddini/cataloguing-indonesian-perfume-part-2-recommender-system-2130b27778cc?source=rss-929c81e8791f------2</link>
            <guid isPermaLink="false">https://medium.com/p/2130b27778cc</guid>
            <category><![CDATA[indonesian-perfume]]></category>
            <category><![CDATA[recommender]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[perfume]]></category>
            <dc:creator><![CDATA[Syifa Addini]]></dc:creator>
            <pubDate>Wed, 08 May 2024 10:42:46 GMT</pubDate>
            <atom:updated>2024-06-29T00:51:52.877Z</atom:updated>
            <content:encoded><![CDATA[<h3>Cataloguing Indonesian Perfume — Part 2: Recommender System</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*z01u-WeQqJnDp1t1R-22OA.png" /></figure><p>Since I have those perfume data anyways, I think I can utilize further by making a simple recommender for me (or perhaps for anyone who reads this).</p><p>I adapt this tutorial <a href="https://medium.com/dare-to-be-better/movie-recommender-system-netflix-youtube-e4c8cdb11f77">https://medium.com/dare-to-be-better/movie-recommender-system-netflix-youtube-e4c8cdb11f77</a> to try built a simple web page using Streamlit, then host it free on Streamlit sharing platform. I get this url below:</p><blockquote><a href="https://perfumerecommenderindo.streamlit.app/"><strong>https://perfumerecommenderindo.streamlit.app/</strong></a>.</blockquote><p>(The link is error now 😭, I can’t even login)</p><p>I also plan to add more perfume data and hyperlink of the official shop of each of the recommendation.</p><p>So, basically this code below will deploy a recommender webpage after Streamlit installed all the required requirements.</p><pre>import streamlit as st<br>import pandas as pd<br>from sklearn.feature_extraction.text import CountVectorizer<br>from sklearn.metrics.pairwise import cosine_similarity<br><br># Load the perfume data<br>perfumes = pd.read_csv(&#39;Perfume Data.csv&#39;, encoding=&#39;latin1&#39;)<br><br># Preprocess the data<br>perfumes[[&#39;Top Notes&#39;, &#39;Heart Notes&#39;, &#39;Based Notes&#39;, &#39;Mood&#39;]] = perfumes[[&#39;Top Notes&#39;, &#39;Heart Notes&#39;, &#39;Based Notes&#39;, &#39;Mood&#39;]].fillna(&#39;&#39;)<br>perfumes[&#39;tags&#39;] = perfumes[[&#39;Top Notes&#39;, &#39;Heart Notes&#39;, &#39;Based Notes&#39;, &#39;Mood&#39;]].agg(&#39;, &#39;.join, axis=1)<br>perfumes[&#39;tags&#39;] = perfumes[&#39;tags&#39;].apply(lambda x: &#39;, &#39;.join(filter(None, x.split(&#39;, &#39;))))<br><br># Vectorize the tags<br>cv = CountVectorizer(max_features=5000, stop_words=&#39;english&#39;)<br>vector = cv.fit_transform(perfumes[&#39;tags&#39;]).toarray()<br>similarity = cosine_similarity(vector)<br><br># Filtered dataframe based on selected brand<br>def filter_by_brand(brand_name):<br>    return perfumes[perfumes[&#39;Brand&#39;] == brand_name][&#39;Product Name&#39;].tolist()<br><br># Recommendation function<br>def recommend_3(brand_name, perfume):<br>    index = perfumes[(perfumes[&#39;Brand&#39;] == brand_name) &amp; (perfumes[&#39;Product Name&#39;] == perfume)].index[0]<br>    distances = sorted(list(enumerate(similarity[index])), reverse=True, key=lambda x: x[1])<br>    recommended_perfumes = []<br>    for i in distances[1:6]:<br>        recommended_perfume = perfumes.iloc[i[0]]<br>        recommended_perfumes.append((recommended_perfume[&#39;Brand&#39;], recommended_perfume[&#39;Product Name&#39;]))<br>    return recommended_perfumes<br><br># Streamlit app<br>st.title(&#39;Perfume Recommender&#39;)<br><br># Dropdown list for selecting brand<br>brand_name = st.selectbox(&#39;Select a Brand&#39;, perfumes[&#39;Brand&#39;].unique())<br><br># Dropdown list for selecting product name based on selected brand<br>product_names = filter_by_brand(brand_name)<br>product_name = st.selectbox(&#39;Select a Product Name&#39;, product_names)<br><br># Button to trigger recommendation<br>if st.button(&#39;Show Similar Products&#39;):<br>    # Get recommendations<br>    recommendations = recommend_3(brand_name, product_name)<br>    <br>    # Display recommendations<br>    st.subheader(&#39;Similar Perfumes:&#39;)<br>    for i, recommendation in enumerate(recommendations, start=1):<br>        st.write(f&#39;{i}. {recommendation[0]} / {recommendation[1]}&#39;)</pre><p>On the webpage, when I pick my favorite local Indonesian perfume like below,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*NTEiWoaSeIYnXULBvgLIOQ.png" /><figcaption>Picking my favorite from the list</figcaption></figure><p>then clicking the button “Show Similar Products”, it’ll give me similar perfume based on cosine similarity calculated from the ingredients and moods data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gc0GecX4CamjhmdwIz9E9w.png" /><figcaption>Recommender system result</figcaption></figure><p>If anyone wants to take a look at the data, this the sheet of the perfume data:</p><p><a href="https://github.com/spdini/perfume_recommender/blob/main/Perfume%20Data.csv">https://github.com/spdini/perfume_recommender/blob/main/Perfume%20Data.csv</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2130b27778cc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Diving into Indonesian Skincare Reviews — Part 1: Sentiment Analysis]]></title>
            <link>https://medium.com/@syifaaddini/diving-into-indonesian-skincare-reviews-part-1-sentiment-analysis-788294efbd95?source=rss-929c81e8791f------2</link>
            <guid isPermaLink="false">https://medium.com/p/788294efbd95</guid>
            <category><![CDATA[indonesia]]></category>
            <category><![CDATA[sentiment-analysis]]></category>
            <category><![CDATA[word-cloud]]></category>
            <category><![CDATA[bahasa-indonesia]]></category>
            <dc:creator><![CDATA[Syifa Addini]]></dc:creator>
            <pubDate>Wed, 08 May 2024 10:27:31 GMT</pubDate>
            <atom:updated>2024-07-03T07:59:45.309Z</atom:updated>
            <content:encoded><![CDATA[<h3>Diving into Indonesian Skincare Reviews — Part 1: Sentiment Analysis</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*uCo6vnjFy5aJ83VoV_qp7A.png" /></figure><p>In a world of local Indonesian beauty brand, browsing reviews and testimonials are still an important way to decide for a customer to whether buy certain product or not. From a brand’s point of view, it’s also useful to learn for further development.</p><p>On May 3rd, I scrapped all 4,387 reviews of 5X Ceramide Barrier Repair Moisture Gel Moisturizer by Skintific from a beauty platform called Female Daily. So, for people who like it, what do they like from that product? What about those who dislike it, why do they dislike it?</p><h3><strong>Sentiment Analysis</strong></h3><p>To get those information, first we need to divide those 4,387 reviews into which ones are positive and which ones are negative. In Female Daily, they use 1 to 5 rating system. We will designate 4 and 5 are positive reviews, 1 and 2 are negative reviews, then what about 3 stars?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*DiW5BbLzycNmJtgoCo5J8g.png" /><figcaption>Total each of sentiments based on the rating</figcaption></figure><p>So, I am adapting the steps from this story <a href="https://medium.com/@yasirabd/sentiment-analysis-dengan-logistic-regression-50315cd2c836">https://medium.com/@yasirabd/sentiment-analysis-dengan-logistic-regression-50315cd2c836</a> to train the already decided Sentiments for 1, 2, 4, 5-stars reviews to decide the Sentiment for 3 stars reviews.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*QYNARynUE2_OjhjBjhKZIQ.jpeg" /></figure><ol><li>I prepared a much smaller document for this training (200 positives and 177 negatives), because unfortunately in the Preprocessing step, there is a lemmatization process that took too long to process thousand of review data.</li></ol><pre># import libraries<br>import pandas as pd<br>import numpy as np<br>import requests<br>import re<br><br># load dataset into pandas with specified encoding<br>data = pd.read_csv(&#39;review_skincare.csv&#39;, encoding=&#39;ISO-8859-1&#39;)<br>print(data.head())<br><br># check the number of positive and negative tweets<br>data[&#39;Sentiment&#39;].value_counts()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*usgFGdJgod5eLZp7Fu-e1Q.png" /><figcaption>A peek of my training docs</figcaption></figure><p>2. For defining the preprocessing function, I dutifully follow the steps, which are:</p><ul><li>Cleaning up each of the reviews from <em>punctuation, </em>URL, extra space, then transform into all lower case.</li><li>Removing stopwords</li><li>Stemming and Lemmatization</li><li>Tokenize each of the words into big array list.</li></ul><pre># pipeline preprocess<br>def preprocess(text):<br>    # cleaning text and lowercase<br>    output = cleaning_text(text)<br><br>    # remove stopwords<br>    output = remove_stopword(output)<br><br>    # stemming and lemmatization<br>    output = stemming_and_lemmatization(output)<br><br>    # tokenization<br>    output = tokenize(output)<br><br>    return output</pre><p>Example result on one of the positive reviews.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HNi9H46h1d4DqSI2ygUSFg.png" /><figcaption>Preprocess text result</figcaption></figure><p>3. Feature extraction steps are where we trained all of the 377 data of tokenized text.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SIO5BzZw1NRJb-yqIEMpmg.png" /><figcaption>Feature extraction</figcaption></figure><p>4/5. At the end of the training steps, we will have a custom function that will give us Prediction of the <em>h</em> value. If it’s bigger than 0.5, it’ll be closer to positive sentiments, less than 0.5, it’ll be closer to negative sentiments.</p><pre>import warnings<br><br># Ignore all warnings<br>warnings.filterwarnings(&quot;ignore&quot;)<br><br># predict single tweet<br>tweet1 = &#39;Awal coba ngerasa cocok. Tapi setelah diperhatikan, kondisi muka jadi lebih berminyak dan kusam. Memang dia ini mampu memperbaiki skin barrier ku saat rusak dengan tekstur yang ringan dan mudah menyerap aku oke bgtsih, namun untuk pemakaian rutin bisa membuat wajahku seperti raja minyak. Lama kelamaan dibiarin malah jadi beruntusan;(&#39;<br>tweet2 = &#39;Di kulitku gak begitu cocok, bikin kulit semakin oily, dan repair barier yang rusak juga gak secepat itu, dulu pas wajahku senstif aku beli ini tapi udah hampir habis 1 jar masih belum ada perubahan. Di aku kurang cocok. Dan aku gak pernah beli lagi&#39;<br>tweet3 = &#39;beli karena viral, tp maaf mungkin orang lain cocok tapi di aku nggak, semingguan pakai sempet berjerawat, kupikir itu purging tapi kok sampai jerawat batu. memang enak di muka dingin gitu, tapi aku nggak lanjut bahkan nggak aku habisin. sorry tapi aku repurchase sih tidak.&#39;<br><br>print( &#39;%s -&gt; %f&#39; % (tweet1, predict_tweet(preprocess(tweet1), freqs, theta)))<br>print( &#39;%s -&gt; %f&#39; % (tweet2, predict_tweet(preprocess(tweet2), freqs, theta)))<br>print( &#39;%s -&gt; %f&#39; % (tweet3, predict_tweet(preprocess(tweet3), freqs, theta)))</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d_PMZry9A4ZRPe11SSwsEw.png" /><figcaption>Prediction Result</figcaption></figure><p>So, the next step is to set up that prediction function to analyze a csv file full with all of my 3-stars review, then export the result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/1*nrqxzqMhM0hOSD9V6dmviQ.png" /></figure><p>After I get all of my reviews divided well into two category, positive and negative, then we will take a look at what make people like or dislike 5X Ceramide Barrier Repair Moisture Gel Moisturizer by Skintific.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/351/1*DbLDzcdd9EIKW_B4yBzV7A.png" /></figure><h3>WordCloud</h3><p>Easiest way to visualize talking points is utilizing WordCloud. For positive reviews, most common words are:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/1*5SONbX2JZs4Z1FOU0sQiFg.png" /><figcaption>Positive Reviews WordCloud</figcaption></figure><ul><li>moisturizer/moist/melembabkan/pelembab</li><li>tekstur</li><li>barrier</li><li>wangi (in terms of smell)</li><li>calming</li><li>hidrasi</li></ul><p>There are jerawat/bruntusan/kering/minyak too, but it mostly in neutral form, which means sometimes it helps with those problem, sometimes not, sometimes adding, but overall still good.</p><blockquote>Tipe pelembab kayak gini emang paling works di aku! Teksturnya lebih ke gel, warna putih-transparan, ga ada wangi yang mengganggu. Pas dipake gak yang langsung nyerep, harus ditunggu 1–2 menit dulu sampai nge-set. Buat di kulitku yang oily dia harus diset lagi pake bedak karena finishnya mukaku jadi keliatan berminyak banget. Setelah pake 1 jar, kulit aku bener2 ga ada masalah. Ga bikin komedoku tambah banyak, ga breakout, kalau ada jerawat hormonal pun dia bisa bikin area yang inflamed jadi lebih kalem. Cocok banget pokoknya.</blockquote><blockquote>wahh inisih kalo bisa kukasih bintang 9 mah udah pasti kukasih sih. sejauh ini dia ini jadi satusatunya moisturizer yang ngga does nothing on my skin alias beneran melembabkan yang sampe ke level menyerap ke dalam kulit dan bikin kenyal dan keliatan a bit lebih kenceng gitu. klaim moisturizenya juarak banget sih. tapi diluar itu ngga ada efek apa apasih, calming jerawat yg. meradang nggak bisa, bikin tekstur lebih halus juga nggak terlalu. tapi ngga ada tandingan sih kalo soal melembabkan yang versi nyaman banget dipake</blockquote><p>For negative reviews, most common words are:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*acL4d6OwiOpfspHEquCzNA.png" /><figcaption>Negative Reviews WordCloud</figcaption></figure><ul><li>jerawat</li><li>bruntusan</li><li>kering</li><li>minyak/oily</li></ul><p>Further looks into the sentences, indeed the vibes are negative, which means mostly this moisturizer adds to the problem.</p><blockquote>Tergiur sama iklan nya dimana-mana yg katanya bagus banget , tapi udah habis 2 jar untuk kulit kering ku gak ada pengaruh sama sekali malah timbul jerawat batu besar, mungkin kulit wajah aku emang yang gak cocok sama kandungan di skincare nya</blockquote><blockquote>tergiur karena banyak review di mereka cocok. alhasil cobain yg travel size dulu belinya buat pertama kalinya. tapi tidak sesuai ekspektasi, karena di aku selalu muncul bruntusan. jadi ya gak deh buat beli lagi. ga cocok di aku ternyata. hiks.</blockquote><h3>Topic Modelling</h3><p>There is another way of analyzing text that I am learning now, and will try take this reviews further. Below is one of example result of negative reviews topic modelling using Bertopic. Will we get clearer talking points? I write in <a href="https://medium.com/@syifaaddini/diving-into-indonesian-skincare-reviews-part-2-topic-modelling-using-bertopic-and-llama-2-45c87ab13810"><strong>part 2</strong></a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*lawEzN_cKoAzgwGRaYnYKQ.png" /><figcaption>Negative Reviews Topic Modelling</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=788294efbd95" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[K-means Clustering: Products’ Productivity]]></title>
            <link>https://medium.com/@syifaaddini/k-means-clustering-productivity-of-products-7439a4c6c944?source=rss-929c81e8791f------2</link>
            <guid isPermaLink="false">https://medium.com/p/7439a4c6c944</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[k-means-clustering]]></category>
            <category><![CDATA[retail-analysis]]></category>
            <dc:creator><![CDATA[Syifa Addini]]></dc:creator>
            <pubDate>Sun, 28 Apr 2024 10:17:03 GMT</pubDate>
            <atom:updated>2024-06-29T00:57:34.171Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*VlBiDs4VYqHWS1BTMqIuXg.png" /></figure><p>As I refreshing my knowledge on RFM segmenting, I realized that with the recent upgrades of CRM software, the RFM segmenting becomes so easy. While actually there’s manual way called K-means clustering, and there are a lot of writers on Medium writing about it too. I want to learn it how to program it well too using python.</p><p>Since there are few articles already about RFM using k-means, I want to use it for clustering another thing. From this article <a href="https://medium.com/web-mining-is688-spring-2021/using-k-means-to-segment-customers-based-on-rfm-variables-9d4d683688c8">https://medium.com/web-mining-is688-spring-2021/using-k-means-to-segment-customers-based-on-rfm-variables-9d4d683688c8</a>, I use the dataset and also replicate the steps to cluster the Products’ productivity.</p><ol><li>I excluded null and negative data and only used United Kingdom data.</li><li>To cluster the products’ productivity, I used two attributes: Quantity sold and Revenue which is coming from Quantity x UnitPrice. It will be great if there’s cost of product, but we will make do with this current dataset.</li><li>Created a new ‘stock’ table consist of CustomerID, Quantity, Revenue, then did logarithmic transformation and scaled those two variables.</li><li>After utilizing elbow method, also snake plot, I picked 4 as the best amount of clusters</li></ol><pre>import pandas as pd<br>import matplotlib.pyplot as plt<br>import seaborn as sns<br>from scipy import stats<br>import numpy as np<br>from sklearn.preprocessing import StandardScaler<br>from sklearn.cluster import KMeans<br><br># Load the dataset<br>df = pd.read_csv(&#39;Online Retail.csv&#39;, encoding=&quot;ISO-8859-1&quot;)<br><br># Limiting the country to UK since it&#39;s 91% of data<br>df = df[df.Country == &#39;United Kingdom&#39;]<br><br># Only considering positive values from Quantity<br>df = df[df.Quantity &gt; 0]<br><br># Filter out non-positive values from UnitPrice<br>df = df[df.UnitPrice &gt;= 0]<br><br>#Finding out Revenue<br>df[&#39;Revenue&#39;] = df[&#39;Quantity&#39;]*df[&#39;UnitPrice&#39;]<br><br># Grouping by StockCode and aggregating quantity and revenue<br>df[&#39;StockCode&#39;] = df[&#39;StockCode&#39;].str.lower()  # Convert StockCode to lowercase<br>stock_summary = df.groupby(&#39;StockCode&#39;).agg({&#39;Quantity&#39;: &#39;sum&#39;, &#39;Revenue&#39;: &#39;sum&#39;}).reset_index()<br><br># Renaming the columns for clarity<br>stock_summary.columns = [&#39;StockCode&#39;, &#39;Total Quantity Sold&#39;, &#39;Total Revenue Sold&#39;]<br><br># Removing Skewness<br>stock_summary_log = np.log(stock_summary[[&#39;Total Quantity Sold&#39;, &#39;Total Revenue Sold&#39;]] + 1)<br><br>#Standarized the product sold data by centring and scaling<br>scaler = StandardScaler()<br>scaler.fit(stock_summary_log)<br>stock_summary_scaled = scaler.transform(stock_summary_log)<br><br>#new stock_summary table<br>stock_summary_scaled = pd.DataFrame (stock_summary_scaled, columns = stock_summary_log.columns)<br><br># Define the number of clusters<br>num_clusters = 4<br><br># Create empty lists to store cluster labels and inertia values<br>cluster_labels_list = []<br>inertia_values = []<br><br># Create k-means model<br>kmeans = KMeans(n_clusters=num_clusters, random_state=42)<br><br># Fit the model on the scaled data<br>kmeans.fit(stock_summary_scaled)<br><br># Get cluster labels and inertia<br>cluster_labels = kmeans.labels_<br>inertia = kmeans.inertia_<br><br># Append cluster labels and inertia to the lists<br>cluster_labels_list.append(cluster_labels)<br>inertia_values.append(inertia)<br><br># Plot the clusters using t-SNE<br>plt.figure(figsize=(6, 6))  # Adjust the figure size<br>kmeans = KMeans(n_clusters=num_clusters, random_state=42)<br>cluster_labels = cluster_labels_list[0]<br><br># Fit the model on the scaled data<br>kmeans.fit(stock_summary_scaled)<br><br># Apply t-SNE to reduce dimensionality for visualization<br>tsne = TSNE(random_state=42)<br>tsne_data = tsne.fit_transform(stock_summary_scaled)<br><br># Plot the clusters<br>sns.scatterplot(x=tsne_data[:, 0], y=tsne_data[:, 1], hue=cluster_labels, palette=&#39;Set1&#39;, legend=&#39;full&#39;)<br>plt.title(&#39;t-SNE Visualization with {} Clusters&#39;.format(num_clusters))<br>plt.xlabel(&#39;t-SNE Dimension 1&#39;)<br>plt.ylabel(&#39;t-SNE Dimension 2&#39;)<br>plt.tight_layout()<br>plt.show()<br><br># Add cluster labels to the original RFM table<br>stock_summary[&#39;Cluster&#39;] = kmeans.labels_<br><br># Calculate mean values for Quantity and revenue for each cluster<br>cluster_means = stock_summary.groupby(&#39;Cluster&#39;).agg({<br>    &#39;Total Quantity Sold&#39;: &#39;mean&#39;,<br>    &#39;Total Revenue Sold&#39;: &#39;mean&#39;,<br>    &#39;StockCode&#39;: &#39;count&#39;<br>}).rename(columns={&#39;StockCode&#39;: &#39;Count of Data&#39;}).reset_index()<br><br># Print the table<br>print(cluster_means)</pre><p>So, this it the output I got.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*Px3fgz9L70T7zmoWylcXxw.png" /><figcaption>k-means clustering of products</figcaption></figure><p>Then, this is the count of each of the clusters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*3QJaipsAgRpElomy53KCIg.png" /><figcaption>Count of products’ productivity in each cluster</figcaption></figure><p>Since I don’t do any sorting, the clustering label was given randomly. So, from the table the most productive cluster is products in Cluster 0. It’s sold the most and gave the biggest revenue, however the total stock is in the third rank. Cluster 2 has the most stock, while in terms of productivity, it’s number 2.</p><p>Since we are ignoring the cost of production, we don’t actually know the profitability of each clusters. However, since at a glance that Cluster 0 has products that are selling well, perhaps the company should increase their stocks more.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7439a4c6c944" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cataloguing Indonesian Perfumes — Part 1: Python Text Analysis]]></title>
            <link>https://medium.com/@syifaaddini/cataloging-indonesian-perfumes-a6aa3a716dca?source=rss-929c81e8791f------2</link>
            <guid isPermaLink="false">https://medium.com/p/a6aa3a716dca</guid>
            <category><![CDATA[web-scrapping]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[indonesian-perfume]]></category>
            <category><![CDATA[perfumer]]></category>
            <category><![CDATA[perfume-notes]]></category>
            <dc:creator><![CDATA[Syifa Addini]]></dc:creator>
            <pubDate>Sun, 28 Apr 2024 09:18:04 GMT</pubDate>
            <atom:updated>2024-06-29T00:56:41.754Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*3SBgPY793DHF8TUHGMw8rQ.png" /></figure><p>As I see the increase of local Indonesian perfumery brands, which I love it so much. As a layman, with that so many choices, it just makes me more confused to choose. Who knows that perfume has so many ingredients to choose from.</p><p>The standard knowledge that I and many people know, perfume has three notes, top, mid/heart, then base notes. Then, the brands also usually write the mood or vibe of their products.</p><p>So I wonder, if I just cataloguing each ingredients of the notes based on certain category? I think it’ll be easier then to pick what kind of perfume I want to buy. So, I decided to scrap data of 100 perfumes out of 11 Indonesian brands using python script. Then categorizing the ingredients based on this link (<a href="https://www.fragrantica.com/notes/">f</a>ragrantica.com/notes) as a benchmark. This is the scrapped data that I got:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F3kmNnv5yNzrHSS46hErIw.png" /><figcaption>Sample of scrapped data</figcaption></figure><p>Turned out that for each of the notes, there are various mixed ingredients. So you can’t just say certain product has only spicy top notes.</p><p>So now, I’m curious to find out what is the most popular kind of ingredients for top, mid, and base. I make my next python script should not only be categorizing those ingredients individually, but also needs to count them.</p><pre>import csv<br>from collections import Counter<br>import matplotlib.pyplot as plt<br><br># Function to split ingredients and count occurrences (case-insensitive)<br>def count_ingredients(data):<br>    ingredient_counter = Counter()<br><br>    # Words to exclude<br>    exclude_words = [&#39;aromatic&#39;,.........]<br><br>    # Normalization mapping<br>    normalization_mapping = {<br>        &#39;red apple&#39;: &#39;apple&#39;,<br>        &#39;clean aldehydes&#39;: &#39;aldehydes&#39;,<br>        .....<br>        .....<br>        &#39;skin accord&#39;: &#39;skin&#39;<br>    }<br><br>    # Read category data from CSV file<br>    category_data = {}<br>    with open(&#39;Perfume Data - Notes Category.csv&#39;, newline=&#39;&#39;) as csvfile:<br>        reader = csv.reader(csvfile)<br>        for row in reader:<br>            # Check if there are two columns in the row<br>            if len(row) == 2:<br>                category_data[row[0].lower()] = row[1]<br><br>    for line in data:<br>        # Strip leading and trailing whitespaces from the line<br>        line = line.strip()<br>        <br>        # Split by comma, &quot;and&quot;, &quot;&amp;&quot;, convert to lowercase, and strip whitespace<br>        ingredients = [ingredient.strip().lower() for part in line.split(&#39;,&#39;) for ingredient in part.split(&#39; and &#39;) for part in ingredient.split(&#39;&amp;&#39;)]<br><br>        # Normalize ingredient names and categorize them<br>        for ingredient in ingredients:<br>            # Check if the ingredient is in the exclude list<br>            if ingredient in exclude_words:<br>                continue  # Skip processing this ingredient<br><br>            # Process the ingredient normally<br>            normalized_ingredient = normalization_mapping.get(ingredient, ingredient)<br>            category = category_data.get(normalized_ingredient, &#39;Other&#39;)<br>            ingredient_counter[normalized_ingredient, category] += 1<br><br>    return ingredient_counter<br><br># Read data from CSV file<br>with open(&#39;topnotes.csv&#39;, newline=&#39;&#39;) as csvfile:<br>    reader = csv.reader(csvfile)<br>    data = [row[0] for row in reader]<br><br># Count ingredients and categories<br>ingredient_counter = count_ingredients(data)<br><br># Print ingredient, category, and count sorted alphabetically by ingredient<br>print(&quot;Ingredient - Category - Count:&quot;)<br>for (ingredient, category), count in sorted(ingredient_counter.items(), key=lambda x: x[0][0]):<br>    print(f&quot;{ingredient} - {category} - {count}&quot;)</pre><p>This is the output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*JY29xOu8kdvOjISt7ehVSQ.png" /><figcaption>Text Processing Result</figcaption></figure><p>I use python to count and categorize, because the data scrapped from web could be very chaotic, so need to normalize them first (example: juicy tangerine becomes just tangerine) and the counting will be much more accurate than to do it manually. After I have the result, I move the result to excel to do the usual pivot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AYrG18l-fIjFDQLCj5dsvA.png" /><figcaption>Pivoting category of each notes</figcaption></figure><p>This is such a simple project, however as an sweet or powdery notes lover, it’s interesting for me to know that turned out <strong>Citrusy notes is the most common used for top notes. Then, Flowers for mid notes and Woody for base notes.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gvDBf71vRvbEDr7Tzxn85A.png" /><figcaption>Notes Categorizing Result</figcaption></figure><p><strong>Meanwhile</strong> for moods or vibes of the products, top 5 used words are<strong> floral, elegant, fresh, luxurious, and sweet</strong>. Those vibes have surprisingly similar formula.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tTi3BrWAts9TC2_uhMH0aA.png" /></figure><ul><li>For floral, sweet, and fresh vibe: flower, fruit, and citrus ingredients in the top and mid; while musky and woody for the base.</li><li>For elegant and luxurious vibe: flowery, fruits, and spice ingredients for top and mid notes; and also musky and woody for the base.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KHOdlYhtydd5mBIFRPWWIg.png" /><figcaption>Floral, Fresh, Sweet and Elegant, Luxurious vibe formula</figcaption></figure><p><em>In conclusion</em>, as a sweet or powdery notes lover, I think it’s easier for me to find sweet perfumes in the market :). Check out a simple Recommender System that me and you can use <a href="https://medium.com/@syifaaddini/cataloguing-indonesian-perfume-part-2-recommender-system-2130b27778cc"><strong>here</strong></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6aa3a716dca" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>