<?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 Rajanna on Medium]]></title>
        <description><![CDATA[Stories by Rajanna on Medium]]></description>
        <link>https://medium.com/@krajanna?source=rss-b636b6a4ccf4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*h6hnb07zvq-HpiaX9avEtA.jpeg</url>
            <title>Stories by Rajanna on Medium</title>
            <link>https://medium.com/@krajanna?source=rss-b636b6a4ccf4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 14:06:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@krajanna/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[Gradient Boosting Machine (GBM) algorithm made simple]]></title>
            <link>https://krajanna.medium.com/gradient-boosting-machine-gbm-algorithm-made-simple-161b1579bfa3?source=rss-b636b6a4ccf4------2</link>
            <guid isPermaLink="false">https://medium.com/p/161b1579bfa3</guid>
            <category><![CDATA[gradient-boosting]]></category>
            <category><![CDATA[ensemble-learning]]></category>
            <dc:creator><![CDATA[Rajanna]]></dc:creator>
            <pubDate>Thu, 20 May 2021 07:15:20 GMT</pubDate>
            <atom:updated>2021-05-20T07:29:31.617Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Breaking down the GBM algorithm with simple explanation</blockquote><h3><strong>Motivation</strong></h3><p>GBM is a supervised ensembling algorithm. I know initially many of us are confused to picturize with the way GBM works and would have spend lots of hour on internet to decipher the working principle.</p><p>Here I have made a small attempt to break it down.</p><p>Please note that I will not be covering theoretical aspect of GBM (for now) since there are sufficient blog available.</p><p>Let’s get started.</p><h3>Brief</h3><p>Ensembling is a technique to combine several weak learner to create strong learner for better performance than single model.</p><p>Audience poll would be one of better analogy to view this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CqwiBbnIqR_R2GtUJthNkQ.png" /><figcaption><a href="https://quantdare.com/what-is-the-difference-between-bagging-and-boosting/"><strong>https://quantdare.com/what-is-the-difference-between-bagging-and-boosting/</strong></a></figcaption></figure><ul><li><strong>Bagging </strong>is a simple ensembling technique in which we build many <em>independent </em>predictors/models/learners and combine them using some model averaging techniques. (e.g. weighted average, majority vote or normal average)</li><li><strong>Boosting </strong>is an ensembling technique in which the predictors are not made independently, but sequentially by reducing residuals error b/w each models.</li></ul><p>Since there are many theoretical explanation on the web and my focus would be more on practical understanding of working principle behind GBM. Let’s get started.</p><h3><strong>Gradient boosting algorithm</strong></h3><blockquote>Building a model from the training data, then creating a second model that attempts to correct the errors from the first model. Models are added until the training set is predicted perfectly or a maximum number of models are added.</blockquote><p>Here we will be discussing regression problem below :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/305/1*2lNN2dfwX1is4i3q6tWjow.png" /></figure><p>GBM will use below equation to build the model (<strong>Don’t be scared 😱) </strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*cMc8YrJrgU9rJ4_8ya2UGA.png" /></figure><p>It is not that complex as it looks. Let’s break it down :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A4nmtiL8b-4u1RxyPvAcSw.png" /></figure><p>For simplicity, I have made excel computation for each tree and please go through how the model flows from Tree 1 to Tree 3.</p><p>This gives you a clear understanding of the working principle and I have limit the explanation to only 3 trees.</p><p>You can notice that the error residuals are reducing between one tree to another tree model.</p><h3>Reference :</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F3CC4N4z3GJc%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D3CC4N4z3GJc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F3CC4N4z3GJc%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/bb1f809cfc1d59d2b1552753b1f3bfac/href">https://medium.com/media/bb1f809cfc1d59d2b1552753b1f3bfac/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=161b1579bfa3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ProText — Comprehensive unstructured data Preprocessing & Feature extraction package for NLP —…]]></title>
            <link>https://krajanna.medium.com/protext-comprehensive-unstructured-data-preprocessing-feature-extraction-package-for-nlp-c4b5f737ee37?source=rss-b636b6a4ccf4------2</link>
            <guid isPermaLink="false">https://medium.com/p/c4b5f737ee37</guid>
            <dc:creator><![CDATA[Rajanna]]></dc:creator>
            <pubDate>Wed, 24 Feb 2021 17:00:14 GMT</pubDate>
            <atom:updated>2021-02-25T12:44:58.038Z</atom:updated>
            <content:encoded><![CDATA[<h3>ProText — Comprehensive unstructured data Preprocessing &amp; Feature extraction package for NLP — Part 2 of 2</h3><blockquote>Consolidation of all text cleaning and feature extraction functions under single package 👏</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D7979MuL2w47vWI1kOB2Ug.jpeg" /></figure><p>I have covered the unstructured text data pre-processing concept, steps and usage guide for ProText package in part 1.</p><p>Similar to text preprocessing, <strong>Feature extraction</strong> is also a very important step which is a process of converting text into numeric form and also dimensionality reduction for processing.</p><h3>Feature extraction</h3><p>Most popular feature extraction algorithms are CountVectorizer and TFIDF.</p><p><strong>CountVectorizer</strong> count the number of times a word appears in the document. Gives higher score to most repeated words.</p><p><strong>TFIDF</strong> will give higher scores to less repeated words and thus they’ll be the ones that the model identifies as important and tries to learn.</p><blockquote>In the interest of time and continuity of flow from part 1, I will not go deep in to the concept of feature extraction.</blockquote><p>Feature extraction is the next stepping stone post pre-processing as shown below :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*oCG7iYVQZGzeiyXYwAndcQ.png" /></figure><h3>Existing work on feature extraction</h3><p>Most commonly <strong>scikit-learn</strong> is used for CountVectorizer and TFIDF algorithms.</p><h3>Why this package / Objective ?</h3><p>Even though CountVectorizer and TFIDF can per performed from scikit-learn library, it has it’s own limitations.</p><ol><li>Works only on list</li><li>Operation can’t be performed on single line of command on dataframe</li><li>Minimum 5 line of command needed to execute the algo and</li><li>Need to remember the syntax of operation 🤦‍♂️ while you are loaded with multiple programming languages in your day to day work.</li></ol><blockquote>Package can execute <strong>CountVectorizer</strong> or <strong>TFIDF</strong> in a single line of command directly on <strong>dataframe</strong> or <strong>list</strong>.</blockquote><h3>How was it done ?</h3><p>Leveraged most of the existing functions from scikit-learn libraries and integrated to “<a href="https://pypi.org/project/ProText/"><strong>Protext</strong></a>” pip package and published at Pypi <a href="https://pypi.org/project/ProText/"><strong>https://pypi.org/project/ProText/</strong></a></p><p>Objects have been created for each CV and TFIDF feature extraction functions and can be executed on data frame in a single line of command 😁.</p><h3>Application on actual data:</h3><p>ProText package will install dependency packages scikit-learn if not pre-installed.</p><ol><li><strong>Importing Protext library and applying on data frame :</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*M7K0aS5b6vC4EC6aJVNG_Q.png" /></figure><p><strong>2. Processed data from Part 1:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PfPM3EvQ87I3YYKl4sGRzw.png" /><figcaption>Processed data frame using Protext library</figcaption></figure><p><strong>3. CountVectorizer</strong></p><p>Below command can be executed both on datafarme or list</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/539/1*3RCqY1UZ2e82dSjBYOINTQ.png" /></figure><p>Above command returns sparse matrix, term and dataframe.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aON5A8Jho-Lwo4ujMg70Mg.png" /></figure><p>cv_vect = Sparse matrix, cv_feature = term / word and cvdf = dataframe.</p><p>Based on the need you can ignore any return by simply replacing the variable with _,.</p><p>Eg: If you are interested in only dataframe, then the above function can be called as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*Pk81B1hWImq2krAGpwJ9QA.png" /></figure><p><strong>4. TFIDF</strong></p><p>Below command can be executed both on datafarme or list</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*CyTV1cXWTlCvGjJDYVvrfg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qyBF1lNTIVSGnpnQhtU2hw.png" /></figure><p>tfidf_vect = sparse matrix, tfidf_feature = term / word and tfidfdf = dataframe.</p><p>Based on the need you can ignore any return by simply replacing the variable with _,.</p><p>Eg: If you are interested in only dataframe, then the above function can be called as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/383/1*4aMk4exbLi8q_Ofr6XW0Pw.png" /></figure><h3>Final note :</h3><p>“<a href="https://pypi.org/project/ProText/">ProText</a>” package comes in handy for data analyst, industry specialist and academic researchers to working on unstructured text data without much worrying about syntax associated with each function, quick check of processing using wordcloud and feature extraction.</p><h3>Reference :</h3><p>Under the guidance of beloved mentor <a href="https://www.linkedin.com/in/akshay-kulkarni-1a562679/">Mr.Akshay Kulkarni</a> and Dr.Shinu Abhi at <a href="https://www.linkedin.com/school/racereva/">REVA Academy for Corporate Excellence</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c4b5f737ee37" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ProText — Comprehensive unstructured data Preprocessing & Feature extraction package for NLP — Part…]]></title>
            <link>https://krajanna.medium.com/protext-comprehensive-unstructured-data-text-preprocessing-package-for-nlp-a367d1dfe0c7?source=rss-b636b6a4ccf4------2</link>
            <guid isPermaLink="false">https://medium.com/p/a367d1dfe0c7</guid>
            <category><![CDATA[text-preprocessing]]></category>
            <category><![CDATA[nltk]]></category>
            <category><![CDATA[textblob]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[unstructured-data]]></category>
            <dc:creator><![CDATA[Rajanna]]></dc:creator>
            <pubDate>Sun, 21 Feb 2021 12:20:31 GMT</pubDate>
            <atom:updated>2021-02-25T15:07:52.180Z</atom:updated>
            <content:encoded><![CDATA[<h3>ProText — Comprehensive unstructured data Preprocessing &amp; Feature extraction package for NLP — Part 1 of 2</h3><blockquote>Consolidation of all text cleaning and feature extraction functions under single package 👏</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h0mO4PdZaQKtbwWJW40FKQ.jpeg" /></figure><p>Text preprocessing plays a pivotal role in NLP (Natural Language Processing).</p><p><strong>Pre-processing</strong> needs to derive meaningful information for NLP processing and <strong>Feature extraction</strong> is a process of converting text into numeric form and also dimensionality reduction for processing.</p><h3>Data preprocessing steps</h3><p>Following are the most common text processing steps involved prior to subjecting data to any Data analysis.</p><p><strong><em>·</em></strong><em> Converting data to Lower case</em></p><p><strong><em>· </em></strong><em>Removal of Punctuation</em></p><p><strong><em>·</em></strong><em> Removal or conversion of Emoticon and emoji</em></p><p><strong><em>·</em></strong><em> Spelling correction</em></p><p><strong><em>·</em></strong><em> Removal of stop words</em></p><p><strong><em>·</em></strong><em> </em>Adding more stop words to “stopwords.words” library list</p><p><strong><em>·</em></strong><em> Hashtags removal</em></p><p><strong><em>·</em></strong><em> Hyperlink removal</em></p><p><strong><em>· </em></strong><em>Lemmatization</em></p><p><strong><em>·</em></strong><em> Stemming</em></p><p><strong><em>·</em></strong><em> Removal of special characters</em></p><p><strong><em>·</em></strong><em> Removal of numbers</em></p><p><strong><em>· </em></strong><em>Removing extra spaces /new line</em></p><p><strong><em>·</em></strong><em> Substitution for Abbreviation…etc</em></p><p>There is neither a specific sequence nor need to execute all of the above pre-processing steps. However based on the end application of NLP, any sequence or functions can be used.</p><h3>Use cases of NLP</h3><p>There are wide varieties of NLP application in industries. Few of the examples are :-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*Jqa-pZ0qObQNGuikww_g5w.jpeg" /></figure><h3><strong>Typical NLP process</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*oCG7iYVQZGzeiyXYwAndcQ.png" /></figure><p>Don’t worry, I will not bother you with each and every section of it 😁. Our scope in this topic will be limited to only Text Preprocessing / Cleaning 👏 .</p><h3><strong>Existing work on unstructured data (text) cleaning</strong></h3><blockquote>There are wide varieties of NLP libraries available for text processing / cleaning namely NLTK, Textblob, Spacy, Corenlp..etc. However their functionality is limited to <strong>specific application</strong> or may not cover end-to-end .</blockquote><p>Also one needs to remember the syntax to run each one of it 😠.</p><h3><strong>Why this package / Objective ?</strong></h3><blockquote>One stop solution for all the text pre-processing and feature extraction for AI applications 🙌.</blockquote><p>Package will have all or most of the data cleaning features and flexible to select <strong>one</strong> or <strong>multiple</strong> steps in a single line of command on your data in panda data frame format.</p><p>Quick <strong>WordCloud</strong> visualization functions are built-in to check for any need of additional preprocessing steps.</p><h3>How was it done ?</h3><p>Leveraged most of the existing functions from nltk, textblob and wordcloud libraries in this package.</p><p>Pip package has been created with package name “<a href="https://pypi.org/project/ProText/"><strong>Protext</strong></a>” and published at Pypi <a href="https://pypi.org/project/ProText/"><strong>https://pypi.org/project/ProText/</strong></a></p><p>Objects have been created for each Text preprocessing functions and can be executed on data frame in a single line of command.</p><p>eg: stopw() for Stopword removal, stem() for stemming, lemma() for lemmitization.</p><h3><strong>Application on actual data:</strong></h3><p>ProText package will install dependency packages like nltk, textblob, wordcloud and scikit-learn if not pre-installed.</p><ol><li><strong>Importing Protext library and applying on data frame :</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*VBcI2_OXcPHin8Kh8CfLmA.png" /><figcaption>Importing library and applying on Data Frame</figcaption></figure><p>Adding more stop words to “stopwords.words” library list :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*jfYipjGlWpY4k70xfOswbQ.png" /></figure><p><strong>2. Processed data :</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PfPM3EvQ87I3YYKl4sGRzw.png" /><figcaption>Processed data frame using Protext library</figcaption></figure><p><strong>3. WordCloud check:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*RPRzyySvDMN5FAuR5bPA0g.png" /></figure><p>Thank you for reading! Please continue reading by clicking on the next part link below on * <strong>Feature extraction</strong> *:</p><p><a href="https://krajanna.medium.com/protext-comprehensive-unstructured-data-preprocessing-feature-extraction-package-for-nlp-c4b5f737ee37">ProText — Comprehensive unstructured data Preprocessing &amp; Feature extraction package for NLP —…</a></p><h3><strong>Reference :</strong></h3><p>Under the guidance of beloved mentor <a href="https://www.linkedin.com/in/akshay-kulkarni-1a562679/">Mr.Akshay Kulkarni</a> and Dr.Shinu Abhi at <a href="https://www.linkedin.com/school/racereva/">REVA Academy for Corporate Excellence</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a367d1dfe0c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Numerical and Categorical Data]]></title>
            <link>https://krajanna.medium.com/numerical-and-categorical-data-6b0361059de?source=rss-b636b6a4ccf4------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b0361059de</guid>
            <category><![CDATA[numerical-analysis]]></category>
            <category><![CDATA[categorical-data]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[reva-university-bangalore]]></category>
            <category><![CDATA[analytics]]></category>
            <dc:creator><![CDATA[Rajanna]]></dc:creator>
            <pubDate>Sat, 30 Jan 2021 18:33:26 GMT</pubDate>
            <atom:updated>2021-02-21T11:32:58.592Z</atom:updated>
            <content:encoded><![CDATA[<h4>Attempt to help provide clarity for identifying data types.</h4><p>Identifying Numerical and Categorical data type is very much essential in Data Analysis.</p><p>For the beginners, the nomenclature (Numerical and Categorical) would be confusing to identify or categorize the data among Numerical &amp; Categorical.</p><p>Simple reason being that numbers can be Categorical data as well. Hence don’t conclude the data type by it’s appearance.</p><h4><strong>Simple example:</strong></h4><p>Let us identify data category in the table below :-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/1*cKrPNU-X2E5j0Hdcd94vcA.png" /></figure><p>Most of them, more or less would classify as above.</p><p>However right identification would be</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*IBSqhDteAnXpM9fsXCNa8Q.png" /></figure><p>Surprised😮 …!!!. <strong>Yes</strong>.</p><p>I felt the same and had lot of argument on this identification. Later I found that Numerical and Categorical data can also be called as <strong>Quantitative</strong> and <strong>Qualitative</strong> data respectively which came as savior for my all confusions and made a clear logical sense.</p><p>No wonder for the reason behind existence of alternate terminology 😉.</p><p>What is Numerical in other term Quantitative data? if you understand this, Categorical (Qualitative) is easy.</p><p>Numerical or <strong>Quantitative data</strong> : Values for which arithmetic operations (e.g., addition or averaging) make sense. Examples: age, height, Total score, SAT score.</p><p>In the above example; Minimum, Maximum and Avgerage of “<strong>Total score”</strong> makes sense i.e we can use them for deriving some logical conclusion based on the application than that of Jersy#, Pin code or Rank.</p><p>Categorical or <strong>Quantitative data</strong>: Places an individual into one of several groups or categories. Examples: eye color, race, gender. May have numerical values assigned: 1=White, 2=Hispanic, 3=Asian, etc. Other numeric categorical variables include baseball jersey number or pin code.</p><h3><strong>Final thought:</strong></h3><blockquote>I would strongly suggest to replace Numerical with <strong><em>Quantitative</em></strong> mentally whenever you come across data identification.</blockquote><p>These data also sub grouped as below which is pretty much self explanatory once you have high level of the above understanding.</p><h4><em>Easy Identification Chart:</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/0*yu4T4r2_WAeAWXdx" /></figure><h3>References:</h3><ol><li><a href="https://legac.com.au/blogs/further-mathematics-exam-revision/further-mathematics-unit-3-data-analysis-types-of-data">https://legac.com.au/blogs/further-mathematics-exam-revision/further-mathematics-unit-3-data-analysis-types-of-data</a></li><li><a href="https://www.hazlet.org/userfiles/415/my%20files/ap%20statistics%20summer%20packet%202018.pdf?id=6954#:~:text=Quantitative%3A%20Has%20numerical%20values%20for,eye%20color%2C%20race%2C%20gender">https://www.hazlet.org/userfiles/415/my%20files/ap%20statistics%20summer%20packet%202018.pdf?id=6954#:~:text=Quantitative%3A%20Has%20numerical%20values%20for,eye%20color%2C%20race%2C%20gender</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b0361059de" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>