<?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 Zipporah Luna on Medium]]></title>
        <description><![CDATA[Stories by Zipporah Luna on Medium]]></description>
        <link>https://medium.com/@zluna?source=rss-d9779db397f5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6DKAP1yl9oGBR2yOF6gssw.jpeg</url>
            <title>Stories by Zipporah Luna on Medium</title>
            <link>https://medium.com/@zluna?source=rss-d9779db397f5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 23:13:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@zluna/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[CRISP-DM Phase 5: Evaluation Phase]]></title>
            <link>https://medium.com/analytics-vidhya/crisp-dm-phase-5-evaluation-phase-d7bb3c75220a?source=rss-d9779db397f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/d7bb3c75220a</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[evaluation-metric]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[business]]></category>
            <dc:creator><![CDATA[Zipporah Luna]]></dc:creator>
            <pubDate>Wed, 13 Oct 2021 14:12:00 GMT</pubDate>
            <atom:updated>2021-11-10T05:04:56.977Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*05Qx8GSTyioL2qnsRho2KQ.jpeg" /><figcaption>Image by <a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fwww.shopify.com%2Fblog%2F7365564-32-key-performance-indicators-kpis-for-ecommerce&amp;psig=AOvVaw0BCICEiXxCPW_bbSrFyxsQ&amp;ust=1634221159367000&amp;source=images&amp;cd=vfe&amp;ved=0CAsQjRxqFwoTCKiat7XKx_MCFQAAAAAdAAAAABAU">Shopify</a></figcaption></figure><p><em>This is part 6 of the 7-part series’ summary explanation of the </em><a href="https://open.sap.com/courses/ds3"><em>openSAP’s 6-week Getting Started with Data Science (Edition 2021)</em></a><em> course by </em><a href="https://www.linkedin.com/in/stuartclarkeanalytics/?originalSubdomain=uk"><em>Stuart Clarke</em></a><em>. Part 5 is </em><a href="https://medium.com/analytics-vidhya/crisp-dm-phase-4-modeling-phase-b81f2580ff3"><em>here</em></a><em>.</em></p><h3>Part 5 Recap</h3><p>In the <a href="https://medium.com/analytics-vidhya/crisp-dm-phase-4-modeling-phase-b81f2580ff3"><em>fifth</em></a> part of this series, I briefly explained how to choose a model, what are the available models to use, and the difference between a Parametric vs. Non-Parametric Machine Learning Models.</p><p>There are six phases of CRISP-DM with particular tasks and output:</p><p><strong>Six phases of CRISP-DM</strong>:</p><ol><li>Business Understanding</li><li>Data Understanding</li><li>Data Preparation</li><li>Modeling</li><li>Evaluation</li><li>Deployment</li></ol><p>In this article, we will focus on the fifth phase which is <strong><em>Evaluation Phase</em></strong>. After choosing and running the model, we need to evaluate the results to determine if there is some reason why this model will not work and also justify why this model is appropriate to use.</p><p><strong><em>Note: </em></strong>I will not be covering each model and how it works under the hood. To know more about each different types of model, how it works, and how to evaluate them, you can enroll here: <a href="https://open.sap.com/courses/ds3"><em>openSAP’s 6-week Getting Started with Data Science (Edition 2021)</em></a><em> course.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_30a7Qc233l5_8NDLrlXWA.png" /></figure><p>In the process flow above, Evaluation phase is broken down into three main tasks together with its projected outcome or output in detail.</p><p>Simply put, the Evaluation phase’s goal is to:</p><ul><li><strong><em>Evaluate Results </em></strong>by assessing the degree to which model meets objective of the business and testing the models on test applications if time and budget permits.</li><li><strong><em>Review Process </em></strong>by conducting a more thorough review of the data mining engagement to determine if there is any important factor or task that has somehow been overlooked during the process, identify any quality assurance issues, and summarize the process review and highlight activities that have been missed and/or should be repeated.</li><li><strong><em>Determine next Steps </em></strong>by assessing how to proceed with the project. In this part, listing potential further actions along with the reason for and against each option and describing how to proceed is important.</li></ul><p>In the next part, we will talk about the last phase which is the <strong><em>Deployment Phase</em></strong><em>. </em>If you are working on a data science project for your company or even personal project/s, try to apply the above steps if applicable. As again, different data science projects have different sets of requirement. The CRISP-DM methodology just serves as a template to ensure you have considered all of the different aspects specific to your project.</p><p><strong><em>References:</em></strong></p><ul><li><a href="https://open.sap.com/courses/ds3">Getting Started with Data Science (Edition 2021)</a></li><li><a href="https://data-science-infinity.teachable.com/courses/data-science-infinity?affcode=716157_jcwmqdhh">DATA SCIENCE INFINITY</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7bb3c75220a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/crisp-dm-phase-5-evaluation-phase-d7bb3c75220a">CRISP-DM Phase 5: Evaluation Phase</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[CRISP-DM Phase 4: Modeling Phase]]></title>
            <link>https://medium.com/analytics-vidhya/crisp-dm-phase-4-modeling-phase-b81f2580ff3?source=rss-d9779db397f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/b81f2580ff3</guid>
            <category><![CDATA[business-strategy]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[modeling]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Zipporah Luna]]></dc:creator>
            <pubDate>Mon, 16 Aug 2021 01:03:27 GMT</pubDate>
            <atom:updated>2021-08-19T05:16:59.198Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XjsclArmbyWIdc4QIRuMug.jpeg" /><figcaption>Image from <a href="https://www.analyticsinsight.net/understanding-the-limitations-of-deep-learning-models/">Analytics Insight</a></figcaption></figure><p><em>This is part 5 of the 7-part series’ summary explanation of the </em><a href="https://open.sap.com/courses/ds3"><em>openSAP’s 6-week Getting Started with Data Science (Edition 2021)</em></a><em> course by </em><a href="https://www.linkedin.com/in/stuartclarkeanalytics/?originalSubdomain=uk"><em>Stuart Clarke</em></a><em>. Part 4 is </em><a href="https://zluna.medium.com/crisp-dm-phase-3-data-preparation-faf5ee8dc38e"><em>here</em></a><em>.</em></p><h3>Part 4 Recap</h3><p>In the <a href="https://zluna.medium.com/crisp-dm-phase-3-data-preparation-faf5ee8dc38e">fourth <em>part</em></a> of this series, I explained why preparing data is a crucial part in a a data science project, briefly discussed how to prepare data, and provided additional resources with codes in some of the most common data preparation methods in the field.</p><p>There are six phases of CRISP-DM with particular tasks and output:</p><p><strong>Six phases of CRISP-DM</strong>:</p><ol><li>Business Understanding</li><li>Data Understanding</li><li>Data Preparation</li><li>Modeling</li><li>Evaluation</li><li>Deployment</li></ol><p>In this article, we will focus on the fourth phase which is <strong><em>Data Modeling</em></strong>. After all the cleaning, formatting, feature engineering (if necessary), and feature selection, we will now feed the data to the chosen model. But how does one select a model to use?</p><p><strong><em>Note: </em></strong>I will only be briefly discussing how to choose a model and what are the available models to use. I will not be covering each model and how it works under the hood. To know more about each different types of model and how it works, you can enroll here: <a href="https://open.sap.com/courses/ds3"><em>openSAP’s 6-week Getting Started with Data Science (Edition 2021)</em></a><em> course.</em></p><h3>How to choose a model?</h3><p><strong>IT DEPENDS</strong>. You read that right, it depends. It all depends on what the goal of your task or project is and this should already be identified in the <a href="https://medium.com/analytics-vidhya/crisp-dm-phase-1-business-understanding-255b47adf90a"><em>Business Understanding</em></a> phase of the CRISP-DM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*vsK4QCsi7KcAIiksU9siOA.jpeg" /></figure><h4>Steps in choosing a model</h4><ol><li><strong>Determine size of training data</strong> — if you have a small dataset, fewer number of observations, high number of features, you can choose high bias/low variance algorithms <em>(Linear Regression, Naïve Bayes, Linear SVM)</em>. If your dataset is large and has a high number of observations compared to number of features, you can choose a low bias/high variance algorithms <em>(KNN, Decision trees)</em>.</li><li><strong>Accuracy and/or interpretability of the output</strong> — if your goal is inference, choose restrictive models as it is more interpretable <em>(Linear Regression, Least Squares). </em>If your goal is higher accuracy, then choose flexible models <em>(Bagging, Boosting, SVM)</em>.</li><li><strong>Speed or training time</strong> — always remember that higher accuracy as well as large datasets means higher training time. Examples of easy to run and to implement algorithms are: <em>Naïve Bayes, Linear and Logistic Regression. </em>Some<em> </em>examples of<em> </em>algorithms that need more time to train are: <em>SVM, Neural Networks, and Random Forests</em>.</li><li><strong>Linearity </strong>—try checking first the linearity of your data by fitting a linear line or by trying to run a logistic regression, you can also check their residual errors. Higher errors mean that the data is not linear and needs complex algorithms to fit. If data is Linear, you can choose: <em>Linear Regression, Logistic Regression, Support Vector Machines</em>. If Non-linear: <em>Kernel SVM, Random Forest, Neural Nets</em>.</li></ol><h3><strong>Parametric vs. Non-Parametric Machine Learning Models</strong></h3><h4><strong><em>Parametric Machine Learning Algorithms</em></strong></h4><p><strong><em>Parametric ML Algorithms</em></strong> are algorithms that simplify the function to a know form. They are often are called the “Linear ML Algorithms”.</p><p><strong>Parametric ML Algorithms</strong></p><ul><li>Logistic Regression</li><li>Linear Discriminant Analysis</li><li>Perceptron</li><li>Naïve Bayes</li><li>Simple Neural Networks</li></ul><p><strong>Benefits of Parametric ML Algorithms</strong></p><ul><li><strong><em>Simpler </em></strong>— easy to understand methods and easy to interpret results</li><li><strong><em>Speed </em></strong>— very fast to learn from the data provided</li><li><strong><em>Less data </em></strong>— it does not require as much training data</li></ul><p><strong>Limitations of Parametric ML Algorithms</strong></p><ul><li><strong><em>Limited Complexity </em></strong>—suited only to simpler problems</li><li><strong><em>Poor Fit</em></strong> — the methods are unlikely to match the underlying mapping function</li></ul><h4><strong><em>Non-Parametric Machine Learning Algorithms</em></strong></h4><p><strong><em>Non-Parametric ML Algorithms</em></strong> are algorithms that do not make assumptions about the form of the mapping functions. It is good to use when you have a lot of data and no prior knowledge and you don’t want to worry too much about choosing the right features.</p><p><strong>Non-Parametric ML Algorithms</strong></p><ul><li>K-Nearest Neighbors (KNN)</li><li>Decision Trees like CART</li><li>Support Vector Machines (SVM)</li></ul><p><strong>Benefits of Non-Parametric ML Algorithms</strong></p><ul><li><strong><em>Flexibility</em></strong>— it is capable of fitting a large number of functional forms</li><li><strong><em>Power </em></strong>— do not assume about the underlying function</li><li><strong><em>Performance </em></strong>— able to give a higher performance models for predictions</li></ul><p><strong>Limitations of Non-Parametric ML Algorithms</strong></p><ul><li><strong><em>Needs more data </em></strong>— requires a large training dataset</li><li><strong><em>Slower processing </em></strong><em>— </em>they often have more parameters which means that training time is much longer</li><li><strong><em>Overfitting </em></strong>— higher risk of overfitting the training data and results are harder to explain why specific predictions were made</li></ul><h3>The Breakdown</h3><p>In the course, Stuart have broken down the tasks and output of the fourth phase in detail. <em>*see below</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b_dz6-aq3vHk3o7LsgSenw.png" /></figure><p>In the process flow above, Data Modeling is broken down into four tasks together with its projected outcome or output in detail.</p><p>Simply put, the Data Modeling phase’s goal is to:</p><ul><li><strong><em>Select Modeling Technique </em></strong>by selecting the actual modeling technique to be used. This should already be identified in the <a href="https://medium.com/analytics-vidhya/crisp-dm-phase-1-business-understanding-255b47adf90a"><em>Business Understanding</em></a> phase. Do not forget to document the modeling technique that is to be used and other models to be used.</li><li><strong><em>Generate Test Design </em></strong>by generating a procedure to test the model’s quality and validity. Here, you will able to describe the intended plan for training, testing, and how to evaluate the models.</li><li><strong><em>Build Model </em></strong>by running the model using the prepared dataset. Once the model has been tested to run, list the parameters and their chosen value, and the rationale for the choice of parameter setting as you do not want to run an already run model again and again just because you forgot what the initial parameters were used.</li><li><strong><em>Assess Model </em></strong>by interpreting the models according to domain knowledge and data science criteria. In this stage, you will need to summarize the results of the generated models and rank their quality in relation to each other. Assess model performance metrics, graphs, and confusion matrix.</li></ul><p>In the next part, we will talk about the fifth phase which is the <strong><em>Evaluation Phase</em></strong><em>. </em>If you are working on a data science project for your company or even personal project/s, try to apply the above steps if applicable. As again, different data science projects have different sets of requirement. The CRISP-DM methodology just serves as a template to ensure you have considered all of the different aspects specific to your project.</p><p><strong><em>References:</em></strong></p><ul><li><a href="https://open.sap.com/courses/ds3">Getting Started with Data Science (Edition 2021)</a></li><li><a href="https://data-science-infinity.teachable.com/courses/data-science-infinity?affcode=716157_jcwmqdhh">DATA SCIENCE INFINITY</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b81f2580ff3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/crisp-dm-phase-4-modeling-phase-b81f2580ff3">CRISP-DM Phase 4: Modeling Phase</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[Classification Analysis with Regression]]></title>
            <link>https://python.plainenglish.io/classification-analysis-with-regression-80e5c83971b4?source=rss-d9779db397f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/80e5c83971b4</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[logistic-regression]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[statistics]]></category>
            <dc:creator><![CDATA[Zipporah Luna]]></dc:creator>
            <pubDate>Fri, 13 Aug 2021 09:06:40 GMT</pubDate>
            <atom:updated>2021-08-14T09:57:04.572Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SmaDSRV3oR_HdGKXmgfAKQ.jpeg" /><figcaption>Image from <a href="https://wallpaperaccess.com/folder">WallpaperAccess</a></figcaption></figure><h4><em>A brief introduction to Logistic Regression with basic Python code</em></h4><h3>What is Logistic Regression?</h3><p><strong><em>Logistic Regression</em></strong> is a model used to predict the probability of a certain class or event based on one or more input variables. It transforms linear relationships to a probabilistic output through the Logistic Function.</p><p>You might wonder what is the main difference between Linear Regression and Logistic Regression?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*bXHqccBg_RWxV0RqMKuQCA.png" /><figcaption>Image from <a href="https://open.sap.com/courses/ds3">Getting Started with Data Science</a></figcaption></figure><p>In the image above, the plot shows a model of the relationship between a continuous predictor<em>(x) </em>and the probability of an event or outcome <em>(y)</em>. The probability <em>(y)</em> ranges from 0 or 1, so you can see that if you use a linear model, it does not fit very well. So, in order for this model to have a direct relationship, you must use a non-linear function which is the <em>Sigmoid Curve </em>or S-shape function.</p><p>As an example in the image below, we can see a trend that the longer you study, the better result or probability that you will pass a subject or an exam. Using a linear line, it seems to have a fit but it doesn’t seem great. As you can see, it passed the 0 or 1 and we do not want that as anything outside of it makes no sense. So what do we use?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lCrGq-QAUj3gQqESrURMfA.png" /><figcaption>Image from <a href="https://data-science-infinity.teachable.com/courses/data-science-infinity?affcode=716157_jcwmqdhh">Data Science Infinity</a></figcaption></figure><p>We will use the Sigmoid Curve. In the image below, you can now see it does not go past 0 or 1 but still trends up and lets us see the relationship between the input and output variables.</p><p>Using the example below, if a person studies for 4 hours, this person would have a probability of 0.2 or 20% in passing the exam. And if a person studies for at least 5 hours has a probability of 0.75 or 75% in passing the exam.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vG_TAmFSL6bhS-GL1ONkIA.png" /><figcaption>Image from <a href="https://data-science-infinity.teachable.com/courses/data-science-infinity?affcode=716157_jcwmqdhh">Data Science Infinity</a></figcaption></figure><p><strong><em>Note:</em></strong> <em>Instead of finding the best fitting line by minimizing the squared residuals as in ordinary least squares, we use a different approach with logistic regression — Maximum Likelihood Estimation.</em></p><h3>Overfitting and Underfitting</h3><p>The following images will guide you in identifying whether you have a good model or it is either overfit or underfit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*-1Hrm5ugQh5xt0GGniVyvg.png" /></figure><h3>Basic Logistic Regression Code in Python</h3><p><strong>Step 1: </strong>Import necessary packages, your data, and split input and output variables.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e7d218f3715f6154ee505854687e5843/href">https://medium.com/media/e7d218f3715f6154ee505854687e5843/href</a></iframe><p><strong>Step 2: </strong>Split training and test set and instantiate the model which is the LogisticRegression as imported from Scikit-learn.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c55d28c27e2c450e3a4abfdd97571f43/href">https://medium.com/media/c55d28c27e2c450e3a4abfdd97571f43/href</a></iframe><p><strong>Step 3: </strong>Train the model using your training data, then assess your model, and plot your confusion matrix to have a visualized graph of the results.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/951257017c772dbe39013ddffe86d736/href">https://medium.com/media/951257017c772dbe39013ddffe86d736/href</a></iframe><p>To learn more about Logistic Regression, visit <a href="https://data-science-infinity.teachable.com/courses/data-science-infinity?affcode=716157_jcwmqdhh"><em>Data Science Infinity</em></a>. The Logistic Regression part of the course covers a high level overview of logistic regression and everything that happens under the hood of it, such as probability, odds, and log(odds), formula for a sigmoid curve, MLE, how to evaluate classification accuracy, advanced evaluation techniques, how to change the classification threshold, and more.</p><p>You can also check my review of the course <a href="https://www.linkedin.com/feed/update/urn:li:activity:6831128036226822144/"><em>here</em></a>.</p><p><strong><em>References:</em></strong></p><ul><li><a href="https://open.sap.com/courses/ds3">Getting Started with Data Science (Edition 2021)</a></li><li><a href="https://data-science-infinity.teachable.com/courses/data-science-infinity?affcode=716157_jcwmqdhh">DATA SCIENCE INFINITY</a></li></ul><p><em>More content at </em><a href="http://plainenglish.io/"><strong><em>plainenglish.io</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=80e5c83971b4" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/classification-analysis-with-regression-80e5c83971b4">Classification Analysis with Regression</a> was originally published in <a href="https://python.plainenglish.io/">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Grocery Stores Trick You to Buy an Item After Another]]></title>
            <link>https://medium.com/analytics-vidhya/how-grocery-stores-trick-you-to-buy-an-item-after-another-1f7d9e4b3fb4?source=rss-d9779db397f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f7d9e4b3fb4</guid>
            <category><![CDATA[consumer-behavior]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[business-strategy]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Zipporah Luna]]></dc:creator>
            <pubDate>Thu, 12 Aug 2021 06:19:57 GMT</pubDate>
            <atom:updated>2021-09-20T04:11:26.742Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sm-Zjr_bp5jD-V2AICxUjg.jpeg" /><figcaption>Image by <a href="https://wallpapercave.com/w/wp9217953">WallpaperCave</a></figcaption></figure><p><em>How grocery stores decide which aisle is across another aisle and how different categories and/or products are beside each other. Bonus: Includes a python code.</em></p><p>Have you ever wondered how grocery stores decide which aisle is across another aisle? Or different categories and/or products are beside each other? Or you might have also noticed how they do sale items or bundled items like buy one get one products? This is what <em>Association Analysis</em> is.</p><h3>Association Analysis</h3><p><strong><em>Association Analysis </em></strong>is a useful methodology in discovering interesting relationships that are hidden in large datasets. It enables you to identify items that have a relationship with each other. It’s more frequently used to analyze transactional data which is called the Market Basket Analysis, to identify what items are often purchased or that appears together in transactions.</p><p>Many businesses accumulate large quantities of data from their daily operations. An example would be as mentioned earlier, grocery stores. Retailers are interested in analyzing the data for them to learn the purchasing behavior of their customers. This information can be used to support business decisions such as marketing promotions and inventory management.</p><p>Association Analysis produces simple rules. An example would be:</p><p>if {Product A}, {Product B} → {Product C} or {Bread, Egg} → {Milk}</p><p>These are simple “if” “then” type of rules. This rule has two antecedents (product A and product B) and one consequent which is (product C). Here, the rule length is equal to three, as there are three products and the itemset is {Bread, Egg, Milk}.</p><h3>Association Rule Learning</h3><p><strong><em>Association Rule Learning</em></strong> is an approach that discovers the strength of relationships between different data points. It is commonly utilized to understand which products are frequently purchased together as briefly explained in the Bread-Egg-Milk sample above. A commonly used Association Learning Algorithm is called <em>Apriori</em>.</p><blockquote>“Apriori algorithm uses two steps “join” and “prune” to reduce the search space. It is an iterative approach to discover the most frequent itemsets.”</blockquote><p>There are four metrics in Apriori: <strong><em>Support</em></strong><em>, </em><strong><em>Confidence</em></strong><em>, </em><strong><em>Expected Confidence</em></strong><em>,</em> and <strong><em>Lift</em></strong>. And each of these four metrics will help you understand the relationship they have with other items in their own way.</p><h3>Apriori Metrics</h3><h4><strong>Support</strong></h4><p>The <strong><em>Support </em></strong>gives an idea of how frequent an <em>itemset </em>is in all transactions. It gives you the percentage of all transactions that contain both Product A and Product B.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/415/1*kpY7cmX1hCE5AfX3TTiW3g.png" /></figure><p>Simply put, number of transactions containing Product A &amp; B divided by total transactions.</p><p>Here, 100 / 1,000 = <strong>0.1</strong></p><p>This means that 10% of all transactions contains both Bread and Milk.</p><h4>Confidence</h4><p><strong><em>Confidence </em></strong>measures the likeness of occurrence of the consequent in a basket given that the basket already has antecedents. For example, of all the transactions that contains {Product A}, how many also had {Product B} in them?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/414/1*bBjAq1gLAuDTQRlw0enN4w.png" /></figure><p>Confidence is equal to number of transactions that contains Product A &amp; B divided by number of transaction that contains Product A.</p><p>Here, 100 / 150 = <strong>0.67</strong></p><p>This means that of all transactions that contained Bread, 67% contained Milk as well.</p><p><strong><em>Note: </em></strong><em>If you swap the order of Product A and B, meaning Product A will now be Milk and Product B will now be Bread, then this metric would change. The main reason is Milk is bought frequently than Bread; so the denominator of the equation would change and the confident metric would change too.</em></p><p>In the Confidence example above, a score of 67% will lead you to think that there is a strong relationship between Bread and Milk. But in reality, much of the 67% is probably being driven by the fact that Milk are so commonly bought that they frequently end up to appear in most other products even if they really do not have a specific relationship between them. To regulate them, the other two metrics (<em>Expected Confidence</em> and <em>Lift</em>) will be needed.</p><h4>Expected Confidence</h4><p><strong><em>Expected Confidence </em></strong>is the percentage of all transactions that contain Product B.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/412/1*K7Tew6r0ZJ6ylPIm5HY0tA.png" /></figure><p>The equation for Expected Confidence is the number of transactions that contains Product B divided by total transactions.</p><p>Here, 800 / 1000 = <strong>0.8</strong></p><p>Before we conclude the Expected Confidence’s result, we need to jump to the last metric which is <strong><em>Lift</em></strong>.</p><h4>Lift</h4><p><strong><em>Lift </em></strong>is the confidence of the combination of items divided by the support of the consequent. It is the factor by which the <em>Confidence </em>exceeds the <em>Expected Confidence</em>. Lift tells you how likely Product B is purchased when Product A is purchased while controlling how popular Product B is.</p><p>In the Bread-Milk example, it just means how likely Milk is purchased when Bread is purchased while controlling how popular Milk is.</p><p>Going back to the <strong><em>Confidence </em></strong>example, we had a result of 0.67. It showed that of all transactions that contained Bread, 67% of them contained Milk. Then for the <strong><em>Expected Confidence</em></strong>, we had a score of 0.8. This meant that of all transactions, 80% contained Milk. To calculate <strong><em>Lift</em></strong>, we just simply divide <em>Confidence </em>by <em>Expected Confidence</em>. So, 0.67 / 0.8 is equal to 0.83. What does a Lift score of 0.83 mean? It just means they appear less often than expected based on how frequently Milk is purchased.</p><p><strong><em>Note: </em></strong><em>A lift score </em><strong><em>greater than 1</em></strong><em> indicates that Products A and B appear together more often than expected. And a lift score </em><strong><em>less than 1</em></strong><em> indicates that Products A and B appear together less often than expected.</em></p><p>In the example, we only calculated the relationship between Bread and Milk. However, in reality, you will be calculating with multiple products at once and all you need is to sort the lift score for each to see which products have the strongest relationship with each other.</p><p>That’s it! You now understand and can answer the question earlier about how grocery stores decide which aisle is across another aisle and how different categories and/or products are beside each other, and how discounts are offered on items. Now go for a grocery run and observe the placement of products!</p><h3><strong>Running in Python</strong></h3><p><strong>Problem from </strong><a href="https://data-science-infinity.teachable.com/courses/data-science-infinity?affcode=716157_jcwmqdhh"><strong><em>Data Science Infinity Course</em></strong></a></p><p><strong>Problem Overview</strong>: Analyze alcohol sales using the provided data and identify which product are bought together to decide which product can be placed near each other to make the customer’s store run easy and for the marketing team to know which products to advertise more and entice customers to purchase.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8080341f8360adb0fe68e158fc3fb44c/href">https://medium.com/media/8080341f8360adb0fe68e158fc3fb44c/href</a></iframe><p><strong><em>Overview of the dataset:</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9NxavkMPfX7lkiW1W18pNg.png" /></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cefdffc83b3a5006f5038ddb4492677f/href">https://medium.com/media/cefdffc83b3a5006f5038ddb4492677f/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d1a8119b4caffa3d36b93a302b5795c8/href">https://medium.com/media/d1a8119b4caffa3d36b93a302b5795c8/href</a></iframe><p><strong><em>Result Interpretation</em></strong>: As you can see below, the first row has a lift score of 10.17, this means Wine Gifts are frequently bought together with Beer/Lager gifts. The next row which is Beer/Lager Gifts are frequently bought with Spirits &amp; Fortified, and so on with the others.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/1*OPjuCNkQGSbW0Ds1HcGftA.png" /></figure><p>In a business perspective, seeing the results above will be of great help in terms of how you will strategically place your alcohol items in your store.</p><p><strong><em>References:</em></strong></p><ul><li><a href="https://open.sap.com/courses/ds3">Getting Started with Data Science (Edition 2021)</a></li><li><a href="https://data-science-infinity.teachable.com/courses/data-science-infinity?affcode=716157_jcwmqdhh">DATA SCIENCE INFINITY</a></li></ul><p><a href="https://www.softwaretestinghelp.com/apriori-algorithm/">https://www.softwaretestinghelp.com/apriori-algorithm</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f7d9e4b3fb4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/how-grocery-stores-trick-you-to-buy-an-item-after-another-1f7d9e4b3fb4">How Grocery Stores Trick You to Buy an Item After Another</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[CRISP-DM Phase 3: Data Preparation]]></title>
            <link>https://medium.com/analytics-vidhya/crisp-dm-phase-3-data-preparation-faf5ee8dc38e?source=rss-d9779db397f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/faf5ee8dc38e</guid>
            <category><![CDATA[business-strategy]]></category>
            <category><![CDATA[data-cleaning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Zipporah Luna]]></dc:creator>
            <pubDate>Tue, 10 Aug 2021 05:43:03 GMT</pubDate>
            <atom:updated>2021-08-16T04:45:47.183Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IH1pX04BQe1VVtwsMcGj_Q.jpeg" /><figcaption>Image from <a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fanalyticsindiamag.com%2Ftop-data-preparation-tools-to-watch-out-for-in-2020%2F&amp;psig=AOvVaw2WKhbN2SxYvmok4CbRbpZA&amp;ust=1628659237655000&amp;source=images&amp;cd=vfe&amp;ved=0CAsQjRxqFwoTCKDjg8_apfICFQAAAAAdAAAAABAK">Analytics India Magazine</a></figcaption></figure><p><em>This is part 4 of the 7-part series’ summary explanation of the </em><a href="https://open.sap.com/courses/ds3"><em>openSAP’s 6-week Getting Started with Data Science (Edition 2021)</em></a><em> course by </em><a href="https://www.linkedin.com/in/stuartclarkeanalytics/?originalSubdomain=uk"><em>Stuart Clarke</em></a><em>. Part 3 is </em><a href="https://medium.com/analytics-vidhya/crisp-dm-phase-2-data-understanding-b4d627ba6b45"><em>here</em></a><em>.</em></p><h3>Part 3 Recap</h3><p>In the <a href="https://medium.com/analytics-vidhya/crisp-dm-phase-2-data-understanding-b4d627ba6b45"><em>third part</em></a> of this series, I explained why it is important to have a data understanding: what data to acquire, where to acquire, how to acquire, and how much data to acquire.</p><p>There are six phases of CRISP-DM with particular tasks and output:</p><p><strong>Six phases of CRISP-DM</strong>:</p><ol><li>Business Understanding</li><li>Data Understanding</li><li>Data Preparation</li><li>Modeling</li><li>Evaluation</li><li>Deployment</li></ol><p>Now, we will focus on the third phase which is <strong><em>Data Preparation</em></strong>. After identifying and understanding your data, you need to prepare your data — clean, integrate data, conduct data encoding, feature engineer, and select variables and features. These are just some of the few processes or methods that you can do in preparing your data and not all of these are necessary. It all depends on what data you have as discussed in the data understanding phase.</p><h3>Why do you need to prepare your data? Can’t the model just do all that?</h3><p>You may have heard or are familiar with <strong><em>“Garbage in, garbage out.” </em></strong>phrase<strong><em> </em></strong>not just in the data science field but in any data analysis task you have encountered. But if this phrase is new to you, <strong>always remember</strong> it then.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*W8U3TrLAq5PiL4a4JnsCrg.png" /><figcaption>Image from Google</figcaption></figure><blockquote>“Data preparation is the <strong>process of cleaning and transforming raw data prior to processing and analysis</strong>. It is an important step prior to processing and often involves reformatting data, making corrections to data and the combining of data sets to enrich data.”</blockquote><p>Using an uncleansed or dirty data to your model will have your model produce wrong results or assumptions of the data. A New York Times article reported that data scientists spend from 50% to 80% of their time in collecting and preparing data before it can be used for exploration and especially before feeding it to the model.</p><h3><strong>Benefits of Data Preparation</strong></h3><ul><li>Identify and fix errors before feeding them to the model</li><li>High quality data</li><li>Make better business decisions</li><li>Make model interpret and produce good results</li></ul><h3>The Breakdown</h3><p>In the course, Stuart have broken down the tasks and output of the third phase in detail. <em>*see below</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LQIiIezuCytyepDWyMaGwA.png" /></figure><p>In the process flow above, Data Preparation is broken down into five tasks together with its projected outcome or output in detail.</p><p>Simply put, the Data Preparation phase’s goal is to:</p><ul><li><strong><em>Select Data </em></strong>or decide on the data to be used for analysis. One of the criteria in selecting the data is that it should be relevant to the data science goal that was identified in the <a href="https://medium.com/analytics-vidhya/crisp-dm-phase-1-business-understanding-255b47adf90a"><em>Business Understanding</em></a><em> </em>phase. In selecting data, you also need to list the data to be excluded and included and the reasons for these decisions.</li><li><strong><em>Clean Data </em></strong>by raising the data quality to the level required by the selected analysis techniques. Here, you also need to describe what decisions and actions were taken to address the data quality problems reported during the <em>Verify Data Quality</em> task of the <a href="https://medium.com/analytics-vidhya/crisp-dm-phase-2-data-understanding-b4d627ba6b45"><em>Data Understanding</em></a> phase.</li><li><strong><em>Construct Data </em></strong>by including derived attributes, entire new records, or transformed values for existing attributes. This may be conducting <a href="https://medium.com/analytics-vidhya/one-hot-encoding-categorical-variables-what-is-it-why-is-it-how-is-it-6fd9ed3a161">encoding methods</a> especially for categorical variables or feature engineering.</li><li><strong><em>Integrate Data </em></strong>by combining from multiple tables or records to create new records or values. SQL knowledge and skill is very important and would come in handy in this part.</li><li><strong><em>Format Data </em></strong>by transforming the data but not necessarily change its meaning, but might be required by the modeling tool. An example would be transforming your data either by <a href="https://python.plainenglish.io/feature-scaling-when-should-you-use-standardization-and-normalization-ea2eabb4a1d5"><em>standardization or normalization</em></a>.</li></ul><p>In the next part, we will talk about the fourth phase which is the <strong><em>Modeling</em></strong><em>. </em>If you are working on a data science project for your company or even personal project/s, try to apply the above steps if applicable. As again, different data science projects have different sets of requirement. The CRISP-DM methodology just serves as a template to ensure you have considered all of the different aspects specific to your project.</p><p>You can also check my previous articles covering few data preparation processes:</p><ul><li><strong>Detecting Outliers</strong>: <a href="https://python.plainenglish.io/what-it-means-to-be-different-outlier-2c680e3b4742"><em>https://python.plainenglish.io/what-it-means-to-be-different-outlier-2c680e3b4742</em></a></li><li><strong>Dealing with Missing Values</strong>: <a href="https://medium.com/analytics-vidhya/how-to-deal-with-missing-values-600b70b79918"><em>https://medium.com/analytics-vidhya/how-to-deal-with-missing-values-600b70b79918</em></a></li><li><strong>One-Hot Encoding</strong>: <a href="https://medium.com/analytics-vidhya/one-hot-encoding-categorical-variables-what-is-it-why-is-it-how-is-it-6fd9ed3a161"><em>https://medium.com/analytics-vidhya/one-hot-encoding-categorical-variables-what-is-it-why-is-it-how-is-it-6fd9ed3a161</em></a></li><li><strong>Feature Scaling</strong>: <a href="https://python.plainenglish.io/feature-scaling-when-should-you-use-standardization-and-normalization-ea2eabb4a1d5"><em>https://python.plainenglish.io/feature-scaling-when-should-you-use-standardization-and-normalization-ea2eabb4a1d5</em></a></li><li><strong>Feature Selection</strong>: <a href="https://medium.com/geekculture/feature-selection-in-machine-learning-correlation-matrix-univariate-testing-rfecv-1186168fac12"><em>https://medium.com/geekculture/feature-selection-in-machine-learning-correlation-matrix-univariate-testing-rfecv-1186168fac12</em></a></li></ul><p><strong><em>References:</em></strong></p><ul><li><a href="https://open.sap.com/courses/ds3">Getting Started with Data Science (Edition 2021)</a></li><li><a href="https://data-science-infinity.teachable.com/courses/data-science-infinity?affcode=716157_jcwmqdhh">DATA SCIENCE INFINITY</a></li><li><a href="https://www.talend.com/resources/what-is-data-preparation/#:~:text=Data%20preparation%20is%20the%20process,data%20sets%20to%20enrich%20data">What is Data Preparation? (+ How to Make It Easier) - Talend</a></li><li><a href="https://www.nytimes.com/2014/08/18/technology/for-big-data-scientists-hurdle-to-insights-is-janitor-work.html">For Big-Data Scientists, &#39;Janitor Work&#39; Is Key Hurdle to Insights (Published 2014)</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=faf5ee8dc38e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/crisp-dm-phase-3-data-preparation-faf5ee8dc38e">CRISP-DM Phase 3: Data Preparation</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[CRISP-DM Phase 2: Data Understanding]]></title>
            <link>https://medium.com/analytics-vidhya/crisp-dm-phase-2-data-understanding-b4d627ba6b45?source=rss-d9779db397f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/b4d627ba6b45</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[crisp-dm]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[business-strategy]]></category>
            <dc:creator><![CDATA[Zipporah Luna]]></dc:creator>
            <pubDate>Thu, 05 Aug 2021 09:44:04 GMT</pubDate>
            <atom:updated>2021-08-08T17:13:24.777Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*439jHNwyh_-ajAAyw01_8w.jpeg" /></figure><p><em>This is part 3 of the 7-part series’ summary explanation of the </em><a href="https://open.sap.com/courses/ds3"><em>openSAP’s 6-week Getting Started with Data Science (Edition 2021)</em></a><em> course by </em><a href="https://www.linkedin.com/in/stuartclarkeanalytics/?originalSubdomain=uk"><em>Stuart Clarke</em></a><em>. Part 2 is </em><a href="https://medium.com/analytics-vidhya/crisp-dm-phase-1-business-understanding-255b47adf90a"><em>here</em></a><em>.</em></p><h3>Part 2 Recap</h3><p>In the <a href="https://medium.com/analytics-vidhya/crisp-dm-phase-1-business-understanding-255b47adf90a"><em>second part</em></a> of this series, I explained why it is important to have a business understanding before starting a data science project as it will be one of the main drivers to build your project.</p><p>There are six phases of CRISP-DM with particular tasks and output:</p><p><strong>Six phases of CRISP-DM</strong>:</p><ol><li>Business Understanding</li><li>Data Understanding</li><li>Data Preparation</li><li>Modeling</li><li>Evaluation</li><li>Deployment</li></ol><p>In this third part of the series, we will focus on the second phase which is <strong><em>Data Understanding</em></strong>. After having a business understanding, you need to understand what data do you have, where to get the data, what is in your data, and if your data is of quality.</p><h3>Why do you need to understand your data?</h3><p>In the business understanding phase, the fourth task which is the <em>Produce Project Plan</em> covers describing the resources needed. In this phase, you need to identify already what data you have, where to get the data, what tools to use to get the data, and how much data available is crucial. Understanding your data from the initial phase will make your data science project more sense.</p><p>Imagine you are tasked in predicting house prices and you do not know where to get the data, what approach will you take? What if the data only has 50 records and the records are mostly commercial spaces? Will it be appropriate to use and will it be enough?</p><p>Always remember, before diving in a data science project, always know and understand first <strong><em>WHAT </em></strong>data to acquire, <strong><em>WHERE </em></strong>to acquire, <strong><em>HOW </em></strong>to acquire, and <strong><em>HOW MUCH</em></strong> data to acquire.</p><h3>The Breakdown</h3><p>In the course, Stuart have broken down the tasks and output of the second phase in detail. <em>*see below</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t0q_Y7vC_-WIlIH3UDXdzg.png" /><figcaption>Image from <a href="https://open.sap.com/courses/ds3">Getting Started with Data Science</a></figcaption></figure><p>In the process flow above, Data Understanding is broken down into four tasks together with its projected outcome or output in detail.</p><p>Simply put, the Data Understanding phase’s goal is to:</p><ul><li><strong><em>Collect Initial Data </em></strong>or acquire the data and its access to the data listed in the projects resources. Collecting initial data also means you need to have a checklist of the dataset you have acquired, the dataset location, the methods to acquire the datasets, and record any problems encountered and any solutions to the problems for the other users or project members to be aware of.</li><li><strong><em>Describe Data </em></strong>by examining the properties of the data acquired, provide a description report regarding the format of the data, quantity of data and even the records and fields in each table or datasets.</li><li><strong><em>Explore Data </em></strong>by using data science questions that can be quickly answered through querying, visualization, and reporting or summary report. In this stage, you will be able to find your first or initial hypothesis and their impact on the project.</li><li><strong><em>Verify Data Quality </em></strong>by examining if the data is complete. If the data has errors or are there missing values and if there is, what is the percentage of the missing values versus the overall data obtained.</li></ul><p>In the next part, we will talk about the third phase which is the <strong><em>Data Preparation</em></strong><em>. </em>If you are working on a data science project for your company or even personal project/s, try to apply the above steps if applicable. As again, different data science projects have different sets of requirement. The CRISP-DM methodology just serves as a template to ensure you have considered all of the different aspects specific to your project.</p><p><strong><em>References:</em></strong></p><p><a href="https://open.sap.com/courses/ds3">Getting Started with Data Science (Edition 2021)</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4d627ba6b45" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/crisp-dm-phase-2-data-understanding-b4d627ba6b45">CRISP-DM Phase 2: Data Understanding</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[Feature Selection in Machine Learning: Correlation Matrix | Univariate Testing | RFECV]]></title>
            <link>https://medium.com/geekculture/feature-selection-in-machine-learning-correlation-matrix-univariate-testing-rfecv-1186168fac12?source=rss-d9779db397f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/1186168fac12</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[feature-selection]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Zipporah Luna]]></dc:creator>
            <pubDate>Tue, 27 Jul 2021 04:10:41 GMT</pubDate>
            <atom:updated>2021-08-10T09:59:53.698Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NcTdKnJz7v-53G8D" /><figcaption>Photo by <a href="https://unsplash.com/@lightrisephoto?utm_source=medium&amp;utm_medium=referral">Devon Divine</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>What is Feature Selection</h3><p><strong><em>Feature Selection</em></strong> is the process used to select the input variables that are most important to your Machine Learning task.</p><p>In a Supervised Learning task, your task is to predict an output variable and in some cases, you are limited with a few input variables to work with, but at times, you will have access to a whole lot of set of potential predictors or variables. In this case, it can often be harmful to use all of these input variables or predictors in to your model. This is where <strong><em>feature selection </em></strong>comes in.</p><h3>Why use Feature Selection</h3><ol><li>Improve Model Accuracy</li><li>Lower Computational Cost</li><li>Easier to Understand &amp; Explain</li></ol><h3><strong>Ways to conduct Feature Selection</strong></h3><h4><strong>1. Correlation Matrix</strong></h4><p>A <strong><em>correlation matrix</em></strong> is simply a table which displays the correlation coefficients for different variables. The matrix depicts the correlation between all the possible pairs of values in a table. It is a powerful tool to summarize a large dataset and to identify and visualize patterns in the given data.</p><p>A correlation matrix consists of rows and columns that show the variables. Each cell in a table contains the correlation coefficient.</p><p><strong><em>Correlation Matrix</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*endHV9WA4HNmquFAM-nEzw.png" /></figure><p><strong><em>Correlation Template Code</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8ffac1b556635e89d32d27c2e584ace8/href">https://medium.com/media/8ffac1b556635e89d32d27c2e584ace8/href</a></iframe><h4>2. Univariate Testing</h4><p><strong><em>Univariate Feature Selection </em></strong>or<strong><em> Testing</em></strong> applies statistical tests to find relationships between the output variable and each input variable in isolation. Tests are conducted one input variable at a time. The tests depends whether you are running a regression task or a classification task.</p><p>An example output of these tests are tables showing relationships scores between each input variable and the output. <em>(*see image below)</em></p><p><strong>Regression Task</strong></p><p>In a regression task, you may be provided with an <a href="https://deepai.org/machine-learning-glossary-and-terms/f-score"><em>f-score</em></a> and a <a href="https://www.youtube.com/watch?v=vemZtEM63GY"><em>p-value</em></a> for each variable and gives you a view of the statistical significance of their relationships between the input and the output variables. This will help you assess how confident you should be with the variables you have used in your model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gBkUEWNC3i3rJimxh4U6AA.png" /></figure><p><strong><em>Univariate Testing: Regression Task Code Template</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/96ea857a7da3ace27295ccac03500d15/href">https://medium.com/media/96ea857a7da3ace27295ccac03500d15/href</a></iframe><p><strong>Classification Task</strong></p><p>Depending on what test you use, you might be provided a <a href="https://www.statisticshowto.com/probability-and-statistics/chi-square/"><em>chi-square score</em></a> and a <a href="https://www.youtube.com/watch?v=vemZtEM63GY"><em>p-value</em></a> for each variable. Again, this gives you a view of the statistical significance of their relationships between the input variables and the output variables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-TWVagmYIpWv-dkYTxcDtQ.png" /></figure><p>In either Regression or Classification tasks, this will give you a basic information around which variables may be more important than the others and you could also put a threshold for the statistical test scores, the p-value or both to say that you only want to include variables that appear to have a reliable relationship with the output variable that you are looking to predict.</p><p><strong><em>Univariate Testing: Classification Task Code Template</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ffb32c54965a9ddc735d607996f81de6/href">https://medium.com/media/ffb32c54965a9ddc735d607996f81de6/href</a></iframe><p><strong><em>Note: </em></strong>The only downside of univariate testing is that it <strong><em>only considers variables in isolation</em></strong>. It doesn’t account variables that are interacting with each other.</p><h4><strong>3. Recursive Feature Elimination with Cross-Validation <em>(RFECV)</em></strong></h4><p><strong><em>Recursive Feature Elimination</em></strong> fits a model that starts with all the input variables, then iteratively removes those with the weakest relationship with the output until the desired number of features is reached. It actually fits a model instead of just running statistical tests unlike the Univariate Testing.</p><blockquote>“RFE is popular because it is easy to configure and use and because it is effective at selecting those features in a training dataset that are more or most relevant in predicting the target variable.”</blockquote><p>The <strong><em>CV</em></strong> in RFECV means <strong><em>Cross-Validation</em></strong>. It gives you a better understanding on what the variables will be included in your model.</p><p>In the Cross-Validation part, it splits the data into different chunks and iteratively trains and validates models on each chunks separately. This simply means that each time you assess different models with certain variables included or eliminated, the algorithm also knows how accurate each model was from the model scenarios that are created and can determine which provided the best accuracy and concludes the best set of input variables to use.</p><p><strong><em>Recursive Feature Elimination with CV Code Template</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/68524d1cdd4cd9a0f11360ff8c7831ef/href">https://medium.com/media/68524d1cdd4cd9a0f11360ff8c7831ef/href</a></iframe><p><strong><em>References:</em></strong></p><ul><li><a href="https://scikit-learn.org/stable/auto_examples/feature_selection/plot_rfe_with_cross_validation.html">Recursive feature elimination with cross-validation - scikit-learn 0.24.2 documentation</a></li><li><a href="https://github.com/ZL63388/data-preparation-codes">GitHub - ZL63388/data-preparation-codes: This repository is a collection of basic code templates for Data Preparation. All codes I am sharing are from the practical exercises I did from the Data Science Infinity Program.</a></li><li><a href="https://data-science-infinity.teachable.com/courses/data-science-infinity?affcode=716157_jcwmqdhh">DATA SCIENCE INFINITY</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1186168fac12" width="1" height="1" alt=""><hr><p><a href="https://medium.com/geekculture/feature-selection-in-machine-learning-correlation-matrix-univariate-testing-rfecv-1186168fac12">Feature Selection in Machine Learning: Correlation Matrix | Univariate Testing | RFECV</a> was originally published in <a href="https://medium.com/geekculture">Geek Culture</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Feature Scaling: When Should You Use Standardization and Normalization]]></title>
            <link>https://python.plainenglish.io/feature-scaling-when-should-you-use-standardization-and-normalization-ea2eabb4a1d5?source=rss-d9779db397f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea2eabb4a1d5</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Zipporah Luna]]></dc:creator>
            <pubDate>Mon, 26 Jul 2021 09:57:26 GMT</pubDate>
            <atom:updated>2021-08-10T10:00:23.375Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VKf9ZYat8HDyhpiB" /><figcaption>Photo by <a href="https://unsplash.com/@romankraft?utm_source=medium&amp;utm_medium=referral">Roman Kraft</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>What is Feature Scaling?</h3><p><strong><em>Feature Scaling</em></strong> is where we force the values from different columns to exist on the same scale, in order to enhance the learning capabilities of the model. The two most common feature scaling techniques are <strong><em>Standardization </em></strong>and <strong><em>Normalization</em></strong>.</p><h3><strong><em>Standardization</em></strong></h3><p><strong><em>Standardization</em></strong> rescales the data to have a mean of 0 and a standard deviation of 1. It assumes that your data has a Gaussian <em>(bell curve)</em> distribution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/1*eGa00UYgsdK1_XRV-02wLA.png" /><figcaption>Image by Author</figcaption></figure><p>As an example <em>(*see image above)</em>, height is measured in meters and weight is measured in kilograms. Here they somewhat have similar variation.</p><p>However, if you plot both scales on each axis on a scatter plot, the weight is much more spread out than the height which seems that both are the exactly the same even though we know that they are not. <em>(*see below image)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*OaUmuNM9NDyWfesB-KPqIw.png" /><figcaption>Image by Author</figcaption></figure><p>The reason for this is that height and weight are being measured on different scales.</p><p>To standardize your data, you take each value and subtract the mean of all values and divide them by the standard deviation so each data point is now represented by the number of standard deviation it is away from the mean which is represented by 0.</p><p>So, what’s happening under the hood of this technique? To visualize…</p><p><strong><em>First step</em></strong>: Get the total mean and standard deviation of each column</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5B6494VHjcepxToMQ91l8g.png" /><figcaption>Image by Author</figcaption></figure><p><strong><em>Second step</em></strong>: Take each value and compute accordingly as per formula.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*b_693U-uafhhVkL21t3rNQ.png" /><figcaption>Image by Author</figcaption></figure><p>Here, we are computing the first row or entry of the column height which is 1.98 minus the mean <em>(as computed above in the first step) </em>which is 1.79 and divide it with the standard deviation <em>(as computed in the first step) </em>which is 0.10954 and we get a result of 1.73.</p><p><strong><em>Third step: </em></strong>Repeat until all values are computed for both columns</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vDO8bACR38aqZtQZTZPg_w.png" /><figcaption>Image by Author</figcaption></figure><p>Now, if we plot the scaled values of both the height and weight, we can see that they are now comparable as they now exist in the same scale.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uCxU9iiDXCGdkck4-msjOg.png" /><figcaption>Image by Author</figcaption></figure><p><strong>Standardization Code Template</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/db5af40577c03b286b021c1b4da1daa4/href">https://medium.com/media/db5af40577c03b286b021c1b4da1daa4/href</a></iframe><h3><strong><em>Normalization</em></strong></h3><p><strong><em>Normalization </em></strong>rescales data so that it exists in a range between 0 and 1. It is is a good technique to use when you do not know the distribution of your data or when you know the distribution is not Gaussian <em>(bell curve)</em>.</p><p>To normalize your data, you take each value and subtract the minimum value for the column and divide this by the maximum of the column minus the minimum of the column. This means that your values will always exist between 0 and 1, with the maximum value of your column getting a normalized value of 1 and the minimum value of your column getting a normalized value of 0.</p><p>Here, you don’t need the mean or standard deviation. You only need the minimum and the maximum value for each of your column.</p><p>Using the same example earlier, this is what’s happening under the hood for Normalization.</p><p><strong><em>First step</em></strong>: Get the minimum and maximum of each column</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VrXYT9hVFalUoE_f32JtlA.png" /><figcaption>Image by Author</figcaption></figure><p><strong><em>Second step</em></strong>: Take each value and compute accordingly as per formula</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*4ksfnSDDCx3fwuF85VVc6A.png" /><figcaption>Image by Author</figcaption></figure><p><strong><em>Third step: </em></strong>Repeat until all values are computed for both columns</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W1bGW2FKGU4SHVP7aZ7mZg.png" /><figcaption>Image by Author</figcaption></figure><p>Comparing all the plots, we can now see the spread of the data of the normalized version and it looks similar to the standardized version which is often the case.</p><p>The question now is, which of the two techniques should you use in your machine learning model and when should you use either techniques? If you need your values to be positive, then go for normalization. But in general, it is common to go for standardization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mDxyttdl8OPWKA_iEkBoZA.png" /><figcaption>Image by Author</figcaption></figure><p><strong><em>Normalization </em>Code Template</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/532c32c90a0691646e1231dfc6486dab/href">https://medium.com/media/532c32c90a0691646e1231dfc6486dab/href</a></iframe><p><strong><em>Note</em></strong>: Feature scaling is not required even if it is an important step. It often comes down to the trade off between Accuracy vs. Interpretation.</p><p>If you scale your values it makes it harder to understand the true meanings of any coefficients in terms of their actual values as you have transformed it to a different scale so they can exist together. It is often worth trying to run the model with and without scaling. If it doesn’t appear to make any difference to the accuracy, then you can say that you don’t need your data to be scaled and you will have an easier interpretation of your model’s prediction.</p><p><strong><em>References:</em></strong></p><ul><li><a href="https://towardsai.net/p/data-science/how-when-and-why-should-you-normalize-standardize-rescale-your-data-3f083def38ff#:~:text=Normalization%20is%20useful%20when%20your,Gaussian%20(bell%20curve)%20distribution.">How, When, and Why Should You Normalize / Standardize / Rescale Your Data?</a></li><li><a href="https://github.com/ZL63388/data-preparation-codes/blob/main/feature_scaling.py">data-preparation-codes/feature_scaling.py at main · ZL63388/data-preparation-codes</a></li><li><a href="https://data-science-infinity.teachable.com/courses/data-science-infinity?affcode=716157_jcwmqdhh">DATA SCIENCE INFINITY</a></li></ul><p><em>More content at </em><a href="http://plainenglish.io/"><strong><em>plainenglish.io</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea2eabb4a1d5" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/feature-scaling-when-should-you-use-standardization-and-normalization-ea2eabb4a1d5">Feature Scaling: When Should You Use Standardization and Normalization</a> was originally published in <a href="https://python.plainenglish.io/">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CRISP-DM Phase 1: Business Understanding]]></title>
            <link>https://medium.com/analytics-vidhya/crisp-dm-phase-1-business-understanding-255b47adf90a?source=rss-d9779db397f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/255b47adf90a</guid>
            <category><![CDATA[business]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Zipporah Luna]]></dc:creator>
            <pubDate>Mon, 26 Jul 2021 01:03:26 GMT</pubDate>
            <atom:updated>2021-08-05T05:23:50.077Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z_JFTicCuHtsPoMq5JXE9A.jpeg" /><figcaption>Image from <a href="https://wallpapercave.com/w/wp5315781">WallpaperCave</a></figcaption></figure><p><em>This is part 2 of the 7-part series’ summary explanation of the </em><a href="https://open.sap.com/courses/ds3"><em>openSAP’s 6-week Getting Started with Data Science (Edition 2021)</em></a><em> course by </em><a href="https://www.linkedin.com/in/stuartclarkeanalytics/?originalSubdomain=uk"><em>Stuart Clarke</em></a><em>. Part 1 is </em><a href="https://zluna.medium.com/understanding-crisp-dm-and-its-importance-in-data-science-projects-91c8742c9f9b"><em>here</em></a><em>.</em></p><h3><strong>Part 1 Recap</strong></h3><p>In the <a href="https://zluna.medium.com/understanding-crisp-dm-and-its-importance-in-data-science-projects-91c8742c9f9b"><em>first part</em></a> of this series, I briefly explained what CRISP-DM is, why it is important, and what the six phases of CRISP-DM are.</p><p><strong>Six phases of CRISP-DM</strong>:</p><ol><li>Business Understanding</li><li>Data Understanding</li><li>Data Preparation</li><li>Modeling</li><li>Evaluation</li><li>Deployment</li></ol><p>Previously, I mentioned that these six phases have particular tasks and output. In this second part of the series, we will focus on the first phase which is <strong><em>Business Understanding</em></strong>. I will explain why it is important to have a business understanding before starting a data science project, the tasks, as well as the output of each task.</p><h3><strong>The Importance of Understanding the Business</strong></h3><p>As a data scientist, it is important to know what kind of business your company is in, the industry, how it runs, and basically everything related to the business, as having a thorough understanding of the business would help you in specifying precisely what its current challenges are, how to evaluate these challenges and come up with a solution or solutions, and identify the strategies to achieve the business goals.</p><p>Some data scientists may tend to forget this part or this essential step of learning about the business from a business’ perspective as they tend to focus on what problem this is, what model to use, and just start getting as much information from the dataset only to realize that it’s not what the business is looking for. Always remember that not knowing how to frame the business problem is a problem itself.</p><blockquote>“Not knowing how to frame the business problem, is a problem itself.”</blockquote><h3>The Breakdown</h3><p>In the course, Stuart have broken down the tasks and output of the first phase to better understand and cover the business needs before starting a data science project. <em>*see below</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*seyP9HRB6I1nMA1iuF3JHA.png" /><figcaption>Image from <a href="https://open.sap.com/courses/ds3">Getting Started with Data Science</a></figcaption></figure><p>In the process flow above, Business Understanding is broken down into four tasks together with its projected outcome or output in detail.</p><p>Simply put, the Business Understanding phase’s goal is to:</p><ul><li><strong><em>Determine Business Objectives</em></strong> by understanding, from a business perspective, <em>WHAT </em>the client or the company really want to accomplish and identify what are the criteria to gauge business success or project success</li><li><strong><em>Assess Situation </em></strong>by checking what needs to be done in terms of inventory of resources, the requirements, assumptions, and even the constraints of the project, the risks and contingencies, terminologies used and to be used, and lastly, the costs and benefits of the project</li><li><strong><em>Determine Data Science Goals </em></strong>by describing what your data science team or data scientist/s goals and objectives are for the project in technical terms and defining the data science success criteria</li><li><strong><em>Produce Project Plan </em></strong>by describing the plan intention for achieving the data science goals to be able to achieve the business goals, create a project plan with specific project stages, the duration, resources needed, and even the costs, and to have an initial assessment of the tools and techniques to be used</li></ul><p>In the third part, we will talk about the second phase which is the <strong><em>Data Understanding</em></strong><em>. </em>If you are working on a data science project for your company or even personal project/s, try to apply the above steps if applicable. As again, different data science projects have different sets of requirement. The CRISP-DM methodology just serves as a template to ensure you have considered all of the different aspects specific to your project.</p><p><strong><em>References:</em></strong></p><ul><li><a href="https://open.sap.com/courses/ds3">Getting Started with Data Science (Edition 2021)</a></li><li><a href="https://docs.microsoft.com/en-us/azure/architecture/data-science-process/lifecycle-business-understanding">Business understanding in Team Data Science Process - Azure Architecture Center</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=255b47adf90a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/crisp-dm-phase-1-business-understanding-255b47adf90a">CRISP-DM Phase 1: Business Understanding</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[Outliers: What it Means to be Different]]></title>
            <link>https://python.plainenglish.io/what-it-means-to-be-different-outlier-2c680e3b4742?source=rss-d9779db397f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c680e3b4742</guid>
            <category><![CDATA[aritificial-intelligence]]></category>
            <category><![CDATA[outliers]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Zipporah Luna]]></dc:creator>
            <pubDate>Fri, 23 Jul 2021 05:01:39 GMT</pubDate>
            <atom:updated>2021-08-10T10:00:53.720Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lUur2ZsIcuddt49hbnvirQ.jpeg" /><figcaption>Image by <a href="https://wallpaperaccess.com/black-sheep">WallPaperAccess</a></figcaption></figure><h4>Detecting Outliers in Machine Learning</h4><p>This is not a self-help article. It’s about detecting outliers in machine learning.</p><p>In this article, we will talk about What an Outlier is, Why an Outlier matters, and How can we detect and deal with Outliers using Python.</p><h3>The What</h3><p>An <strong><em>outlier </em></strong>is any value that differs significantly form other values. Very vague, right? But it is the most appropriate as there isn’t any one way of specifying what is and is not an outlier. It mostly comes down to one’s perception and the scenario that you’re dealing with.</p><h3><strong>The Why</strong></h3><p>You could say that an outlier is that one value that is out of place in your dataset. But just because that value is an outlier doesn’t mean that it should be removed or it should not be there as it may contain valuable information.</p><p>Outliers increase the variability in your data, which decreases statistical <a href="https://statisticsbyjim.com/glossary/power/">power</a>. Consequently, excluding outliers can cause your results to become statistically significant.</p><p><strong><em>Removing outliers</em></strong> is <strong><em>not </em></strong>always the best case and is legitimate only for specific reasons.</p><p><strong><em>Note</em></strong>: <em>In dealing with outliers, you need to be careful in considering it. As no matter how high or low that value is, it is genuinely part of your data.</em></p><h3>The How</h3><p>So, what do you do or how do you deal with outliers? Are there any options?</p><ol><li>First is, <strong><em>DO NOTHING</em></strong>.</li><li>Second, <strong><em>REMOVE THEM</em></strong>.</li><li>Last option is, <strong><em>REPLACE THEIR VALUES</em></strong>.</li></ol><p>When do you decide which of the three options above is the best?</p><ol><li><strong><em>DO NOTHING </em></strong>when you have a small amount of data. In some cases, this is fine to do.</li><li><strong><em>REMOVE THEM </em></strong>when the rows of your data contain outlier values in one or more columns. This is good option when the outliers will have a big impact on the way your model learns.</li><li><strong><em>REPLACE THEIR VALUES </em></strong>when you’re low on data and want to keep the values and avoid problems that the outliers will cause. The con of this approach is you are essentially manipulating the data itself. Note that there is no solution in replacing values. You can replace them with the mean where you can apply the method called <strong><em>Winsorizing.</em></strong></li></ol><blockquote>“<strong><em>Winsorizing is where you replace outliers with the closest value in your data that isn’t deemed to be an outlier.”</em></strong></blockquote><h3>Implementing it in Python</h3><p>There are two approaches in dealing with Outliers. One is using the Boxplot Approach, the second one is by using the Standard Deviation Approach. See below on how to implement it in Python.</p><p><strong><em>Boxplot Approach</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/570e8b25f4f85d41aff8bf5ef229c2db/href">https://medium.com/media/570e8b25f4f85d41aff8bf5ef229c2db/href</a></iframe><p><strong><em>Standard Deviation Approach</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ca5a12fa4f903503614594251a7db16b/href">https://medium.com/media/ca5a12fa4f903503614594251a7db16b/href</a></iframe><p><em>References:</em></p><ul><li><a href="https://data-science-infinity.teachable.com/courses/data-science-infinity?affcode=716157_jcwmqdhh">DATA SCIENCE INFINITY</a></li><li><a href="https://statisticsbyjim.com/basics/remove-outliers/">Guidelines for Removing and Handling Outliers in Data - Statistics By Jim</a></li><li><a href="https://github.com/ZL63388/data-preparation-codes/blob/main/outliers.py">data-preparation-codes/outliers.py at main · ZL63388/data-preparation-codes</a></li></ul><p><em>More content at </em><a href="http://plainenglish.io/"><strong><em>plainenglish.io</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c680e3b4742" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/what-it-means-to-be-different-outlier-2c680e3b4742">Outliers: What it Means to be Different</a> was originally published in <a href="https://python.plainenglish.io/">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>