<?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 Nitindeep Singh on Medium]]></title>
        <description><![CDATA[Stories by Nitindeep Singh on Medium]]></description>
        <link>https://medium.com/@nitindeep19069?source=rss-b87669346747------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*DUPQklem6knrShK8</url>
            <title>Stories by Nitindeep Singh on Medium</title>
            <link>https://medium.com/@nitindeep19069?source=rss-b87669346747------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 20:38:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nitindeep19069/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[Aspect Based Ranking of Products]]></title>
            <link>https://medium.com/@nitindeep19069/ranking-of-products-for-a-specific-aspect-based-on-online-customer-reviews-f2f8a9fd0bc7?source=rss-b87669346747------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2f8a9fd0bc7</guid>
            <category><![CDATA[predictions]]></category>
            <category><![CDATA[sentiment-analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[information-retrieval]]></category>
            <category><![CDATA[nlp]]></category>
            <dc:creator><![CDATA[Nitindeep Singh]]></dc:creator>
            <pubDate>Thu, 21 May 2020 22:47:46 GMT</pubDate>
            <atom:updated>2020-05-25T20:05:47.158Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Problem in Real Life Scenario:</strong></h3><blockquote><strong>I</strong> need a laptop with best processor and display , all other specifications can be neglected but<strong> i am confused by looking at the abundant scattered online reviews.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OXDwbA00KcKL60d7B3gluw.jpeg" /><figcaption>Figure 1: Word Cloud of Data Set Used</figcaption></figure><h3>On the Basis of Aspects! Why?</h3><p><em>In today’s era we all are way too much into the e-commerce whether you are a customer or a supplier. Choosing product based on the overall rating mostly leads to unsatisfied customers. People now are more choosy in things and specifications of any product, so there is need of a information retrieval system that solves the issue by returning top k products for a particular aspect.</em></p><h3>Data-set used in the process</h3><p><em>The data-set that we have used is Multi-Domain Sentiment Data set. The Multi-Domain Sentiment Data set contains product reviews taken from Amazon.com for 4 domains: Electronics, Books, DVDs, and Kitchen. Each domain has several thousands of reviews. Reviews contain star ratings (1 to 5 stars).The data set is available in XML format, we have converted it to CSV and Pre-processing has been done on the data-set.Several useless columns have been deleted and the columns that are finally kept are </em><strong><em>Unique product id, product name, product type, rating, title, review text</em></strong><em>. The link for the data set is given below:</em></p><p><a href="http://www.cs.jhu.edu/mdredze/datasets/sentiment/domain_sentiment_data.tar.gz"><em>https://www.cs.jhu.edu/mdredze/datasets/sentiment/domain_sentiment_data.tar.gz</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tJ9wMiKglNx5YXQzINErGg.png" /><figcaption>Glimpse of the Pre-processed data set</figcaption></figure><h3>Journey in Achieving the System</h3><h4>Step 1- Analyzing the data set, creating ground truth</h4><blockquote><em>The first step done was creating the ground truth , if you are aware of ranking systems, you would be guessing that ground truth would have been created using the user rating of the product. </em><strong><em>Right? but No</em></strong><em> the task is much more deep than it looks like, the ground truth had to be on the basis of aspects , so the team manually annotated the products with a </em><strong><em>generalized score for each aspect mentioned for the product in the reviews</em></strong><em>. Looks quite laborious, yes it was but at the end, was worth the time spent. So finally we have manually annotated ranked products for certain aspects, we took 5 aspects for the purpose of evaluation.[</em><strong><em>Quality, Sound, Memory, Display, Screen</em></strong><em>]</em>.</blockquote><h4>Step 2- Average Rating of the products and PoS Tagging</h4><blockquote><em>Average score is calculated for every product using the user rating of each review for that product, for e.g a product has 5 reviews with the ratings [2 ,3 ,5, 4, 3], so the average rating of product will be </em><strong><em>3.4</em></strong><em>. After the average rating task is over, sentiment analysis of reviews comes into play. The reviews are parsed using </em><strong><em>Stanford Parser</em></strong><em> in which </em><strong><em>noun adjective pairs</em></strong><em> are fetched from the reviews. The </em><strong><em>noun words represent the aspects</em></strong><em> and their co-related </em><strong><em>adjective words</em></strong><em> represent the </em><strong><em>opinion of that aspect</em></strong><em>. How good or how bad the opinion is about the aspect is </em><strong><em>measured using the polarity of the adjective word</em></strong><em> which is explained in the next step and also other techniques for accurate sentiment analysis of the review text.</em></blockquote><h4><strong>Step 3- Aspect Count, Polarity and Aspect Score</strong></h4><blockquote><strong><em>T</em></strong><em>he polarity of the word is calculated using the </em><strong><em>Text Blob Library</em></strong><em> of python whose polarity method returns two values- </em><strong><em>polarity and specificity</em></strong><em>. The </em><strong><em>polarity</em></strong><em> values ranges from [-1,1] where -1 means strictly negative and 1 means strictly positive. Well that is not enough in my opinion, so lets began stage 2 of our sentiment analysis, okay, so what about</em><strong><em> inversion or negation words</em></strong><em> used before the opinion, Did something strike into your mind or was it already there. In either case, refer the image below to visualize my words. Let’s take a simple and common review text example to clear our thought “</em><strong><em>speakers are nice but not good display quality</em></strong><em>”, here the aspects are speaker and display with opinions nice and good respectively but we miss the ‘not’ used before good for display. These types of words are the </em><strong><em>inversion words</em></strong><em> and if these words are found , </em><strong><em>the polarity score of the aspect is multiplied with -1</em></strong><em> for fetching accurate semantics of the review. The aspect frequency is also counted and only vital and important aspects are considered for a product using a threshold of aspect frequency.</em></blockquote><p><strong><em>Step 2 and 3 are done for both the review title and review body text.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*J9y2igQLnW_ACbpltz8mZg.png" /><figcaption>Figure 2: Parts of Speech Tagging Process</figcaption></figure><h4>Step 4- Opinion Score Maximization algorithm</h4><blockquote><strong><em>S</em></strong><em>o till now we have calculated the opinion score of the aspects where we first referred the opinion words that describe the aspects and then we also considered the negation or inversion words to the opinion words that will negate the opinion score of the aspects of a product. This process is done separately for review title as well as the review body and finally we have two scores for an aspect of a product i.e. </em><strong><em>Body score and Title score</em></strong><em>. Now for the final computation of the scores we will introduce the </em><strong><em>average product rating</em></strong><em><br>that was computed in the beginning. We have developed </em><strong><em>two models, one that takes into account title score and the other without accounting title score in the final computation. </em></strong><em>The final score computation expression for both the models is given below:</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*oCegcQJtB6m7N0tZ86cWWg.png" /><figcaption>Figure 3: Expressions for final score computation</figcaption></figure><blockquote><em>,where the value of </em><strong><em>α</em></strong><em> =</em><strong><em>0.6</em></strong><em> and </em><strong><em>β = 0.4</em></strong><em>. These values are finalized after analyzing the results on multiple values. The values suggest that we are giving 60 % weightage to the title score and 40 % to the body score. Our analysis showed that giving more weightage to the title yields better and accurate results and its even justified because the opinion in the title has more impact than on the whole review text.</em></blockquote><h3>Output</h3><p>Finally we retrieve top 30 products for the aspect given as input:</p><h3>Evaluation Measures for the Output</h3><ol><li><strong>Precision:</strong> It is defined as the ratio of the relevant items retrieved in the retrieved results.</li><li><strong>Recall: </strong>It is defined as the ratio of the relevant items retrieved from total relevant items.</li><li><strong>Accuracy:</strong> Accuracy shows how many items are predicted correctly. It represents the overall performance of Retrieval system.</li><li><strong>F1-Score : </strong>In statistical analysis of binary classification, the F₁ score is a measure of a test’s accuracy. F1 score conveys the balance between the precision and the recall.</li><li><strong>NDCG@15</strong>: NDCG is calculated by dividing DCG by IDCG. Normalized DCG represents the list of relevant documents (ordered by their relevance) in the corpus up to position p.</li></ol><h3>Results</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EIal4d42beG-J0UtLo_CDA.png" /><figcaption>Figure 4: Evaluation Matrix for Model 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pesu0NytDdu6OeT8A3xzbA.png" /><figcaption>Figure 5: Evaluation Matrix for Model 2</figcaption></figure><p><em>From the results we can clearly see Model 1 overall performs much better than Model 2. The model 1 taking into account the title score is more accurate in retrieving the top best 30 products for a specific aspect.</em></p><h4>Graphs and Comparison of the models</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*UgUwPvyRlMA-TY7FaX25CQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*sPhFZ5EhOg-OQUJ7GQ3j5g.png" /><figcaption><strong>Figure 6: F- score of Model-1 (Left) and Model-2 (Right)</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*hDX4LqdWfv0ptjBVN6kFXw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*rPxdlF_EPY84Z68rZiPCnw.png" /><figcaption><strong>Figure 7: Precision-Recall Curve of Model-1 (Left) and Model-2 (Right)</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*Vv7pQRo_aE1yW1ukZPRI5w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*2nceVYpLNVQU9ifJE7VaEQ.png" /><figcaption><strong>Figure 8: NDCG@15 of Model-1 (Left) and Model-2 (Right)</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*cKV8c-WzlLo4rst0PpLTYw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*nS6JfZUtMZSy6T4vJ5D5PA.png" /><figcaption><strong>Figure 9: Precision-Recall Curve of Model-1 (Left) and Model-2 (Right) for all Aspects</strong></figcaption></figure><h4>Comparing Accuracy of Models</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1pNY-eXc2pZeFWz6XePfKg.jpeg" /><figcaption>Figure 10: Accuracy Comparison of models</figcaption></figure><h3>“LIFE IS A JOURNEY, NOT A DESTINATION.” –RALPH WALDO EMERSON</h3><blockquote>This applies to learning, as well. The process of learning is more important than the end goals and should be ongoing always. The team aims to be in the learning phase forever and improve slowly, steadily but constantly.</blockquote><h3>References</h3><p>[1] Toshniwal, Neha M., Prof. D.V.Gore.”Ranking of Products on the Basis of Aspects- A Probabilistic Approach”. International Journal of Computer Trends and Technology (IJCTT)Volume 4 Issue 3, May — Jun 2016. ISSN: 2347–8578</p><p>[2] Eirinaki,Magdalini., Pisal,Shamita., Singh,Japinder..”Feature-based opinion mining and ranking”.Journal of Computer and System Sciences<br>Volume 78, Issue 4, July 2012.</p><h3>Team Contribution</h3><blockquote><strong>Nitindeep Singh:</strong> (Idea, Preprocessing, Data Analysis, PoS Tagging, Sentiment Analysis,Score Maximization Algorithm, Documentation)</blockquote><blockquote><strong>Akshaj Anil Patil:</strong> (Idea, Preprocessing, Data Analysis, Evaluation Analysis,Score Maximization Algorithm, Documentation)</blockquote><blockquote><strong>Ganesh Vilas Chaudhari:</strong> (Idea,Sentiment Analysis, Score Maximization Algorithm, Visualization, Documentation)</blockquote><h3>Special Regards:</h3><p>Dr. Tanmoy Chakraborty :</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2f8a9fd0bc7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>