<?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 Brungi Vishwa Sourab on Medium]]></title>
        <description><![CDATA[Stories by Brungi Vishwa Sourab on Medium]]></description>
        <link>https://medium.com/@vishwasourabbrungi?source=rss-78ca6b10571e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*O5ndzhhBOV34YaUtJDKQCQ.jpeg</url>
            <title>Stories by Brungi Vishwa Sourab on Medium</title>
            <link>https://medium.com/@vishwasourabbrungi?source=rss-78ca6b10571e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 14:31:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vishwasourabbrungi/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[Introduction to Evaluation Metrics]]></title>
            <link>https://becominghuman.ai/introduction-to-evaluation-metrics-e1254b81a1e8?source=rss-78ca6b10571e------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1254b81a1e8</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[evaluation-metric]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Brungi Vishwa Sourab]]></dc:creator>
            <pubDate>Thu, 05 Jul 2018 14:21:27 GMT</pubDate>
            <atom:updated>2020-05-29T05:23:56.749Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5LrpaccpeVOrA0N-QiFFgA.jpeg" /></figure><p>After building a machine learning model, if we need to measure the performance of our model, we use some metrics to evaluate them. Let us take the example of two models to explain evaluation metrics in detail.</p><ol><li>A model that detects if a person has cancer or not</li><li>A model that detects if an email is spam or not</li></ol><p>In the first model, there are four possibilities :</p><ul><li>A person has cancer and our model detected it. (True Positive)</li><li>A person has cancer and our model did not detect it. (False Negative)</li><li>A person who does not has cancer and our model detected that he had cancer. (False Positive)</li><li>A person who does not has cancer and our model detected that he did not have cancer. (True Negative)</li></ul><p>Let&#39;s build a matrix that represents the same information of 10,000 patients that were tested by our model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kz2eEoLqDHnAbKT9Gz861Q.jpeg" /><figcaption>Confusion Matrix of Cancer Detection Model</figcaption></figure><p>Similarly, In the spam detection model, there are four possibilities:</p><ul><li>A mail is a spam and our model detected it. (True Positive)</li><li>A mail is spam but our model did not detect it. (False Negative)</li><li>A mail is not spam but our model detected as spam. (False Positive)</li><li>A mail is not a spam and our model did not mark it spam. (True Negative)</li></ul><p>Here is a confusion matrix of the 1000 mails:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uX0QUM-uKFds6HNteiactQ.jpeg" /><figcaption>Confusion Matrix of Spam Model</figcaption></figure><h3>Accuracy Score:</h3><p>Accuracy is the ratio between the points that are classified correctly and the total points.</p><blockquote>“ Out of all the points, how many are correctly classified? ”</blockquote><ul><li>The accuracy score of our Cancer detection model is calculated as: (1000+8000)/10000 which is equal to 90%.</li><li>The accuracy score of our Spam detection model is calculated as: (100+700)/1000 which is equal to 80%</li></ul><h3>Trending AI Articles:</h3><blockquote><a href="https://becominghuman.ai/keras-cheat-sheet-neural-networks-in-python-738c0d170c2e">1. Keras Cheat Sheet: Neural Networks in Python</a></blockquote><blockquote><a href="https://becominghuman.ai/making-a-simple-neural-network-2ea1de81ec20">2. Making a Simple Neural Network</a></blockquote><blockquote><a href="https://becominghuman.ai/google-will-beat-apple-at-its-own-game-with-superior-ai-534ab3ada949">3. Google will beat Apple at its own game with superior AI</a></blockquote><p>The implementation of <a href="http://scikit-learn.org/stable/modules/generated/sklearn.metrics.accuracy_score.html">accuracy score</a> is pretty simple in python.</p><blockquote>from sklearn.metrics import accuracy_score</blockquote><blockquote>accuracy_score(y_true,y_pred)</blockquote><ul><li>In Cancer Detection Model, False Negative is the worst mistake as we misdiagnose a cancer patient as a healthy one.</li><li>In the spam detection model, False Positive is the worst mistake as we end up detecting a good email as spam.</li><li>So, the two models are different. Cancer Detection model needs to be a <strong>High Recall</strong> Model while Spam detection model needs to be a <strong>High Precision</strong> model.</li></ul><p>Now, What are Precision and Recall?</p><h3>Precision:</h3><p>Precision is a metric that says,</p><blockquote><strong>Out of all points that are predicted to be positive, how many are actually Positive?</strong></blockquote><p>i.e. In our cancer detection model, Out of all the patients that are detected to have cancer, how many actually had cancer?</p><p>This column is used in calculating the precision,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mGbGuCw1FqlG1bCdA2Rzfw.jpeg" /><figcaption>Precision- Cancer Model</figcaption></figure><p>Precision= 1000/(1000+800) which is equals to 55.6% (It is OK because the cancer detection model has to be less precise)</p><ul><li>In the spam detection model, the precision is calculated in a similar way i.e.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m0g20kXFUPA7lb_R9c_qsA.jpeg" /></figure><p>Precision = 100/(100+30) which is equals to 76.9%</p><p><a href="http://scikit-learn.org/stable/modules/generated/sklearn.metrics.precision_score.html"><em>Click here</em></a><em> to see precision score implementation in python</em></p><h3>Recall:</h3><p>The recall is a metric that says,</p><blockquote><strong>“Out of all positive points, how many are actually positive?”</strong></blockquote><p>i.e. In our cancer detection model, out of all the cancer patients, how many did we correctly detected?</p><p>This column is used to calculate the recall:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AfNVPYSdQXkTBmWxovPNdQ.jpeg" /><figcaption>Recall for Cancer Detection Model</figcaption></figure><p>Recall= 1000/(1000+200) which is equals to 83.3%</p><ul><li>In the spam detection model, the recall is calculated as:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qSQg0Dw5kUok8fP7QwkuMg.jpeg" /><figcaption>Recall for Spam Detection Model</figcaption></figure><p>Recall= 100/(100+170) which is equals to 37% (No worries as Spam detection model need not be a high recall model)</p><p>For detailed comparisons of different metrics, Please visit <a href="https://neptune.ai/blog/f1-score-accuracy-roc-auc-pr-auc"><strong>this blog from Neptune.ai</strong></a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2F8f5f8b%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2F8f5f8b&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/c43026df6fee7cdb1aab8aaf916125ea/href">https://medium.com/media/c43026df6fee7cdb1aab8aaf916125ea/href</a></iframe><figure><a href="https://becominghuman.ai/artificial-intelligence-communities-c305f28e674c"><img alt="" src="https://cdn-images-1.medium.com/max/255/1*2f7OqE2AJK1KSrhkmD9ZMw.png" /></a></figure><figure><a href="https://upscri.be/8f5f8b"><img alt="" src="https://cdn-images-1.medium.com/max/255/1*v-PpfkSWHbvlWWamSVHHWg.png" /></a></figure><figure><a href="https://becominghuman.ai/write-for-us-48270209de63"><img alt="" src="https://cdn-images-1.medium.com/max/255/1*Wt2auqISiEAOZxJ-I7brDQ.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1254b81a1e8" width="1" height="1" alt=""><hr><p><a href="https://becominghuman.ai/introduction-to-evaluation-metrics-e1254b81a1e8">Introduction to Evaluation Metrics</a> was originally published in <a href="https://becominghuman.ai/">Becoming Human: Artificial Intelligence Magazine</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>