<?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 Prateek Majumder on Medium]]></title>
        <description><![CDATA[Stories by Prateek Majumder on Medium]]></description>
        <link>https://medium.com/@prateekmaj21?source=rss-a44f6915bab7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*MGJs4L7sbTzOLprI6BI8iw.jpeg</url>
            <title>Stories by Prateek Majumder on Medium</title>
            <link>https://medium.com/@prateekmaj21?source=rss-a44f6915bab7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 08:17:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@prateekmaj21/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[How to use YRL to earn money as a Content Creator?]]></title>
            <link>https://prateekmaj21.medium.com/how-to-use-yrl-to-earn-money-as-a-content-creator-f418fd7b0fc7?source=rss-a44f6915bab7------2</link>
            <guid isPermaLink="false">https://medium.com/p/f418fd7b0fc7</guid>
            <category><![CDATA[blogger]]></category>
            <category><![CDATA[digital-marketing]]></category>
            <category><![CDATA[online-marketing]]></category>
            <category><![CDATA[content-marketing]]></category>
            <category><![CDATA[creators]]></category>
            <dc:creator><![CDATA[Prateek Majumder]]></dc:creator>
            <pubDate>Thu, 15 Jul 2021 07:13:12 GMT</pubDate>
            <atom:updated>2021-07-15T07:13:12.797Z</atom:updated>
            <content:encoded><![CDATA[<h4>Becoming an independent marketer with YRL</h4><p><strong>Content creators, writers and bloggers can earn in a lot of ways. But, what if there was a way via which anyone can earn in their free time. A way by which, anyone can earn by sharing links. Seems interesting, right?</strong></p><p>This is YRL. On YRL, you can become an independent marketer. The links can be shared anywhere you like- Medium, Facebook, Youtube, Instagram, Email or even Direct Messages.</p><p><a href="https://getyrl.com/">Let&#39;s Make the World Viral</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PmmFiobvpkSGgnA6VI9elg.png" /></figure><h4>How YRL works?</h4><p>After creating the account, creators can browse through the available campaigns. Creators can choose whichever campaign they like and claim their YRL. YRL links are personal links to marketing campaign sites/landing pages.</p><p>On click, they directly refer to the marketing campaign sites/landing pages. Next, creators can share the links on any platform they like.</p><p>What makes YRL different from traditional ADs is this part. Creators can share and promote something according to their niche, interests and audience. This makes the content relevant to their audience.</p><p>In the case of ADs, they are just spammy and cause a lot of inconveniences for the whole web surfing journey.</p><p>A good example of where to share YRLs would be a blog post or an article explaining the product/ service which is to be promoted.</p><h4>How to earn?</h4><p>Every time someone clicks on a YRL, creators get paid. And it happens in real-time. Basically, creators get paid to bring users to the businesses.</p><p>So, what happens is businesses instead of running ADs, pay creators to talk about their product, service or any other offering. Creators do the task of explaining everything to the world about what the business wants to promote.</p><p>Creators can promote anything in any way they like. YRL is all about making marketing and promotion simple and organic.</p><h4>YRL is currently available in:</h4><p>North America: USA, Canada</p><p>Europe: UK, Ireland, Germany, France, Italy, Spain, NORDICS</p><p>Asia: Japan, Singapore, India</p><p>YRL can help creators earn in an easy way. There is no entry barrier to join YRL. Normal people can also claim YRLs and promote them. Traditional affiliate marketing deals with mainly consumer goods, but with YRL, anything can be marketed. It can be a Youtube video or a SmartPhone landing page.</p><p>Get started with YRL now!</p><p><a href="https://getyrl.com/">Let&#39;s Make the World Viral</a></p><p>Thank You</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f418fd7b0fc7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[YRL: What is YRL all about?]]></title>
            <link>https://prateekmaj21.medium.com/yrl-what-is-yrl-all-about-8afa310fd762?source=rss-a44f6915bab7------2</link>
            <guid isPermaLink="false">https://medium.com/p/8afa310fd762</guid>
            <category><![CDATA[online-marketing]]></category>
            <category><![CDATA[viral-marketing]]></category>
            <category><![CDATA[promote-your-business]]></category>
            <category><![CDATA[online-business]]></category>
            <category><![CDATA[marketing-strategies]]></category>
            <dc:creator><![CDATA[Prateek Majumder]]></dc:creator>
            <pubDate>Tue, 13 Jul 2021 07:24:27 GMT</pubDate>
            <atom:updated>2021-07-13T07:24:27.978Z</atom:updated>
            <content:encoded><![CDATA[<h4>People use ads to promote something online, but could there be something better?</h4><p><strong>Businesses run a lot of ads to promote their product, service or any other offerings they have. But the problem is that people HATE ads. Many people use AD block tools and software to block online ads.</strong></p><p>Companies like Google and Facebook derive large parts of their revenue from ADs. Internet advertising revenue has increased many folds. But, the increase of online ADs has lead to visual pollution on websites and increased online clutter. News and Blog websites have the most ads. The websites take longer to load and consume a lot more mobile data. So, advertising on the internet has led to a decrease in speed and efficiency for users. Quality of User Experience has also degraded.</p><p><strong>But, what if we had something which can be an alternative to ads? A way to generate organic traffic and gain leads?</strong></p><h4>A great answer would be: YRL</h4><p><a href="https://about.getyrl.com/business/">Let&#39;s Make the World Viral</a></p><p>On YRL, businesses pay individual creators to market their products on every online platform. YRL makes the promotion of a business, product or service very easy.</p><p>Running ADs are tough, many times it can be quite complex and people are not able to properly run ADs. But creating a campaign on YRL is very easy and simple.</p><h4>How Businesses can use YRL to promote themselves?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c-MMdEiOr3K7Sqfrz7-ROw.png" /></figure><p>After logging into YRL, Create your YRL Campaign. Creation is a lot simpler, compared to ADs. One can promote their startup, website, video, landing page or anything else they care about.</p><p>Individual creators can find out about the campaign on YRL. Creators will claim their personal YRL links to the campaigns they like and want to promote.</p><p>Creators and bloggers market your YRL through their blog, content, videos etc. Every click on YRL links redirects to your site, and the Creators are paid from your campaign budget.</p><h4>How this model can be beneficial?</h4><p>ADs randomly promote your product. But in the case of YRL, the traffic and leads generated will be organic and more relevant. And, there is no limitation on what you want to promote. Basically, anything that has a URL can be promoted via YRL.</p><p>To find out more about how you can promote on YRL, check this:</p><p><a href="https://about.getyrl.com/business-faqs/">Let&#39;s Make the World Viral</a></p><p>YRL gives a way to promote something or a product in an entirely different way. Instead of spammy ADs, businesses can have a large number of people working for them as a marketing team. In this way, the promotion becomes a lot more personalized and people are more likely to convert from the promotion.</p><p>And a very good thing about YRL is that we don’t need to provide any posters or media to promote our content. Your landing page (URL) must have rich metadata and creators will promote your product/page the way they like.</p><p>Measuring performance is also very easy and simple. Just like Google Analytics, YRL also provides real-time performance metrics of the campaign. The metrics include the number of clicks with time, from referrers, geographies and devices.</p><h4>Check out YRL now!</h4><p><a href="https://about.getyrl.com/business/">Let&#39;s Make the World Viral</a></p><p>Thank You.</p><p>— — — — — — — — — — —</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8afa310fd762" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Wireframe and Mockup Tools]]></title>
            <link>https://prateekmaj21.medium.com/wireframe-and-mockup-tools-62287dbed0ea?source=rss-a44f6915bab7------2</link>
            <guid isPermaLink="false">https://medium.com/p/62287dbed0ea</guid>
            <category><![CDATA[design-thinking]]></category>
            <category><![CDATA[wireframe]]></category>
            <category><![CDATA[wireframing]]></category>
            <category><![CDATA[mockup]]></category>
            <category><![CDATA[design]]></category>
            <dc:creator><![CDATA[Prateek Majumder]]></dc:creator>
            <pubDate>Sat, 10 Jul 2021 07:19:16 GMT</pubDate>
            <atom:updated>2021-07-10T07:22:28.246Z</atom:updated>
            <content:encoded><![CDATA[<h4>Why are Wireframe and Mockup Tools important?</h4><p><strong>Wireframe and Mockup tools are important steps in turning any digital product into reality. A wireframe tool is used to create the basic blueprint of any app or website. A wireframe represents the basic structure, functions, and content of an application. On the other hand, a mockup introduces colours, style, typography, design and to an extent, the actual content and stuff the app is going to deal with.</strong></p><p>Using wireframes, we can show a basic overall idea of the application to clients and other stakeholders before proceeding with a design.</p><p>Wireframing makes the whole process of the creation of an app or website very easy and saves a lot of time. A Mockup gives a realistic idea of how things are going to look when the app/website is complete.</p><p><strong>A good Wireframe and Mockup tool is Claritee.</strong></p><p><a href="https://yrl.is/7SbPk5kx4Msg0njovPSM">Claritee | Free smart wireframe and mockup solution</a></p><p>Claritee is an easy-to-use wireframing and layout application that clarifies the initial phase of a project journey, enabling visual collaboration at the ideation stage for everyone involved.</p><figure><img alt="A wireframe, intentionally, looks like a drawing or a diagram so that the viewer can differentiate between the actual product and the ideation of the actual product. It normally has a greyscale colour palette. It mostly consists of boxes, lines, and text." src="https://cdn-images-1.medium.com/max/1024/0*0is1SwC2ctP7E1lF" /><figcaption><a href="https://www.pexels.com/@picjumbo-com-55570">picjumbo.com</a> on Pexels.com</figcaption></figure><p>A wireframe presents descriptions and core visuals of an app, including various user interactions and interface behaviour. Using a wireframe, we can understand how the app will look.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HfHCGQWgd6W2ZxWj" /><figcaption><a href="https://www.pexels.com/photo/silver-imac-on-top-of-brown-wooden-table-326502/">https://www.pexels.com/photo/silver-imac-on-top-of-brown-wooden-table-326502/</a></figcaption></figure><p>A mockup visually represents the features of an app as they are going to appear in the final version.</p><h3>Claritee</h3><p><a href="https://yrl.is/7SbPk5kx4Msg0njovPSM">Claritee | Free smart wireframe and mockup solution</a></p><p><em>Using Claritee, it is easy to transform abstract ideas into interactive visual product requirements with their smart guided content and easy-to-use states.</em></p><p><em>It is built for designers, project managers, business owners, marketers, and basically anyone with an idea.</em></p><h4>What is Claritee all about?</h4><ul><li>Offers a collaborative, agile, workspace that unifies team members at the ideation stage.</li><li>Low learning curve and therefore suitable for all — if you are technically inclined or not.</li><li>Replaces endless emails and written requirements with visual interactive wireframes, resulting in all team members being on the same page from the idea stage.</li><li>Enables accurate time estimates for tasks.</li><li>Web-based hub — Access your work online, no need to download any software.</li></ul><h4>Some great features of Claritee:</h4><ul><li>Smart content — Claritee guides you with the content you might need by offering drag&amp;drop section building blocks</li><li>Interactive site map tool</li><li>Interactive states editable from the canvas</li><li>Intuitive quick linking for working clickable previews of your wireframes</li><li>Extensive smart content library</li><li>Extensive library of drag&amp;drop Quick Elements</li><li>Containers — create a section once and use it across your project</li><li>Standard and custom canvas size options</li><li>Real-time live collaboration</li><li>Drawing tools</li><li>Responsive interactive table tool</li><li>Interactive preview on play</li><li>Mark canvas as ready</li><li>Conversations and notes</li><li>Timeline activity</li><li>Time estimations panel based on the wireframes you have created</li><li>My Images panel</li></ul><h4>Conclusion</h4><p>The whole design process consists of initial sketches, wireframes, mockups and finally the prototype.</p><p>In this process, wireframes and mockups serve as great ways to design and shape our app.</p><p><a href="https://yrl.is/7SbPk5kx4Msg0njovPSM"><em>Claritee is easy and simple to use and is a must-try.</em></a></p><p>— — — — — — — — — — — — —</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=62287dbed0ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Content Generation AI Tools: Are they the future of Content?]]></title>
            <link>https://medium.com/codex/content-generation-ai-tools-are-they-the-future-of-content-936c00187c14?source=rss-a44f6915bab7------2</link>
            <guid isPermaLink="false">https://medium.com/p/936c00187c14</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[content-marketing]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[content-creation]]></category>
            <category><![CDATA[nlp-training]]></category>
            <dc:creator><![CDATA[Prateek Majumder]]></dc:creator>
            <pubDate>Fri, 09 Jul 2021 05:33:14 GMT</pubDate>
            <atom:updated>2021-07-09T15:15:11.886Z</atom:updated>
            <content:encoded><![CDATA[<h4>Natural Language Processing (NLP) is a subpart of Artificial Intelligence that uses algorithms to understand and process human language. An Interesting use of NLP is AI-Enabled content generation.</h4><p>Content is very important these days. Among all the types of content, text content is very important as it answers our audience’s questions. Proper usage of content can help connect with customers, gain leads, build relations, and gain trust with people. Content Creation and Distribution are both important in this whole process.</p><p>AI is being used in many industries to help generate content. The beauty of AI-based content generation is that it can be used to create anything from a press release to an article or even a social media post. One of the biggest advantages for businesses using this technology is that they don’t have to invest in new staff and always have something fresh.</p><p><strong>The whole content creation process is time-consuming and often creating large amounts of content can be a tedious task. Is there anything that we can use, to help us automate the process of content generation, or at least make it easier?</strong></p><p>The answer is AI-enabled Content Generation Tools like Muse.</p><p><a href="https://yrl.is/MkLfg2yXW6E9GA0Klvn6">Muse Creative Content Assistant - Your Marketplace for Content Generation AI.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*U_G0qZsx3IRQ_KJS" /><figcaption>Image by <a href="https://www.pexels.com/@judit-peter-281675">Judit Peter</a> on Pexels.com</figcaption></figure><p><strong>AI-generated content can help in lead generation and conversion. For content to perform well on Search Engine results and be interesting to read, it must be engaging and of high quality.</strong></p><p>It is not possible to replace Human Intelligence, but the day a Content Writer might be facing a creative block, an AI-based content tool can help him/her get started with that blog or product description.</p><p>AI-based content generation, or content that is generated by a computer program and not a human, has been the focus of much attention in recent years. This type of technology aims to create personalized content for each customer or reader without using personal information about them. In a world where people have so many different tastes and preferences, it can be difficult to please everyone.</p><p><em>The Muse Content Generation tool can be used to create content for a wide variety of uses. They also have a live demo part where they showcase some of their tools.</em></p><p>The AI-Based content generation field has many prospects. The specific area of study which deals with such content generation is Natural Language Generation.</p><h4>There are many uses of such AI-based content generation:</h4><p><strong>Chatbots: </strong>Earlier, most of the use cases of Chatbots were knowledge-based or text corpus based chatbots. NLG can be used to create chatbots that can communicate with people by creating natural responses.</p><p><strong>Voice Assistants:</strong> NLG and content creation can also create voice assistants that can answer our queries based on our questions.</p><p><strong>Content Production: </strong>The main use of such tools and methods is to create text content like Emails, Tweets, Blog headers, Articles and so on. Many tools can also take long texts as input and give a summary.</p><p>AI-generated content is very commonly used these days in Marketing and Social media. Overall, it has made the customer journey very smooth. Companies are increasingly exploring how to use artificial intelligence to streamline their operations and improve customer service.</p><p><em>But does it mean that Content Writers will be out of jobs?</em></p><p>Doesn’t seem so. AI-Based content will serve as means to help content writers to create better content. Content Writers can use such tools to understand Content themes and the overall marketing context. Content writers can better understand the appropriate content paths that should be taken for better content curation. All these steps can help in better lead generation.</p><p>Check out Muse Content Creation Assistant:</p><p><a href="https://yrl.is/MkLfg2yXW6E9GA0Klvn6">Muse Creative Content Assistant - Your Marketplace for Content Generation AI.</a></p><p>— — — — — — — — — — — — — — — — — — —</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=936c00187c14" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/content-generation-ai-tools-are-they-the-future-of-content-936c00187c14">Content Generation AI Tools: Are they the future of Content?</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a Stock Market Analyser in Python]]></title>
            <link>https://medium.com/analytics-vidhya/creating-a-stock-market-analyser-in-python-c0284563b197?source=rss-a44f6915bab7------2</link>
            <guid isPermaLink="false">https://medium.com/p/c0284563b197</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[streamlit]]></category>
            <category><![CDATA[analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[stock-market]]></category>
            <dc:creator><![CDATA[Prateek Majumder]]></dc:creator>
            <pubDate>Mon, 19 Apr 2021 04:42:19 GMT</pubDate>
            <atom:updated>2021-04-19T17:15:23.202Z</atom:updated>
            <content:encoded><![CDATA[<h4>We shall be using Streamlit.</h4><p>Streamlit can be used to create simple and easy web apps in Python. Streamlit makes deveopment and deployment of Web Apps very easy. Check out the official streamlit website.</p><p><a href="https://streamlit.io/">Streamlit * A faster way to build and share data apps</a></p><h3>Understanding some Stock Market Terms</h3><p>Before we dive into creating the application on Streamlit, we will understand some Stock Market terminology. Accoring to Investopedia, “The stock market refers to the collection of markets and exchanges where regular activities of buying, selling, and issuance of shares of publicly-held companies take place.”</p><p>Read More-</p><p><a href="https://www.investopedia.com/terms/s/stockmarket.asp">Understanding the Stock Market</a></p><h4>Stock Codes</h4><p>A stock code definitionis an item of stock on a stock quotation scheme. Each unique code is made up of either numbers and letters or both. For example, Microsoft is listed as “MSFT” on NASDAQ and International Business Machines is listed as “IBM” on NYSE.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*BaqvgfhHaCpx9ToUJTwv8w.png" /><figcaption>Sample Stock Market Data.</figcaption></figure><p>Then, the high and low refer to the maximum and minimum prices in a given time period. Open and close are the prices at which a stock began and ended trading in the same period. Volume is the total amount of trading activity. Adjusted values factor in corporate actions such as dividends, stock splits, and new share issuance.</p><p><a href="https://analyzingalpha.com/open-high-low-close-stocks">What is Open High Low Close in Stocks?</a></p><h3>Moving Averages</h3><p>A moving average (MA) is a stock indicator that is commonly used in technical analysis. The reason for calculating the moving average of a stock is to help smooth out the price data over a specified period of time by creating a constantly updated average price.</p><p>A simple moving average (SMA) is a calculation that takes the arithmetic mean of a given set of prices over the specific number of days in the past; for example, over the previous 15, 30, 100, or 200 days.</p><p><a href="https://www.investopedia.com/terms/m/movingaverage.asp">Moving Average (MA): Purpose, Uses, Formula, and Examples</a></p><h3>OHLC Candle Stick Graph</h3><p>Candlestick charts are used by traders to determine possible price movement based on past patterns. Candlesticks are useful when trading as they show four price points (open, close, high, and low) throughout the period of time the trader specifies.</p><p>Many algorithms are based on the same price information shown in candlestick charts. Trading is often dictated by emotion, which can be read in candlestick charts.</p><p><a href="https://www.investopedia.com/terms/o/ohlcchart.asp">OHLC Chart Definition and Uses</a></p><h3>Getting into the Code</h3><p>First, we import the necessary libraries. Do write the code in a .py file.</p><pre>import warnings<br>warnings.filterwarnings(&#39;ignore&#39;)  # Hide warnings<br>import datetime as dt<br>import pandas as pd<br>pd.core.common.is_list_like = pd.api.types.is_list_like<br>import pandas_datareader.data as web<br>import numpy as np<br>import matplotlib.pyplot as plt<br>import seaborn as sns</pre><pre>from PIL import Image<br>import os</pre><pre>from mpl_finance import candlestick_ohlc<br>import matplotlib.dates as mdates<br>import streamlit as st</pre><p>Pandas datareader will be used to scrape the data. From mpl_finance, we shall be using the Candlestick charts.</p><p>Next, we will take the Stock code of the company, and also the starting date of the stock and the end date of the stock.</p><pre>#title<br>st.title(&#39;Stock Market App&#39;)<br>&#39;---------------------------------------------------------&#39;<br>#text<br>st.write(&quot;Developed by Prateek Majumder&quot;)</pre><pre>image = Image.open(os.path.join(&#39;STOCK.png&#39;))<br>st.image(image)</pre><pre>com = st.text_input(&quot;Enter the Stock Code of company&quot;,&quot;AAPL&quot;)</pre><pre>&#39;You Enterted the company code: &#39;, com</pre><pre>st_date= st.text_input(&quot;Enter Starting date as YYYY-MM-DD&quot;, &quot;2000-01-10&quot;)</pre><pre>&#39;You Enterted the starting date: &#39;, st_date</pre><pre>end_date= st.text_input(&quot;Enter Ending date as YYYY-MM-DD&quot;, &quot;2000-01-20&quot;)</pre><pre>&#39;You Enterted the ending date: &#39;, end_date</pre><p>Next, we will use pandas_datareader.data to gather the stock market data from Yahoo Finance.</p><pre>df = web.DataReader(com, &#39;yahoo&#39;, st_date, end_date)  # Collects data<br>df.reset_index(inplace=True)<br>df.set_index(&quot;Date&quot;, inplace=True)</pre><p>Next, we will plot some of the data we got from yahoo finance.</p><pre>#title<br>st.title(&#39;Stock Market Data&#39;)</pre><pre>&#39;The Complete Stock Data as extracted from Yahoo Finance: &#39;<br>df</pre><pre>&#39;1. The Stock Open Values over time: &#39;<br>st.line_chart(df[&quot;Open&quot;])</pre><pre>&#39;2. The Stock Close Values over time: &#39;<br>st.line_chart(df[&quot;Close&quot;])</pre><p>Take note, that in the code, I had given AAPL (Apple) and sample dates, these can be modified in the app GUI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1013/1*IYobdGghZsiYhgphBhediQ.png" /><figcaption>GUI for data entry.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*uScn6_wVc-S06GWW-V_mtA.png" /><figcaption>Data from Yahoo Finance.</figcaption></figure><p>Next, we code for displaying the moving averages.</p><pre>mov_avg= st.text_input(&quot;Enter number of days Moving Average:&quot;, &quot;50&quot;)</pre><pre>&#39;You Enterted the Moving Average: &#39;, mov_avg</pre><pre>df[&quot;mov_avg_close&quot;] = df[&#39;Close&#39;].rolling(window=int(mov_avg),min_periods=0).mean()</pre><pre>&#39;1. Plot of Stock Closing Value for &#39;+ mov_avg+ &quot; Days of Moving Average&quot;<br>&#39;   Actual Closing Value also Present&#39;<br>st.line_chart(df[[&quot;mov_avg_close&quot;,&quot;Close&quot;]])</pre><pre>df[&quot;mov_avg_open&quot;] = df[&#39;Open&#39;].rolling(window=int(mov_avg),min_periods=0).mean()</pre><pre>&#39;2. Plot of Stock Open Value for &#39;+ mov_avg+ &quot; Days of Moving Average&quot;<br>&#39;   Actual Opening Value also Present&#39;<br>st.line_chart(df[[&quot;mov_avg_open&quot;,&quot;Open&quot;]])</pre><p>It will look somewhat like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*gDoqzL9o2TnWYe1nj4V0pw.png" /><figcaption>Moving Average.</figcaption></figure><p>Now, we do the code for the OHLC Candle Stick Graph.</p><pre>ohlc_day= st.text_input(&quot;Enter number of days for Resampling for OHLC CandleStick Chart&quot;, &quot;50&quot;)</pre><pre># Resample to get open-high-low-close (OHLC) on every n days of data<br>df_ohlc = df.Close.resample(ohlc_day+&#39;D&#39;).ohlc() <br>df_volume = df.Volume.resample(ohlc_day+&#39;D&#39;).sum()</pre><pre>df_ohlc.reset_index(inplace=True)<br>df_ohlc.Date = df_ohlc.Date.map(mdates.date2num)</pre><pre># Create and visualize candlestick charts<br>plt.figure(figsize=(8,6))</pre><pre>&#39;OHLC Candle Stick Graph for &#39;+ ohlc_day+ &quot; Days&quot;</pre><pre>ax1 = plt.subplot2grid((6,1), (0,0), rowspan=5, colspan=1)<br>ax1.xaxis_date()<br>candlestick_ohlc(ax1, df_ohlc.values, width=2, colorup=&#39;g&#39;)<br>plt.xlabel(&#39;Time&#39;)<br>plt.ylabel(&#39;Stock Candle Sticks&#39;)<br>st.pyplot()</pre><p>Other code and images can be added to the webapp for creating a better experience and better understanding.</p><p>Running the streamlit app.</p><pre>streamlit run [filename]</pre><p>Read More : <a href="https://docs.streamlit.io/en/stable/">https://docs.streamlit.io/en/stable/</a></p><h3>App Deployed in Heroku :</h3><p>The app can also be deployed as a live app on heroku. For that purpose, we need to add —</p><p>procfile, requirements.txt, runtime.txt, setup.sh.</p><p>Read More : <a href="https://devcenter.heroku.com/articles/python-pip">https://devcenter.heroku.com/articles/python-pip</a></p><p><strong>Check out the full project on my Github Page :</strong></p><p><a href="https://github.com/prateekmaj21/Stock-Market-Analyser">prateekmaj21/Stock-Market-Analyser</a></p><p><strong>Do check out the live deployed Link :</strong></p><p><a href="https://stock-market-analyser.herokuapp.com/">Streamlit</a></p><p><strong>Do connect with me on Linkedin :</strong></p><p><a href="https://www.linkedin.com/in/prateek-majumder/">Prateek Majumder - Analyst - applex.in | LinkedIn</a></p><h4>Thank You.</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0284563b197" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/creating-a-stock-market-analyser-in-python-c0284563b197">Creating a Stock Market Analyser in Python</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Working on NLP with TextBlob]]></title>
            <link>https://medium.com/analytics-vidhya/working-on-nlp-with-textblob-56d0344bb648?source=rss-a44f6915bab7------2</link>
            <guid isPermaLink="false">https://medium.com/p/56d0344bb648</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[nltk]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <dc:creator><![CDATA[Prateek Majumder]]></dc:creator>
            <pubDate>Mon, 22 Mar 2021 15:46:26 GMT</pubDate>
            <atom:updated>2021-03-23T15:44:18.030Z</atom:updated>
            <content:encoded><![CDATA[<p>TextBlob is a Python Library for working with Text data. It provides simple API to dive into various Natural Language Processing Tasks.</p><p><a href="https://textblob.readthedocs.io/en/dev/index.html">TextBlob: Simplified Text Processing - TextBlob 0.16.0 documentation</a></p><p>Let us work on some NLP tasks using TextBlob. We shall work on some sentiment analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*xN44973EaSfhvT4Z.jpg" /><figcaption>NLP Meme.</figcaption></figure><p>We use the Trip Advisor reviews dataset, it has abourt 20,000 reviews with 1–5 star ratings on them.</p><p><a href="https://www.kaggle.com/andrewmvd/trip-advisor-hotel-reviews">Trip Advisor Hotel Reviews</a></p><pre><em>#importing the libraries</em><br><br>import os<br>import numpy as np <em># linear algebra</em><br>import pandas as pd <em># data processing, CSV file I/O (e.g. pd.read_csv)</em><br>from textblob import TextBlob<br>import nltk<br>from nltk.stem import WordNetLemmatizer<br>import matplotlib.pyplot as plt<br>%matplotlib inline</pre><pre><em>#reading the data</em><br>df = pd.read_csv(&quot;/kaggle/input/trip-advisor-hotel-reviews/tripadvisor_hotel_reviews.csv&quot;)</pre><p>We start by importing the libraries and importing the data.</p><pre>df.head()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*wGlb1kYQtABu3uy0FurMBQ.png" /><figcaption>The data looks like this.</figcaption></figure><p>Now, we look at how many times each data point is appearing.</p><pre>print(&quot;Star reviews and number of times they occur.&quot;)<br>df[&quot;Rating&quot;].value_counts()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*XqKFrEsIinyFIuaSyZAXXg.png" /><figcaption>Hotels have mainly ratings of 5 or 4.</figcaption></figure><p>Then there is a lot of stuff with normal NLTK, creating a frequency table, wordcloud etc. Have a look at the Kaggle Notebook for the entire code. (Link will be given below.)</p><h4>Using TextBlob</h4><p>We will use the in-built methods in TextBlob to generate review polarity and subjectivity.</p><pre>df_arr = df.to_numpy()</pre><p>But, before working with creating a classifier, we need to pass the data to Textblob functions, so we will pass the data into a python 2D list.</p><pre>for a <strong>in</strong> df_arr:<br>    text=a[0]<br>    testimonial = TextBlob(text)<br>    testimonial.sentiment<br>    polarity_arr.append(testimonial.sentiment.polarity)<br>    subjectivity_arr.append(testimonial.sentiment.subjectivity)</pre><p>Hence, we get the values for polarity and subjectivity. To consolidate the data, we pass them to our dataframe as well.</p><pre>df[&quot;Review_Polarity&quot;]=polarity_arr<br>df[&quot;Review_Subjectivity&quot;]=subjectivity_arr<br>df.head(3)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*ae4Is9hRy0_9acgHH1kmNw.png" /><figcaption>The new data added.</figcaption></figure><p>Understanding the features of the new data. We shall be using distribution plots for that.</p><pre>plt.figure(figsize=(15,8))<br>sns.distplot(df[&quot;Review_Polarity&quot;])</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/1*pze1qDESiaQX4ThgvC4bJw.png" /><figcaption>Polarity Distribution Plot.</figcaption></figure><pre>plt.figure(figsize=(15,8))<br>sns.distplot(df[&quot;Review_Subjectivity&quot;])</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*k60NOiTxHAtxlh6XJG240A.png" /><figcaption>Review Subjectivity distribution.</figcaption></figure><p>Now, before we get into working on the model, a few words. TextBlob library has many predefined functions, which make the works very easy. But it also means that, working on TextBlob needs high computational resources. I was not able to train the model on all 20,000 data points. So, went with only 1000 data points.</p><pre>from textblob.classifiers import NaiveBayesClassifier</pre><pre>df_model=df_arr[0:1000]</pre><pre>cl = NaiveBayesClassifier(df_model)</pre><p>Now, the model is trained, we can go and test on some sample text.</p><pre>cl.classify(&quot;The hotel is very good. Food was good, housekeeping could have been better. The staff was ok&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1005/1*B-pVsQB24iMt9NktxFxO6A.png" /><figcaption>5 star review.</figcaption></figure><pre>test_text=&quot;.before stay hotel arrange car service price 53 tip reasonable driver waiting arrival.checkin easy downside room picked 2 person jacuzi tub no bath accessories salts bubble bath did n&#39;t stay, night got 12/1a checked voucher bottle champagne nice gesture fish waiting room, impression room huge open space felt room big, tv far away bed chore change channel, ipod dock broken disappointing.in morning way asked desk check thermostat said 65f &quot;</pre><pre>cl.classify(test_text)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*ER_gAKf0wR_46W6rbtu3dQ.png" /><figcaption>3 star review.</figcaption></figure><p>So we can say that the classifier has been doing well. With better computational resources, model can be made to do better.</p><p>Have a look at the entire code.</p><p><a href="https://www.kaggle.com/prateekmaj21/hotel-reviews-nlp-using-textblob">Hotel Reviews NLP using TextBlob</a></p><p>Thank You.</p><p>My Linkedin Profile -</p><p><a href="https://www.linkedin.com/in/prateek-majumder/">Prateek Majumder - Analyst - applex.in | LinkedIn</a></p><p>My Github Profile -</p><p><a href="https://github.com/prateekmaj21">prateekmaj21 - Overview</a></p><p><strong>THANK YOU.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56d0344bb648" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/working-on-nlp-with-textblob-56d0344bb648">Working on NLP with TextBlob</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Probabability Sampling : Implementation in Python]]></title>
            <link>https://medium.com/analytics-vidhya/probabability-sampling-implementation-in-python-b7d3749eeedb?source=rss-a44f6915bab7------2</link>
            <guid isPermaLink="false">https://medium.com/p/b7d3749eeedb</guid>
            <category><![CDATA[probability]]></category>
            <category><![CDATA[sampling]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[analytics]]></category>
            <dc:creator><![CDATA[Prateek Majumder]]></dc:creator>
            <pubDate>Mon, 08 Feb 2021 13:27:17 GMT</pubDate>
            <atom:updated>2021-02-08T16:23:52.832Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Probabability Sampling : Implementation in Python</strong></h3><p><strong>Data are facts or statistics which can be used for reference and analysis.</strong> The entire data available is called <strong>population</strong>. The data which we are going to use for our use in analytics/ ML etc is known as <strong>sample</strong>. Sample is basically a subset of the population.</p><p>A real life example of population would be all the colleges in India and the sample would be the Engineering colleges in Kolkata, India.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YtGy6VPQ8jYjmDfv.png" /><figcaption>Population vs Sample.</figcaption></figure><h4>What is probability sampling?</h4><p>Probability sampling is a sampling method in which the samples are chosen from a larger population using a method based on the theory of probability. <strong>The most important requirement of probability sampling is that every data in the population has a known and equal chance of getting selected.</strong></p><h4>Random Sampling</h4><p>In this type of sampling, each member of the population has equal chance of being in the sample. In this method, samples are selected randomly. A sample chosen randomly is meant to be an unbiased representation of the total population. Let us implement Random Sampling in Python. We take the Employee’s Monthly Salary Sample Dataset.</p><p><a href="https://www.kaggle.com/jb1433/sample-employees-monthly-salary">Sample - Employee&#39;s Monthly Salary</a></p><p>Let us start by reading the data.</p><pre>import numpy as np <br>import pandas as pd<br><em>#read the data</em><br>df=pd.read_csv(&quot;/kaggle/input/sample-employees-monthly-salary/Employee_monthly_salary.csv&quot;)</pre><pre>df.head()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3rDJJQVlhvaexj1OnDAxog.png" /><figcaption>Data Overview.</figcaption></figure><p>In python, Random sampling is very easy to implement, using the .sample() function.</p><pre><em>#taking 200 units</em><br><br>df.sample(200)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9YyW1yM6ab6f0YQkGLYwag.png" /><figcaption>Random Sampling.</figcaption></figure><p>Random sampling is one of the easiest forms of collecting data from the total population. Under random sampling, each member of the population carries an equal opportunity of being chosen as a part of the sampling process.</p><h4>Systematic Sampling</h4><p><strong>Systematic sampling is a probability sampling method where elements from a target population are chosen by selecting a random starting point and selecting sample members after a fixed ‘sampling interval.’</strong> This is implemented easily by selecting each ‘N’th element. Systematic sampling ensures that the full population is represented fairly.</p><p>Here, we do systematic sampling, choosing every 10th element.</p><pre>df.iloc[0:1802:10]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ILXVRIL7Pv8eBGnmIL7D0w.png" /><figcaption>Systematic Sampling.</figcaption></figure><h4>Stratified Sampling</h4><p><strong>Stratum is a subset of the population having at least one common characteristic. Further sampling is done to select sufficient number of samples from each stratum.</strong> Stratified sampling is a common sampling technique used when trying to draw conclusions from different sub-groups or strata.</p><p>Here, we do stratified sampling. First we choose only male data points, then we choose random data points. Similar can be done for the female data points, finally an aggregate of the data can be taken.</p><pre>df_male=df[df[&quot;Gender&quot;]==&quot;M&quot;]<br>df_male.head()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5H0R-oPTf6wAkNQb6tNjfQ.png" /><figcaption>Male Data points.</figcaption></figure><pre>df_male.sample(100)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1015/1*rPMP2hN7ZnWDGzR-HBubSg.png" /><figcaption>Random Sampling on the Male Only data.</figcaption></figure><p>Similar steps can be executed for the female data.</p><p>For the entire code-</p><p><a href="https://www.kaggle.com/prateekmaj21/statistics-for-ds">Statistics for DS</a></p><p>So, we can understand that sampling is an important concept in Analytics and Data Science. It ensures that we get a workable data subset on which we can work.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b7d3749eeedb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/probabability-sampling-implementation-in-python-b7d3749eeedb">Probabability Sampling : Implementation in Python</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Digital Marketing: Few Personal Thoughts]]></title>
            <link>https://prateekmaj21.medium.com/digital-marketing-few-personal-thoughts-2a7d422efa39?source=rss-a44f6915bab7------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a7d422efa39</guid>
            <category><![CDATA[marketing]]></category>
            <category><![CDATA[online-marketing]]></category>
            <category><![CDATA[digital-marketing]]></category>
            <category><![CDATA[search-engine-optimizati]]></category>
            <category><![CDATA[digital-transformation]]></category>
            <dc:creator><![CDATA[Prateek Majumder]]></dc:creator>
            <pubDate>Tue, 24 Nov 2020 10:14:20 GMT</pubDate>
            <atom:updated>2020-11-24T10:14:20.707Z</atom:updated>
            <content:encoded><![CDATA[<p>Marketing now a days deals much more than a company or business trying to sell its products. According to Investopedia,</p><blockquote>Marketing refers to activities a company undertakes to promote the buying or selling of a product or service. Marketing includes advertising, selling, and delivering products to consumers or other businesses. Some marketing is done by affiliates on behalf of a company.</blockquote><p>But modern marketing is a lot more than that. The art of storytelling and connecting to the customer and building an overall reputation of the company/brand/business is also very important. Companies do a lot these days to innovate their marketing process. While some companies might be running thousands of dollars of Facebook and Google Ads, others choose to be different and focus on innovative methods.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/0*v1fPXh3TICe2yUHA" /><figcaption>Tesla CyberTruck Launch</figcaption></figure><p>Everyone remembers the Tesla CyberTruck launch. Well, according to me, it was an act of marketing for the cybertruck. The memes and publicity created about the Cyber Truck were many and naturally it did good for the company.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/987/1*cPMQb6OVrR3hQu9zsKaayw.png" /><figcaption>Digital Marketing takes a lot of effort these days.</figcaption></figure><p>New age Digital Marekting is a lot complex and technical. For Digital Marketing, businesses leverage digital channels like <em>Social Media, Email, Blogs and Search Engines</em> to connect to their customers and to grow their sales. Search Engine Optimisation lets you rank higher organically on the search engine results. SEO generally improves the traffic to our websites. SEO has a lot of stuff involved and involves a lot of web development as well. A well designed website ranks higher than a website with poor sitemaps and not so well designed pages. Good description and meta tags of the website also leads to better SEO. Image file compression, structured data and CSS file optimization also help in SEO.</p><p>Blogs, newsletters and other content which are meant for the user/customers to read/see are aslo important. Structuring these contents is also important. Well structured content with good keywords leads to better online visibility.</p><p><strong>Let me explain, say you are a customer searching for customized printed t shirts. If a company making such t shirts has blogs and contents out there regarding such t-shirts, it will be easier for potential customers to find them. Building a good brand value and image also helps. We see a lot of companies with good brand image and reputation. And building that is equally important for digital marketing. We see a lot of companies doing online campaigns and creating a lot of hype and attention on social media. These are always efforts to create brand value.</strong></p><p>Personally, while I have been working on Digital Marketing, I feel knowledge of Web Development, Social Media, Graphic Design, Content Creation skills and general creativity are important. Digital Marketing is an art, it is now more about creating a good image of the business so that people buy the products. There are a lot of times when you need to find creative ideas and progress on the goals. It can be tough, and at the same time very very interesting. Creating new content, choosing designs, thinking what content to be posted when, all these require good amount of thoughts and foresight.</p><p>For example, say for Social Media, there needs to be a well defined social media strategy and planned posts. Posting a lot of random unplanned content will not help. Thinking what might be relevant from the customer side also helps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yYGXLRXpHynUx2RzOGvXAQ.jpeg" /><figcaption>A highly digital world.</figcaption></figure><p>With a large part of world’s population now online and millions of users online everyday, Digital Marketing is also highly important for companies to survive in ths competitive market. Where, there might be 5 alternatives for the product your company is selling, with Digital Marketing, selling them will be a lot easier.</p><p>_______________________________________</p><p><strong>Thank You</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a7d422efa39" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Announcing to the Right Audience]]></title>
            <link>https://prateekmaj21.medium.com/announcing-to-the-right-audience-37148fbcbcdb?source=rss-a44f6915bab7------2</link>
            <guid isPermaLink="false">https://medium.com/p/37148fbcbcdb</guid>
            <category><![CDATA[community]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[communication]]></category>
            <category><![CDATA[innovation]]></category>
            <category><![CDATA[announcements]]></category>
            <dc:creator><![CDATA[Prateek Majumder]]></dc:creator>
            <pubDate>Sat, 07 Nov 2020 04:09:30 GMT</pubDate>
            <atom:updated>2020-11-07T05:07:24.278Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Being an engineering student, I’m surprised that even today for sharing announcements, people still go door to door in apartment complexes and Local businesses still rely on flyers and pamphlets to attract customers. To spread a word in the local community, people are still depending upon phone calls and word of mouth.</blockquote><p>Announce; a new platform to create and view announcements based on location could fill this gap.</p><p><a href="https://announce.today/">Announce: Relevant Information at the right place, at the right time.</a></p><p>While using Announce, if I want to create an announcement, I can define the area where it will be visible. By drawing the area on the map, I mark the geographical boundaries within which users can view announcements. The demarcation of the boundaries can be done using a stylus, touch or mouse depending on the device I am using. The feature makes it easy for me to set who gets the announcement and who does not. It is very easy to draw out the location, with this feature, I can even specify which areas of the neighborhood will be receiving the announcements and which areas won’t be.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Tcc-pxGY7zBfDYne" /><figcaption>Creating Announcements on Announce</figcaption></figure><p>While creating an announcement, I need to add a title to the announcement, select the category of the announcement. Next comes other important details like the announcement expiration date and details like website, phone number (for contact) and venue information. Adding all this information is very easy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*22OE1ahZro1nZhCv_n4P8g.jpeg" /><figcaption>Marking the area on the map where the announcement will be visible</figcaption></figure><p>After adding the details, I can draw the area on the map where this announcement is relevant. These things are very easy, and anyone can use Announce to create their own announcements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_4Ez6pTaaVoyd7CH" /><figcaption>After adding all the details, I can click on “Submit” and the announcement will be created</figcaption></figure><p>Finally after adding all the relevant information, submit and the announcement will be created. Users using the application will now be able to see the announcement I made.</p><p>To stay informed about the places you care, follow them on</p><p><a href="https://announce.today/">Announce: Relevant Information at the right place, at the right time.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37148fbcbcdb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Natural Language Processing with Restaurant Reviews (Part 3)]]></title>
            <link>https://medium.com/analytics-vidhya/natural-language-processing-with-restaurant-reviews-part-3-2e08da61b8e5?source=rss-a44f6915bab7------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e08da61b8e5</guid>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[tech-blog]]></category>
            <category><![CDATA[classification]]></category>
            <dc:creator><![CDATA[Prateek Majumder]]></dc:creator>
            <pubDate>Sun, 18 Oct 2020 08:19:40 GMT</pubDate>
            <atom:updated>2020-10-18T15:48:14.860Z</atom:updated>
            <content:encoded><![CDATA[<p>Till now, in the previous two parts of this blog, we worked on the analysis of the data, and created the machine learning classifier model to predict whether a given review is positive or negative.</p><p>Links to previous parts-</p><ul><li><a href="https://medium.com/analytics-vidhya/natural-language-processing-with-restaurant-reviews-part-1-46e228585a32">Natural Language Processing with Restaurant Reviews (Part 1)</a></li><li><a href="https://medium.com/analytics-vidhya/natural-language-processing-with-restaurant-reviews-part-2-ad240d1a7393">Natural Language Processing with Restaurant Reviews (Part 2)</a></li></ul><p>Let’s start by using the classifier to do a test prediction.</p><pre><em>#doing a test prediction<br></em>test = [&quot;the food was not very good, it was very rotten and tasted bad&quot;]<br><br><em>#transforming for using on the model (using the count vectorizer)<br></em>test_vec = cv.transform(test)<br><em>#0= not liked<br>#1= liked the food</em></pre><pre>classifier.predict(test_vec)[0]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/1*dg-qvMxDUPcTC5iXukLeQg.png" /><figcaption>The Output.</figcaption></figure><p>The output gave “0” which is the class for a negative review. So, we can understand that the model is working fine.</p><h3><strong>Saving the model and text corpus using Pickle</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/0*b-ICQsfFowL2fvsk.jpg" /><figcaption>Real life pickles :)</figcaption></figure><p>Well in real life, pickles are used to store food for longer time and to preserve food. Similarly, in Python <strong>pickle </strong>can be used to store Machine Learning models as a file for later use. To read more on pickle in Python, visit-</p><p><a href="https://www.tutorialspoint.com/python-pickling">Python Pickling</a></p><p>The code to proceed-</p><pre><em>#saving the model</em><br><strong>import</strong> <strong>pickle</strong></pre><pre>filename = &#39;reviews_classifier.sav&#39;<br>pickle.dump(classifier, open(filename, &#39;wb&#39;))</pre><p>This will save the Classifier model as a .sav file in the local directory of your Jupyter notebook/Python IDE.</p><p>Now we also have to save the corpus for later use. In linguistics and NLP, <strong>corpus</strong> (literally Latin for body) refers to a collection of texts. Here the corpus is the collection of all the reviews. We shall be needing the corpus to be able to use the count vectorizer for our model. When we use a new input, it should be such that it can be fed to the model. So for that the count vectorizer will be needing the corpus. So we proceed with saving the corpus.</p><pre><em>#saving the corpus</em><br><br>type(corpus)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/236/1*dwHrqhLA73_r_9O-RDaOEw.png" /><figcaption>The corpus is actually a list.</figcaption></figure><pre><strong>with</strong> open(&#39;corpus.data&#39;, &#39;wb&#39;) <strong>as</strong> filehandle:     <br><em># store the data as binary data stream</em>     <br>    pickle.dump(corpus, filehandle)</pre><p>So we save the <strong>corpus </strong>as a file as well. It gets saved as <strong>corpus.data</strong>.</p><h3>Creating a .py executable file to run the classifier</h3><p>We shall be loading the corpus as well the model from thier files.</p><pre>import pickle<br>from sklearn.feature_extraction.text import CountVectorizer</pre><pre>#model filename<br>filename = &#39;reviews_classifier.sav&#39;</pre><pre>loaded_classifier = pickle.load(open(filename, &#39;rb&#39;))</pre><pre>cv = CountVectorizer(max_features = 2000)</pre><pre>#loading the corpus</pre><pre>with open(&#39;corpus.data&#39;, &#39;rb&#39;) as filehandle:<br>    # read the data as binary data stream<br>    corpus = pickle.load(filehandle)<br>#fitting the count vectorizer with the corpus<br>cv.fit_transform(corpus)</pre><p>Now we shall work on the python code, pretty much everything now is simple python code.</p><pre>print(&quot;Welcome to the Restaurant Review analyser&quot;)<br>print(&quot;The output will be either positive or negative.&quot;)<br>print(&quot;A count vectorizer was used&quot;)<br>print(&quot;---------------------------------------------------&quot;)<br>user_input=input(&quot;Enter the review of the restaurant:  &quot;)</pre><pre>test = [user_input]<br>test_vec = cv.transform(test)</pre><pre>val=loaded_classifier.predict(test_vec)[0]</pre><pre>print(&quot;---------------------------------------------------&quot;)</pre><pre>if(val==0):<br>    print(&quot;The review entered was negative.&quot;)    <br>    print(&quot;The user did not like the restaurant.&quot;)</pre><pre>if(val==1):<br>    print(&quot;The review entered was positive.&quot;)<br>    print(&quot;The user liked the restaurant.&quot;)</pre><p>This code if executed will give the user a choice to enter the review in plain English and will give an output where the review was positive or negative. This project is overall implementation of the basic NLP techniques.</p><p>One of the main goals of NLP is to derive meaning from human language in a smart and useful way. More advanced applications include text summarization, topic extraction, sentiment analysis, relationship extraction and much more. Follow me to know about Machine Learning, Data Science, NLP and much more.</p><p>The Github Repo having all project files-</p><p><a href="https://github.com/prateekmaj21/Restaurant-Reviews-NLP-Project">prateekmaj21/Restaurant-Reviews-NLP-Project</a></p><p><em>Do give a star if you like the work.</em></p><p><strong>Thank You.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e08da61b8e5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/natural-language-processing-with-restaurant-reviews-part-3-2e08da61b8e5">Natural Language Processing with Restaurant Reviews (Part 3)</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>