<?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 Sabiha Hussain Barlaskar on Medium]]></title>
        <description><![CDATA[Stories by Sabiha Hussain Barlaskar on Medium]]></description>
        <link>https://medium.com/@sabihahussainbarlaskar?source=rss-786ae3e1a668------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*7lgAiB3s28Lq2pBb</url>
            <title>Stories by Sabiha Hussain Barlaskar on Medium</title>
            <link>https://medium.com/@sabihahussainbarlaskar?source=rss-786ae3e1a668------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 05:44:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sabihahussainbarlaskar/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[Machine Learning Explainability]]></title>
            <link>https://medium.com/@sabihahussainbarlaskar/machine-learning-explainability-4112bac25e0b?source=rss-786ae3e1a668------2</link>
            <guid isPermaLink="false">https://medium.com/p/4112bac25e0b</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[random-forest]]></category>
            <category><![CDATA[explainability]]></category>
            <category><![CDATA[decision-tree]]></category>
            <dc:creator><![CDATA[Sabiha Hussain Barlaskar]]></dc:creator>
            <pubDate>Sun, 23 Jun 2019 18:04:20 GMT</pubDate>
            <atom:updated>2019-06-23T18:05:58.273Z</atom:updated>
            <content:encoded><![CDATA[<p>Machine Learning (ML) is usually treated as a black box with little knowledge about what factors led to the decision making. The algorithms behind Machine learning are difficult to understand and explain, causing issues in its adoption among non-ML experts and experts alike and inability to test/understand important factors contributing to its predictions. Machine learning models predict a label as output based on some features as input. Using a good model can result in good prediction accuracy but it cannot explain which features were responsible for the good accuracy. Explainable AI is emerging as a new field that aims to explain how these AI agents and ML algorithms come to a decision.</p><p>Explainability is especially necessary if we are to adapt to a new world of widespread artificial intelligence with self-driving cars and IBM Watson. It aims to create a set of machine learning procedures that produce more explainable models while preserving the high level of learning performance like prediction accuracy. For example, if a bank loan is denied to a customer based on predictive features, the customers would want to know which factors were responsible for the denial. This ensures fairness on part of the ML model creators enabling transparency.</p><p>Explainable Machine learning in general increases the confidence of adopters and users in applying such systems (for example, a workshop on explainable AI in the biomedical field in PSB 2018 [1,2]). It offers more insights and new knowledge by analyzing the details of ML decision making. Details of how ML works (e.g. most important decision factors) may also be used to learn more about the underlying process leading to improvements in the process itself.</p><p>ML explainability evolving as a research area and a topic of constant discussion. As Zachary C. Lipton [3] puts it, explainability for different researchers is needed for a various number of reasons. Many researchers require it for <em>trust</em> so that the confidence of the adopters increase. End users are more likely to trust a well-explained model rather than an accurate model. Some require it for <em>causality, </em>knowing which factors were used for prediction of a certain problem. This can reveal hidden relationships<em>. </em>Some works of explainability include explainable recommendation models. Jonathan L. Herlocker et al[4], provided a model for the explainability of collaborative filtering methods that make movies recommendations, explaining how the recommendations were made and why some factors were considered. Benjamin Letham et al[5] created an explainable predictive model in the form of decision lists using rule-based and Bayesian methods. Other work includes an explanation of the decision tree to extract which is the most probable factor that led to the final decision-making process.</p><p>A recent work on explainable AI is <a href="https://homes.cs.washington.edu/~marcotcr/blog/lime/">LIME</a>, which stands for Local Interpretable Model-Agnostic Explanations. Its aim is to provide explainability for any classifier. The use case models which they have considered are Random Forests and Neural Networks. They created the pipeline to increase the trust and confidence of the adopters. They perform analysis on the classification results to evaluate if we should trust the classifier just based on its prediction accuracy. For example, if a model predicts a person has been diagnosed with Flu, LIME determines the factors that led to the prediction. If a medical practitioner can validate the ground truth of those factors, they are more likely to use that model. They have released their tool <a href="https://github.com/marcotcr/lime">here</a>.</p><h3><strong>Explainability for Random Forest classifier</strong></h3><p>There are numerous machine learning algorithms used for classification and prediction. But among them, <a href="https://www.stat.berkeley.edu/~breiman/RandomForests/cc_home.htm">Random Forests</a> is preferred as the ideal model that needs to be explained because it consists of a large number of trees with high depth, where each tree is trained by selecting a bagged sample of data and a random set of features. Comprehending the algorithm is difficult because of its complex tree building process based on feature selection. We are unable to understand which features were responsible for the decision making process. But the explainability can be achieved by computing feature importance by either permuting the values of each feature and checking how it affects the model performance or by computing the impurity each feature removes.</p><p>Random Forest explainability can be achieved by,</p><h4><strong>1. Feature ranking</strong></h4><p>This approach uses Random Forest importance measures such as <a href="https://www.stat.berkeley.edu/~breiman/RandomForests/cc_home.htm#giniimp">Gini</a>, <a href="https://dinsdalelab.sdsu.edu/metag.stats/code/randomforest.html">Mean Decrease in Accuracy (MDA)</a> and presents the results in table format or horizontal bar chart format. The results are sorted by the feature importance value. In such cases, if a feature is highly ranked then it is more important and can provide valuable insight and information about the RF classification outcome.</p><h4><strong>2. Rule extraction from trained RF</strong></h4><p>In this approach, initially, the data is trained using RF, followed by extracting a large set of rules (100K) via analysis of the trained RF trees. The number and complexity of rules are then minimized by optimizing the value of evaluation metrics. This results in the reduction of rules in the range of 10–100, each with approximately 1–10 conditions. However, a large number of rules increases complexity and there is a compromise between the number of rules and accuracy.</p><p>There are additionally numerous other researches going on to explain Random Forests using the two methods described above, where statistical experiments are performed in depth to gain more insight into explaining the model. There is also a free <a href="https://www.kaggle.com/learn/machine-learning-explainability">course</a> offered by <a href="https://www.kaggle.com/learn/machine-learning-explainability">Kaggle</a> on ML Explainability.</p><p><strong><em>References</em></strong></p><ol><li>1. D. Petkovic, R. Altman, M. Wong, A. Vigil: “Improving the explainability of Random Forest classifier — user-centered approach”, Pacific Symposium on Biocomputing PSB 2018, Hawaii</li><li>D. Petkovic (Chair), L. Kobzik, C. Re: “Workshop on Machine learning and deep analytics for biocomputing: call for better explainability”, Pacific Symposium on Biocomputing PSB 2018, Hawaii</li><li>Zachary C. Lipton, “Mythos The of Model Interpretability”</li><li>Jonathan L. Herlocker, Joseph A. Konstan, and John Riedl, “Explaining Collaborative Filtering Recommendations”</li><li>Benjamin Letham, Cynthia Rudin, Tyler H. McCormick, and David Madigan, “Interpretable Classifiers Using Rules And Bayesian Analysis: Building A Better Stroke Prediction Model”</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4112bac25e0b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Explaining Machine Learning to a newbie]]></title>
            <link>https://medium.com/@sabihahussainbarlaskar/explaining-machine-learning-to-a-newbie-cd2b6fcc8ed5?source=rss-786ae3e1a668------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd2b6fcc8ed5</guid>
            <category><![CDATA[classification]]></category>
            <category><![CDATA[regression]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[supervised-learning]]></category>
            <dc:creator><![CDATA[Sabiha Hussain Barlaskar]]></dc:creator>
            <pubDate>Wed, 13 Feb 2019 18:27:40 GMT</pubDate>
            <atom:updated>2019-02-13T19:13:35.467Z</atom:updated>
            <content:encoded><![CDATA[<p>It is always fun to understand a new concept with lots of examples. Therefore, I will follow that path too and try to explain everything with examples. But before starting, my assumption is that the reader has a basic idea of Computer Science.</p><p>Suppose, there is a basket containing a mixture of apples and oranges. If a person has to guess the name of a fruit by randomly choosing it from a basket, he/she will make the guess based on certain factors, such as the color of the fruit, the size of the fruit, shape of the fruit etc. Humans have been learning to identify things from childhood based on some factors in order to make a decision. If a person meets a toddler who has just learned to identify things and gives him/her an apple or orange for the first time, then it may be difficult for the child to say whether it is an apple or orange. The child needs to see some examples and learn from those examples to make a decision.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EiyFV3s6yJtNQ6quEoYH6A.jpeg" /><figcaption>Deciding between an Apple or Orange</figcaption></figure><p>A Machine Learning (ML) algorithm works very similarly. It learns from data to make a decision. The factors that help make a decision are called <strong>Features</strong>. By learning from data using features, it infers patterns by building mathematical models to make a decision such as classifying a fruit into an Apple category or an Orange category, predicting the price of a house etc. The category into which the classification is performed (apple or orange) is called the <strong>Label</strong>.</p><p>In case of data structure algorithms such as sorting, searching etc a machine explicitly follows a set of instructions. With ML algorithms, a machine learns using a set of historical data to make a decision. That is why it is called Machine learning algorithms.</p><p>For example, when an algorithm calculates the sum of two numbers it is following a set of instructions to take two numbers as input and displays the sum. It doesn’t have to learn from a huge data set to derive patterns in order to calculate the sum. But if we take another example, where a machine needs to classify emails into “spam” and “non-spam” category, it has to learn from data. Everyone uses Gmail where there is a folder called “Spam”. Google classifies email into spam and non-spam categories using ML algorithms. Not all emails have the same content and there are millions of emails which Google needs to look into. It is just not possible to write a simple rule-based algorithm to classify the emails. For example, a person may receive a spam email which says, <em>“WIN 1 million dollars LOTTERY if you click on this link”</em><br>Again, there may be emails which contain words in large red letters, which are considered spam as well. So, there are different kinds of spam emails. A standard format cannot be followed and there is a need for an algorithm that learns to distinguish between spam and nonspam using some features. The description of the algorithm used for classification is beyond the scope of this article and probably I will explain it in a later article.</p><h3><strong>Training and Testing data</strong></h3><p>As I have already mentioned, an ML algorithm needs a set of data with some labels to learn.<br>For example, a set of emails marked as spam and non-spam.<br>This data is called the Training data. An ML algorithm always needs training data. The algorithm finds patterns in the training data to learn from it.<br>It may see that most of the emails marked as spam have contents like <em>WIN,</em> <em>LOTTERY</em>, <em>Free</em>, pornographic words, etc and non-spam emails do not consist of these words. Therefore, it will learn from this set of data by extracting features. In this case, the features will be the set of words present in the email and the label will be “spam” or “non-spam”.<br>It will be provided a set of Test data to test its learning. Based on what it has learned, it will classify the data in the test email as spam or non-spam.</p><p>I like to provide another analogy to help understand it better. During an exam, students prepare from textbooks or class notes. Those sources may consist of all materials needed to prepare for the exam. In short, this is the training data. But during the test, they need to guess the answers based on whatever they have learned from the training data. The content of the test is the testing data.</p><h3>Types of Machine Learning algorithms</h3><p>For beginners, I would like to introduce the two types of Machine learning algorithms most widely used:</p><ol><li>Supervised</li><li>Unsupervised</li></ol><p>In Supervised algorithms, the training data consist of both the features and labels. For example, in the spam classification example, the training data will consist of both the bag of words as features and each record will have the label “spam” or “non-spam”.</p><p>In Unsupervised algorithms, the data do not have any set of labels to learn from. It learns the inherent structure of the data to make a decision. An example will be identifying customer segments who may like a product. The algorithm will cluster together a set of customers related to each other because they have similar buying patterns. The cluster becomes useful while recommending them to buy some products via advertisements. Companies like Target, Amazon etc use these kinds of algorithms.</p><h3>Classification and Regression</h3><p>Classification and regression fall under the category of supervised algorithms.</p><p>Classification algorithms classify data into categories. For example, classifying into spam and non-spam, classifying a tweet into positive or negative tweets, etc.</p><p>Regression algorithms predict a <a href="https://en.wikipedia.org/wiki/Continuous_or_discrete_variable">continuous-valued</a> output. For example, predicting the price of a house based on features like location, number of rooms, area etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*Yt-3Ia_KtvS9odC7acLTGQ.png" /><figcaption>The Machine learning hierarchy described in the article</figcaption></figure><h3>References</h3><ol><li><a href="https://en.wikipedia.org/wiki/Machine_learning">https://en.wikipedia.org/wiki/Machine_learning</a></li><li><a href="https://en.wikipedia.org/wiki/Unsupervised_learning">https://en.wikipedia.org/wiki/Unsupervised_learning</a></li><li><a href="https://www.udacity.com/course/intro-to-machine-learning--ud120">https://www.udacity.com/course/intro-to-machine-learning--ud120</a></li><li><a href="https://unsplash.com/">https://unsplash.com</a></li></ol><p>Thanks for reading! There are tons of sources on the internet from where you can get a basic understanding of Machine learning. But I have met people who still struggle with some technical jargons present in those resources. Therefore, this is my small attempt to simplify the understanding for a completely new beginner with some examples which everyone can relate to.</p><p>This is my first article in Medium, any feedback/suggestions regarding this article will be highly appreciated.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd2b6fcc8ed5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>