<?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 Jasmine Vasandani on Medium]]></title>
        <description><![CDATA[Stories by Jasmine Vasandani on Medium]]></description>
        <link>https://medium.com/@jasmine.vasandani?source=rss-7ee6a045d4f5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*-Qky738EOpDgtlJLjbxIVw.png</url>
            <title>Stories by Jasmine Vasandani on Medium</title>
            <link>https://medium.com/@jasmine.vasandani?source=rss-7ee6a045d4f5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 11:17:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jasmine.vasandani/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[Build Your Portfolio With These Data for Good Project Ideas]]></title>
            <link>https://medium.com/data-science/build-your-portfolio-with-these-data-for-good-project-ideas-919254357a66?source=rss-7ee6a045d4f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/919254357a66</guid>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[social-justice]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Jasmine Vasandani]]></dc:creator>
            <pubDate>Fri, 05 Jul 2019 13:54:55 GMT</pubDate>
            <atom:updated>2021-04-21T12:15:13.868Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IWIe4dBVD8IXoW69npnQDg.jpeg" /><figcaption>Credit: <a href="https://unsplash.com/photos/2LJ4rqK2qfU">Unsplash</a></figcaption></figure><h4>From Data Visualization to Data Science, Get Inspired to Create Something.</h4><p><em>This article was inspired by a talk I gave titled “Data (Science) for Good” at </em><a href="https://widusa.com/"><em>Women in Data</em></a><em>’s “</em><a href="https://www.eventbrite.com/e/building-your-data-science-toolbox-hosted-by-women-in-data-tickets-59582299261#"><em>Building Your Data Science Toolbox</em></a><em>” symposium.</em></p><p>During my journey to becoming a data scientist, I built my portfolio with projects that showcased my hard skills while also contributing to social causes. For instance, when I noticed that sports analytics didn’t have many analyses on women’s sports teams, I used an unsupervised machine learning algorithm to build a <a href="https://towardsdatascience.com/how-machine-learning-made-me-fall-in-love-with-the-wnba-278f06eee503">dream team of WNBA players</a>. Or when I kept hearing about bias in artificial intelligence, I decided to build a machine learning model that <a href="https://towardsdatascience.com/knowyourai-developing-a-framework-to-address-bias-in-facial-expression-recognition-b3b8040b0a68">mitigated bias in AI</a>. In both of these projects, I showcased my hard skills as a data scientist while also contributing to the greater good and upholding my values. To give back to the community of data professionals, I wanted to share some resources and tips to help you boost your portfolio with data for good projects.</p><h3>Let Go of Fear and Just Start</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IImHxKY0Yxr7h9eiyW2KAA.jpeg" /><figcaption>Credit: <a href="https://www.flickr.com/photos/wocintechchat/">WOCinTech Chat</a>.</figcaption></figure><p>The first tip I want to share with you is to let go of fear and start using the skills you already have to work on a data project. Early in my journey to becoming a data scientist, I was most comfortable with using Excel to interpret data. At the time, I didn’t know how to develop machine learning models in python. Using just the skills I had back then, I could have started working on data-driven projects — but the only thing that held me back was fear. If you’re in the early stages of learning specialized, hard skills to become a data professional, you can still work on projects using the existing skills you have. I wish I could go back in time and tell myself this, but since I can’t I’m writing this article to tell you instead — just start! I try to include resources here that everyone can be inspired by, no matter how novice or expert you are.</p><h3>Create a Project Workflow</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L_xqaKq5_T7m2RlEexxe0g.png" /><figcaption><a href="https://towardsdatascience.com/a-data-science-workflow-canvas-to-kickstart-your-projects-db62556be4d0">Download the Data Science Workflow Canvas.</a></figcaption></figure><p>Whether you know what kind of data-driven projects you want to work on or you’re still not sure, start brainstorming your ideas. Brainstorming, strategizing, ideating — the one thing that these words have in common is the tenant that there’s no such thing as a “wrong” idea. For anyone that wants a structured way to brainstorm data science project workflows, I designed <a href="https://towardsdatascience.com/a-data-science-workflow-canvas-to-kickstart-your-projects-db62556be4d0">this canvas</a> (pictured above) to help you get started. If you need other tools to help you strategize a project workflow, you can also try <a href="https://mindmapsunleashed.com/10-really-cool-mind-mapping-examples-you-will-learn-from">hand-drawing</a> or <a href="https://venngage.com/blog/mind-map-templates/">digitizing mind-maps</a>, using <a href="https://designthinking.ideo.com/resources">design thinking tools</a>, or simply opening up a blank word document (or a flipping to a blank page in your notebook if you’re an analog type of person) and start writing down your ideas.</p><h3>Data for Good Datasets</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_o81YbJg_qxXhHaZFWiWhQ.jpeg" /><figcaption>Credit: <a href="https://unsplash.com/photos/oqStl2L5oxI">Unsplash</a></figcaption></figure><p>Now that you have an idea for how to strategize your project workflow, you can start getting your hands dirty with these data-for-good datasets. Or you can also scrape your data, or get out there and collect your own. Most of the portals I’m sharing in the list below provide easy-to-download datasets. Some of these resources are not purely focused on “data for good” but still have relevant datasets that you can download. And lastly, these are just a few out of the <em>many</em> datasets out there!</p><ul><li><a href="https://data.humdata.org/">The Humanitarian Data Exchange</a></li><li><a href="https://artofstat.shinyapps.io/ArtistDiversity/">Diversity of Artists in Major U.S. Museums</a></li><li><a href="https://ocrdata.ed.gov/">Civil Rights Data Collection</a></li><li>Government Open Databases: <a href="https://catalog.data.gov/dataset">U.S. Open Data</a>, <a href="https://www.forbes.com/sites/metabrown/2018/04/29/city-governments-making-public-data-easier-to-get-90-municipal-open-data-portals/#673510355a0d">U.S. cities open data</a></li><li><a href="https://www.ncdc.noaa.gov/cdo-web/">Climate Data</a></li><li><a href="http://datatopics.worldbank.org/gender/">Gender Data Portal</a></li><li><a href="https://healthdata.gov/search/type/dataset">Health Data</a></li><li><a href="https://www.kaggle.com/c/data-science-for-good-city-of-los-angeles/data">Kaggle’s Data Science for Good: City of Los Angeles</a></li><li><a href="https://www.acrossthetimeline.com/">Across the Timeline</a></li><li><a href="http://diversitydata.org/">Diversity Data</a></li><li><a href="https://data.fivethirtyeight.com/">FiveThirtyEight: Our Data</a></li><li>Or you can use <a href="https://toolbox.google.com/datasetsearch">Google’s Dataset Search</a> to find something else</li></ul><h3><strong>Data Visualization</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*uZqnSW02ZLhzwibImOSGWA.jpeg" /><figcaption>Credit: <a href="https://www.amazon.com/W-Boiss-Data-Portraits-Visualizing/dp/1616897066">Amazon</a></figcaption></figure><p>Data visualization can be a powerful tool to convey the insights that you’ve gathered from your data analysis, especially if you’re working on a data-for-good project. These are some of my favorite resources that showcase data visualizations for good.</p><ul><li><a href="https://books.google.com/books/about/W_E_B_Du_Bois_s_Data_Portraits.html?id=zft0DwAAQBAJ&amp;source=kp_book_description">W.E.B. Du Bois’s Data Portraits: Visualizing Black America</a></li><li><a href="https://www.theguardian.com/profile/mona-chalabi">Mona Chalabi</a></li><li><a href="http://giorgialupi.com/data-humanism-my-manifesto-for-a-new-data-wold">Giorgia Lupi</a></li></ul><h3>Publications/Blogs</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JkjkZmLmEcNnr8tYGqWFlw.png" /><figcaption>Source: <a href="https://www.gaytascience.com/">Gayta Science</a></figcaption></figure><p>These are just a few blogs and/or publications that feature a collection of data-driven articles.</p><ul><li><a href="https://pudding.cool/topics/#music">The Pudding</a></li><li><a href="https://www.gaytascience.com/">Gayta Science</a></li><li><a href="https://medium.com/her-hoop-stats">Her Hoop Stats</a></li><li><a href="http://c4sr.columbia.edu/projects">Center for Spatial Research</a></li><li><a href="https://bookbook.pubpub.org/data-feminism">Data Feminism</a> (<em>hat tip Mitchell Bohman for sharing this with me!)</em></li><li><a href="https://datasociety.net/">Data&amp;Society</a></li></ul><h3>Get Involved</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kgOMgpyOe3qwpRKUQcQ3tg.jpeg" /><figcaption>Credit: <a href="https://unsplash.com/photos/C4G18Paw0d4">Unsplash</a></figcaption></figure><p>There are so many ways to get involved and build communities around the notion of “data for good.” Here are a few resources of ways you can get involved, whether it be through volunteering for an organization or attending a conference.</p><ul><li><a href="http://d4bl.org/">Data for Black Lives</a></li><li><a href="http://ai-4-all.org/">AI4All</a></li><li><a href="https://www.latinxinai.org/">LatinX in AI</a></li><li><a href="https://www.datakind.org/">DataKind</a></li><li><a href="https://widusa.com/">Women In Data</a></li><li><a href="https://blackinai.github.io/">Black in AI</a></li><li><a href="http://wimlds.org/">Women in Machine Learning and Data Science</a></li><li><a href="https://dataforgood.ca/">Data For Good: Canada</a></li><li><a href="https://rladies.org/">R-Ladies</a></li><li><a href="https://www.pyladies.com/">PyLadies</a></li><li><a href="https://sites.google.com/view/queer-in-ai/home">Queer in AI</a></li></ul><h3>Conclusion</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uOy8xfh1CrhhkOAmdzVDww.jpeg" /><figcaption>Credit: <a href="https://unsplash.com/photos/SZgVZPbQ7RE">Unsplash</a></figcaption></figure><p>I hope that these resources inspire you to create data-for-good projects! Remember that these resources are just a snapshot of what’s available. If you want to share more resources or projects that you’ve worked on, comment below!</p><p>—</p><p><em>Thanks to Anuva Kalawar for always sharing data-for-good resources with me.</em></p><p><em>Jasmine Vasandani is a data scientist and strategist. You can learn more about her here: </em><a href="https://github.com/jasminevasandani/about_jasmine">https://github.com/jasminevasandani/about_jasmine</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=919254357a66" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/build-your-portfolio-with-these-data-for-good-project-ideas-919254357a66">Build Your Portfolio With These Data for Good Project Ideas</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[#KnowYourAI: Developing a Framework to Address Bias in Facial Expression Recognition]]></title>
            <link>https://medium.com/data-science/knowyourai-developing-a-framework-to-address-bias-in-facial-expression-recognition-b3b8040b0a68?source=rss-7ee6a045d4f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/b3b8040b0a68</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-journalism]]></category>
            <category><![CDATA[art]]></category>
            <dc:creator><![CDATA[Jasmine Vasandani]]></dc:creator>
            <pubDate>Wed, 29 May 2019 12:28:04 GMT</pubDate>
            <atom:updated>2022-01-04T03:10:20.082Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hiAZEugIHQhU3zUD-4F57g.png" /><figcaption>Image: A dancer depicting the navarasa (nine emotions), source: <a href="http://shakti.e-monsite.com/en/pages/useful-links/face-expressions.html">shakti-e.monsite.com</a>.</figcaption></figure><h3>Bias in Facial Expression Recognition</h3><h4>How I used South Asian art aesthetics to build a convolutional neural network.</h4><p>One of my favorite TV shows growing up was The Discovery Channel’s docu-series, “<a href="https://en.wikipedia.org/wiki/List_of_How_It%27s_Made_episodes">How It’s Made</a>.” It’s a show that reveals how everyday objects — from aluminum foil to laboratory glassware — are made. The narrator’s calm voice explains the process while you watch automated machines, sometimes with the help of factory workers, effortlessly and quickly build objects. Consider the physical objects around you; you could probably make an educated guess about how they’re made or what they’re made out of. But what if I asked you to tell me what exactly happens when you look at your phone to unlock it, you ask Siri or Alexa to do something for you, or how words and whole sentences are autocompleted for you before you type? In other words, do you know how your artificial intelligence (AI) is made?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*bGMxqmRNbVxL1p0ujch_wQ.gif" /><figcaption>A machine testing highlighters after they’ve been made. Source: <a href="https://www.huffpost.com/entry/how-its-made-gifs_n_4596781?guccounter=1&amp;guce_referrer=aHR0cHM6Ly93d3cuZ29vZ2xlLmNvbS8&amp;guce_referrer_sig=AQAAAKSpQ-vEtgZ0Arf2HvGY5Ubd0KgftlA58UrQFelpGHxzYySkBbodqAz8wJCLPvpI5q0nbTg9DbuJo6XBm6IrVzCp7NLZRDra8CRmIsgy8XAOYnspHD5zxTL_LntNqqAU-8tEe_534Xl2x77IP_6Tz6Ex2W4qPugDIe6B6oWCVetB">huffpost.com</a></figcaption></figure><p>AI is seamlessly integrated into our lives and makes countless decisions for us that we may not even be aware of. But the presence of AI runs deeper than merely assisting us with our daily tasks. The decisions that AI make for us have the potential to be biased. Police departments using “<a href="https://www.technologyreview.com/s/612775/algorithms-criminal-justice-ai/">criminal risk assessment algorithms</a>” are targeting low-income and minority populations as being more likely to commit a crime, cars that are being self-driven <a href="https://www.vox.com/future-perfect/2019/3/5/18251924/self-driving-car-racial-bias-study-autonomous-vehicle-dark-skin">can’t detect dark-skinned pedestrians</a>, and many major tech companies have a <a href="http://time.com/5520558/artificial-intelligence-racial-gender-bias/">difficult time recognizing</a> the faces of women and people of color — the list goes on. It’s important now more than ever to #KnowYourAI.</p><p>Driven by my curiosity to understand how things work, I decided to build my own AI system that does not perpetuate bias against underrepresented communities. I developed a facial recognition system that detects emotions from people’s faces based on a framework that tackles bias in AI. In this post I’ll walk you through the overarching steps I took to develop this project, but if you want to engage deeper with my code and analysis, check out my <a href="https://github.com/jasminevasandani/know-your-ai">GitHub repository</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OllJyTACu5dP8j28o_hP_A.png" /><figcaption>I developed a facial recognition system that detects emotions from people’s faces.</figcaption></figure><h3>Step 1: Understanding how bias in AI exists</h3><p>When AI is biased, <strong>the data</strong> that is being collected is not inclusive or it’s selectively chosen to promote a certain (biased) narrative. Additionally, <a href="https://www.theguardian.com/technology/2019/apr/16/artificial-intelligence-lack-diversity-new-york-university-study"><strong>the people</strong> who are making decisions</a> about an AI system affect the outcomes of that project. Finally, <strong>the frameworks</strong> used to analyze data are understood as scientific truth when they are actually based on specific social beliefs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0pfG8z719Uf7cpKPZl9rGQ.png" /><figcaption>Addressing bias in AI by understanding the data (how and what data is collected), the people (who are responsible for collecting and/or analyzing that data), and the frameworks (how the data is analyzed). Credit: Jasmine Vasandani.</figcaption></figure><p>Here’s how I made sure that I wasn’t perpetuating bias in my project:</p><ol><li><strong>Data</strong>: My dataset includes images of people of color, gender non-conforming people, young and old people, and people with facial accessories.</li><li><strong>People</strong>: I am a queer woman of color data scientist and am affected by and deeply concerned with bias in AI.</li><li><strong>Framework</strong>: To classify emotions, I moved away from generic categorizations like “happy,” “sad,” “angry,” and instead referred to emotions as they are defined by the <em>navarasa </em>(or nine emotions).</li></ol><h3>Step 2: Using the “navarasa” to classify emotions</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*q-LHaPS61rkoRd3nygxYEQ.png" /><figcaption>The navarasa. Image credit: Leesa Mohanty.</figcaption></figure><p>To detect facial expressions from images, I built a convolutional neural network (CNN, or convnet), which consists of a series of layers that processes an image and tells you what emotions it “sees” in the image. It was up to me to tell the convnet what types of emotions to detect. It was important for me to not use a generalized framework for understanding emotions because every culture has <a href="https://www.apa.org/news/press/releases/2011/09/facial-expressions">its own way</a> of categorizing emotions. For example, a wink here (wherever “here” is for you) may not mean the same thing as a wink somewhere else. Instead, I implemented the <em>navarasa</em> as a framework to classify emotions. The <em>navarasa</em> were defined in the Sanskrit text, <em>Natya Shastra</em> (200 BCE — 200 CE or 500 BCE — 500 CE), written by Bharata Muni who was a South Asian artist and philosopher. The <em>Natya Shastra</em> is considered to be the foundational text for classical South Asian arts today. This text coined the Sanskrit term <em>rasa</em>, which can be literally translated to mean “sap” or “juice”, but can also mean “essence,” “taste,” “flavor,” or “emotion.” In the text, Bharata states that the <em>navarasa</em> are “the basis of all human emotions.”<a href="https://www.telegraphindia.com/opinion/powerful-feelings/cid/1448393">¹</a> The nine emotions that make up the <em>navarasa</em> are:</p><ul><li><em>adbhuta</em> (astonishment)</li><li><em>bibhatsa</em> (disgust)</li><li><em>bhayanaka</em> (fear)</li><li><em>hasya</em> (joy)</li><li><em>karuna</em> (sorrow)</li><li><em>roudra</em> (anger)</li><li><em>santa</em> (peace)</li><li><em>srngara</em> (love)</li><li><em>veera</em> (confidence)</li></ul><p>The <em>navarasa </em>can be translated differently, but I’ll just stick to the above translations. Using the <em>navarasa </em>as a framework to classify emotions was just a first step for me. In future iterations of this project, I hope to implement other cultural emotional frameworks to better represent the complexities of human expression through AI. Now that I determined my framework, it was time for me to build a dataset of images that I would use to feed into the convnet.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F0eRsoMMHxnw%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D0eRsoMMHxnw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F0eRsoMMHxnw%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/bfbd69b9438e91a457183f7fa209963f/href">https://medium.com/media/bfbd69b9438e91a457183f7fa209963f/href</a></iframe><h3>Step 3: Building an inclusive image dataset</h3><p>Everything about the convnet that I’m using to build a facial expression detector is customizable. For example, I could have used a convnet to build a system to tell me what furniture is shown in images of rooms, how old a person is based on images of faces, what colors appear in images, and so on. For my convnet, I’ve already customized the outputs, which are the <em>navarasa</em>. But now I need to tell the model what kinds of images to detect the <em>navarasa </em>in. To build my image dataset, I hand-picked 1,035 images where a majority of the faces were representative of either people of color, gender non-conforming people, young and old people, or people with facial accessories.</p><p>The images I used came from these sources:</p><ul><li><a href="https://broadlygenderphotos.vice.com/">Vice’s Gender Spectrum Collection</a></li><li><a href="https://www.flickr.com/">Flickr</a></li><li><a href="https://www.pexels.com/">Pexels</a></li><li><a href="https://unsplash.com/">Unsplash</a></li><li><a href="https://www.flickr.com/photos/wocintechchat/">Women of Color in Tech stock photos</a></li><li><a href="http://cvit.iiit.ac.in/projects/IMFDB/">Indian Movie Face Database</a></li><li><a href="http://www.consortium.ri.cmu.edu/ckagree/">Kanade, T., Cohn, J. F., &amp; Tian, Y. (2000)</a></li><li><a href="https://fei.edu.br/~cet/facedatabase.html">Brazilian FEI Face Database</a></li></ul><p>Building a large dataset while making sure the images were not only inclusive but also representative of the nine emotions of the <em>navarasa</em> was a difficult task. I collected almost equal amounts of images per emotion but could have built a larger dataset if there were fewer emotions to organize the images into. The quality of my dataset could be improved upon and I hope to continue to build an image database of inclusive faces expressing a wide variety of emotions. Below is a preview of what the images look like when they’re classified according to the <em>navarasa</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*WX3MJn_TnTO4ZypRWUM0TQ.png" /><figcaption>My images dataset categorized into the navarasa. Image source for <a href="https://www.flickr.com/photos/tjook/4746803656/in/photolist-9XdG49-vcFh7S-62Lxcp-pZWg1t-ain93R-4pF4Tj-qVmc3t-nAdLsE-6AvFTU-eEBsvZ-oeP8XZ-8VQ7Mk-nSHdPx-Ji7CH-nQkN6k-8esBmm-bnJ5Xz-N3Wfum-WKbD95-q1eDgh-e7wfGD-iGsRxx-aHcyre-rBfkRk-az6phv-avEQh5-aipWsh-dNyWsX-XtizkB-jbhRuk-9rgG3b-nZ9ti4-YoYm6E-31Dnp-p4jisb-qouL-9JdMW-4pSazz-8NpcSZ-pHLuGS-8moqdb-dQGBn4-4BZ2ib-p4jivC-21X7AXj-9goFCZ-95nxEX-bo1c8t-bCumKj-q1eRpW">srngara face</a>.</figcaption></figure><h3>Step 4: Prepping images to train my model</h3><p>I now have my inputs (image dataset) and outputs (<em>navarasa</em>) for my convnet. Now I need to get ready to build and activate my convnet so that it can start predicting facial expressions from images. The next step in the process is to make sure all images are the same dimensions and of the same color scheme. So I went through my entire image dataset and set each image to the same rectangular dimensions, and made them all grayscale. Using python, I detected faces from images, cropped them to a specific size, and converted them to grayscale. I could have chosen a different dimension to set all images to and kept them as color images, but these parameters worked best for my dataset in particular.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BNn3ScpBsxpYy2IsvKpvkw.png" /><figcaption>Image processing: detect face, crop, and convert to grayscale.</figcaption></figure><p>In addition to the specifications above, all my images need to be in the form of numeric values in order to be processed by my convnet. So I converted the images into a <a href="https://en.wikipedia.org/wiki/Matrix_(mathematics)">matrix</a> consisting of their pixel values. In the image below, the far left figure shows a pixelated image, the middle shows the values corresponding to the colors of the pixel, and the left shows what the image looks if it were depicted just by its pixel values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*c-nkRVNnNikQnzUz-XFjDw.png" /><figcaption>Far left: pixelated, middle: pixelated with values, far right: pixel values. Image source: <a href="http://ai.stanford.edu/~syyeung/cvweb/tutorial1.html">http://ai.stanford.edu/~syyeung/cvweb/tutorial1.html</a>.</figcaption></figure><p>Converting images to a matrix of pixel values was relatively easy to do, and here are the basics of how to do it in python.</p><pre><strong>import</strong> <strong>numpy</strong> <strong>as</strong> <strong>np<br>from</strong> <strong>PIL</strong> <strong>import</strong> Image</pre><pre>#Create a variable to store the path to your image directory<br>image_dir = #image_directory_path</pre><pre>#Open the image<br>img = Image.open(image_dir)</pre><pre>#Convert the image to a numpy array<br>np.array(img)</pre><h3>Step 5: Implementing convolutional neural networks (convnet)</h3><p>In very basic terms, a convnet processes the pixel values of an image through a series of layers, where each layer locates visual trends in an image. For example, if an image of someone smiling passes the layers of a convnet, the convnet will identify the upturned mouth, <a href="https://www.wikihow.com/Smize">smizing</a> eyes, and elevated cheeks as unique characteristics belonging to a smiling face. So when another image of a person smiling passes through the convnet, it will tell you that the person in the image is smiling. Below is a visualization of the layers of a convnet. An image (the input on the far left) gets passed through the layers of a convnet, and the output is one of the nine <em>navarasa</em>. If you want to dive deeper into convnets and understand them better, check out this <a href="https://www.youtube.com/watch?v=aircAruvnKk">video tutorial</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_z3-66GbSonV3J647UP1HQ.png" /><figcaption>An example of what the layers of a convnet look like. In this example, if the input image were to be passed through the model, its output would be “santa” (peace).</figcaption></figure><p>Convnets work best with large datasets, but mine was relatively small with only a little over 1,000 images. Luckily, there’s a tool called<a href="https://keras.io/preprocessing/image/">ImageDataGenerator</a> to remedy my problem of having a small dataset. Through implementing ImageDataGenerator, every image in my dataset received minor tweaks, like being flipped, zoomed in, tilted, and so on. This process tricked the convnet into thinking I was processing a much larger dataset of unique images. If you want to know the accuracy and loss values of the convnets that I built, check out my <a href="https://github.com/jasminevasandani/know-your-ai">GitHub repository</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T1eyjEAbLex8qvakpKQERA.png" /><figcaption>An example of how an image gets altered to trick the convnet into thinking there are new images being introduced to it. <a href="https://www.flickr.com/photos/istolethetv/14547691835/in/photolist-oawHX2-MoQjvg-6JGaA5-HYdVtW-q1eLJd-eAgHvG-p4ndog-q16Pjx-ZnewPd-pHFi3Z-eAeqyP-9UZu2w-7kq24n-aiTZTf-gqi1T-pHHmuy-kYe27-2LURLm-8VTg3Y-6p68bA-qovm-Kz3Xy-pHHreU-dYZZGa-AKSRe-8dVuHW-duDNw2-aiTZph-d6ekGm-WNRTKn-p4jiCS-7mTWPN-pHLAZw-eAigCL-q168Uv-a7DxQd-i2dZo4-nVizxY-6JBVbB-gp1Gm-HYdHD3-p4njnR-nQG9z5-asfFGj-62LwUH-hsFKq-4rTTJh-cKzJK5-pY1cDY-d6efmY">Image source</a>.</figcaption></figure><h3>Step 6: Predicting the “navarasa” from images</h3><p>Finally, I can now generate predictions based on what emotions the convnet thinks the images are expressing. The convnet will only predict which <em>navarasa </em>it thinks is being expressed in an image, it will also tell you which of the other <em>navarasa </em>it detected in the image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*1PSLvFeWm3uZ39bQtj6Sgw.png" /><figcaption><strong>PREDICTION #1.</strong></figcaption></figure><p>In the “Prediction 1” visualization, there is an image of a person who is expressing <em>veera </em>(confidence). The convnet made an accurate prediction and was 55% confident that it detected <em>veera </em>in the image. The convnet also saw traces of <em>roudra </em>(anger), <em>karuna</em> (sorrow), and other emotions in the image. Since <em>veera</em> received the highest probability, the convnet chose this emotion as its final prediction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*02GA5t4cWHJAeEsUsl9hwg.png" /><figcaption><strong>PREDICTION #2</strong>. <a href="https://www.flickr.com/photos/elsie/194190566/in/photolist-iah6d-Ef1spU-4WGJUf-8fMdRs-ibsSwE-Q8B4nc-tcfam-86DEUW-9WgVjD-8fMfpL-2bk9r3T-SaFyS9-2cjBMSL-4d6ZZY-au9oGf-8VQcD4-AeeVZ-f1twt6-3ZNYnZ-3DESNa-cxm8Jj-bnJ7iV-jswjT-8bee5i-Za363N-8muQCn-8NpcVz-9HH3cE-eAgFtY-cK8Ukf-fw6jh2-eAgNEQ-5fRiqV-8VQ8bg-8Nsikm-HZXa6L-6xQbxB-oVLY2z-9DgEpY-eAgKFA-9DdKkx-8cie2v-24uiHV-8bYaeJ-N27C7-5mtZsF-2a76gzY-8esBcb-riaFPr-2U22rj">Image Source</a>.</figcaption></figure><p>In the “Prediction 2” visualization, there is an image of a person who is expressing adbhuta (astonishment), but the convnet’s strongest prediction was only 15% and it was for the incorrect emotion of bhayanaka (fear). The inaccurate prediction could have been caused for many reasons, some of which being this image maybe did not resemble the other images in its particular rasa (emotion), the quality of the photo is poor, and so on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/1*UfaEWE-XyZX7vVYC4AmVlw.png" /><figcaption><strong>PREDICTION #3.</strong></figcaption></figure><p>In the “Prediction 3” visualization, there is an image of a person who is expressing <em>hasya </em>(joy). The convnet was pretty much 100% sure that this was an image of someone expressing joy.</p><h3>Conclusions and Next Steps</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*L-HdM4EdWcoNXLcmgHyymA.jpeg" /><figcaption>Artistic depiction of the navarasa. <a href="https://in.pinterest.com/pin/294000681896061451/visual-search/?x=16&amp;y=11&amp;w=530&amp;h=374">Source</a>.</figcaption></figure><p>Using entirely opensource resources and working under a limited timeframe, I was able to build an AI system that did not perpetuate bias against underserved communities. First, I identified how bias in AI is perpetuated: through what data is collected, who interprets the data, and how the data is analyzed. I used this framework to directly address and mitigate bias in my project. It was easy for me to determine my next steps, which was to build an inclusive image dataset and develop a prediction AI based on culturally-specific emotions. With more time and resources, I would have expanded my dataset to include more images and artistic depictions of the <em>navarasa</em>, worked with collaborators, and tested out more AI methodologies. Overall, I’m pleased with the outcomes of this project because it helped me develop a project-based framework to address bias in AI.</p><p>As a reader of this post, whether you’re an AI expert or not, I hope I’ve inspired you to be more curious to #KnowYourAI.</p><p><strong>To view the code used in this project, check out my </strong><a href="https://github.com/jasminevasandani/know-your-ai"><strong>GitHub repository</strong></a><strong>.</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FQ4djyXBnYPU%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DQ4djyXBnYPU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FQ4djyXBnYPU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/26a3057c04e71431f409f4fbf6b1045d/href">https://medium.com/media/26a3057c04e71431f409f4fbf6b1045d/href</a></iframe><p><em>Thanks to the following people who supported and guided me as I completed this project: Anuva Kalawar, Adiwid (Boom) Devahastin Na Ayudhya, Matthew Brems, Riley Dallas, Tim Book. A special thanks again to Anuva Kalawar, for whom this project would not have existed.</em></p><p><em>Jasmine Vasandani is a data scientist. You can learn more about her here: </em><a href="http://www.jasminev.co/"><em>www.jasminev.co/</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b3b8040b0a68" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/knowyourai-developing-a-framework-to-address-bias-in-facial-expression-recognition-b3b8040b0a68">#KnowYourAI: Developing a Framework to Address Bias in Facial Expression Recognition</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Data Science Workflow Canvas to Kickstart Your Projects]]></title>
            <link>https://medium.com/data-science/a-data-science-workflow-canvas-to-kickstart-your-projects-db62556be4d0?source=rss-7ee6a045d4f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/db62556be4d0</guid>
            <category><![CDATA[personal-development]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[strategy]]></category>
            <dc:creator><![CDATA[Jasmine Vasandani]]></dc:creator>
            <pubDate>Sun, 05 May 2019 13:24:05 GMT</pubDate>
            <atom:updated>2019-05-13T02:12:00.117Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C6LEasRvrhsaHJR2d0soyg.jpeg" /><figcaption>Photo Credit: <a href="https://www.wocintechchat.com/">https://www.wocintechchat.com/</a></figcaption></figure><h4>Use this guide to help you complete your data science projects.</h4><p>Learning from my own mistakes and best practices, I designed a <a href="http://bit.ly/data-science-canvas"><strong>Data Science Workflow Canvas</strong></a><strong>*</strong> to help others achieve their own data science projects. This canvas helps you prioritize your goals first and then work backward to achieve them. You can think about it this way: instead of following steps in a recipe to cook a predetermined meal, you first envision what the meal looks and tastes like and then you start developing a recipe. When working on a data science project, you usually don’t have a set of instructions to achieve a predetermined outcome. Instead, <em>you</em> have to determine the outcomes and the steps to achieve those outcomes. This Data Science Workflow Canvas was designed with that process in mind. Here, I’ll walk you through how to use this canvas, and I’ll share examples of how I implemented this canvas in my own projects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RfDSfegi8x3wfHYu_WK_Zw.png" /><figcaption>Data Science Workflow Canvas.</figcaption></figure><blockquote><a href="http://bit.ly/data-science-canvas"><strong><em>Download the Data Science Workflow Canvas</em></strong></a><strong><em>.</em></strong></blockquote><h3>How to Use the Data Science Workflow Canvas</h3><h4><strong>Step 1: Identify your problem statement</strong></h4><p>What problem are you trying to solve? And what larger issues do that problem address? This section helps you address the “why” of your project.</p><h4>Step 2: State your intended outcomes/predictions</h4><p>Yes, you won’t know what your outcomes are until after you’re done with your project, but you should at least have an idea of what you think they should look like. Identify potential predictor (X) and/or target (y) variables.</p><h4>Step 3: Determine your data sources</h4><p>Where are you sourcing your data from? Is there enough data? And can you actually work with it? Sometimes you might have access to ready-made <a href="https://github.com/jasminevasandani/awesome-public-datasets">datasets</a>, or you might need to <a href="https://towardsdatascience.com/tagged/web-scraping">scrape your data</a>.</p><h4>Step 4: Choose your model(s)</h4><p>Choose your model(s) depending on your answers to these questions: are your outcomes discrete or continuous? Do you have <a href="https://www.quora.com/What-is-the-difference-between-labeled-data-and-non-labeled-data">labeled or unlabeled datasets</a>? Are you concerned with outliers? How well do you want to interpret your results? The list of questions can vary depending on your project.</p><h4>Step 5: Identify model evaluation metrics</h4><p>Identify corresponding model evaluation<strong> </strong>metrics to interpret your outcomes. Every model will have its own set of evaluation metrics.</p><h4>Step 6: Create a data preparation plan</h4><p>What do you need to do to your data in order to run your model and achieve your outcomes? Data preparation includes data cleaning, feature selection, feature engineering, exploratory data analysis, and so on.</p><h4>Bringing it all together</h4><p>Once you finish brainstorming your ideas on the canvas, it’s time to bring it all together and activate your project! Refer the order listed in the “Activation” section of the canvas as you bring your project to life.</p><h3>Data Science Workflow Canvas Example #1</h3><p>Here’s an example of how I implemented the Data Science Workflow Canvas while working on my WNBA machine learning project. Read the <a href="https://towardsdatascience.com/how-machine-learning-made-me-fall-in-love-with-the-wnba-278f06eee503?sk=e720b1fe967da38b2c7f4b693a34ca96">article</a> about this project or follow along with the GitHub <a href="https://github.com/jasminevasandani/WNBA_Teams_Clustering/blob/master/WNBA_Machine_Learning_Clustering.ipynb">repository</a> while referring to this canvas.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qfPATl8iOHGJcT4cLxs4GA.png" /><figcaption>Data Science Workflow Canvas for the <a href="https://towardsdatascience.com/how-machine-learning-made-me-fall-in-love-with-the-wnba-278f06eee503?sk=e720b1fe967da38b2c7f4b693a34ca96">WNBA Clustering project</a>.</figcaption></figure><h3>Data Science Workflow Canvas Example #2</h3><p>Here’s another example of how I implemented the Data Science Workflow Canvas while working on my fake news detector project. Read the <a href="https://towardsdatascience.com/i-built-a-fake-news-detector-using-natural-language-processing-and-classification-models-da180338860e">article</a> about this project or follow along with the GitHub <a href="https://github.com/jasminevasandani/NLP_Classification_Model_FakeNews/blob/master/FakeNews_NLP_Classification_Modeling.ipynb">repository</a> while referring to this canvas.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mtz4u5SN64ISwWMArS1dRg.png" /><figcaption>Data Science Workflow Canvas for the <a href="https://towardsdatascience.com/i-built-a-fake-news-detector-using-natural-language-processing-and-classification-models-da180338860e">fake news detector</a> project.</figcaption></figure><h3>Conclusion</h3><p>To implement this Data Science Workflow Canvas well, keep these three things in mind:</p><ol><li><strong>Don’t be afraid to make mistakes.</strong> Use this canvas as a space to brainstorm your initial ideas, and come back to it to refine your process. Keep what works and remove what doesn’t.</li><li><strong>Focus on what you want to accomplish. </strong>Even if your initial goals change, stay focused on what you want to accomplish. No matter how often you have to go back and update your goals, just stay focused on them.</li><li><strong>Data science is a nonlinear and iterative process.</strong> There is no correct or linear way to achieve a data science project. You can use this canvas as a resource to help you get started on a project, but it’s okay if you develop another process that works better for you.</li></ol><p>Good luck on your data science projects, and may the canvas be with you!</p><p><em>*Content from the Data Science Workflow Canvas was inspired by notes taken during my time at General Assembly’s </em><a href="https://generalassemb.ly/education/data-science-immersive"><em>Data Science Immersive</em></a><em>. The structure of the canvas was inspired by the </em><a href="https://en.wikipedia.org/wiki/Business_Model_Canvas"><em>Business Model Canvas</em></a><em>.</em></p><p><em>Jasmine Vasandani is a data scientist, strategist, and researcher. You can learn more about her here: </em><a href="http://www.jasminev.co/"><em>www.jasminev.co/</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db62556be4d0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/a-data-science-workflow-canvas-to-kickstart-your-projects-db62556be4d0">A Data Science Workflow Canvas to Kickstart Your Projects</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Machine Learning Made Me Fall in Love with the WNBA]]></title>
            <link>https://medium.com/data-science/how-machine-learning-made-me-fall-in-love-with-the-wnba-278f06eee503?source=rss-7ee6a045d4f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/278f06eee503</guid>
            <category><![CDATA[towards-data-science]]></category>
            <category><![CDATA[wnba]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[sports]]></category>
            <category><![CDATA[data-journalism]]></category>
            <dc:creator><![CDATA[Jasmine Vasandani]]></dc:creator>
            <pubDate>Tue, 30 Apr 2019 13:40:26 GMT</pubDate>
            <atom:updated>2019-05-14T21:13:35.222Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aXggnBMsODmD-lheAuNT4w.png" /><figcaption><a href="https://www.flickr.com/photos/number7cloud/43170342644">Photo</a>: Angel McCoughtry of the Atlanta Dream playing against the Minnesota Lynx.</figcaption></figure><h4>Fulfilling my fantasy of building a women’s sports dream team.</h4><p>I had one of those daydreams that come to you from out of nowhere. Before my eyes fell the image of an all-star women’s sports team. The greatest female players across all teams and sports genres playing on the same team. Like Mario Kart except instead of Mario, Princess Peach, and Toad you have Serena Williams, Lisa Leslie, and Katelyn Ohashi all playing on the same platform. I realized that I could make this vision a reality by using data science and machine learning tools to design the best teams and predict what it would look like if they were to play against each other. However, as with all big dreams (and big data), I decided to start with a subset of the women&#39;s sports world and work my way up towards acquiring data from other women&#39;s sports. So I’m kicking off my mission to make my daydream a reality by analyzing data from the WNBA. <strong>Get ready everyone, the ultimate WNBA game is about to begin.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*RxJN82DHz1BW84i33a1Rhw.gif" /><figcaption>LA Sparks getting hyped before playing.</figcaption></figure><h4><strong>Step 1: Getting Every Single WNBA Player On the Court (or, data acquisition)</strong></h4><p>The first thing I did was scrape every single WNBA player’s per-game career stats from <a href="https://www.basketball-reference.com/wnba/">Basketball-Reference</a>. In total, I acquired stats for 923 WNBA players. Below is a preview of what the head of my DataFrame looked like. If you want to know what each of the columns in the DataFrame below stands for, check out <a href="https://www.basketball-reference.com/about/glossary.html">this glossary</a>. I’ll go ahead and translate one row so that you get an idea of how to interpret this data. <a href="https://www.wnba.com/player/farhiya-abdi/">Farhiya Abdi</a> of the Los Angeles Sparks has played a total of 52 games and started 5 of those games. On average per game, she played on the court for 9.6 minutes and made 38% of attempted shots, 25% of attempted three-pointers, 43% of attempted two-pointers, and 68% of attempted free throws. Abdi also made an average of 1 rebound, 0.4 assists, 0.2 blocks, 0.4 turnovers, and 1.2 personal fouls. And finally, Abdi scored an average of 2.9 shots per game. Once I’m done clustering all players into ranked teams, I’ll use these per-game stats to simulate a data-driven playoff between the top two teams.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WBCvsAx0e1L1SwyxdE68IA.png" /><figcaption>10 out of 923 per-game career stats for every WNBA player listed on basketball-reference. I can’t help but see this DataFrame as a court where the data are playing against each other.</figcaption></figure><h4>Step 2: Divide all WNBA Players by their Positions</h4><p>In order to create the best teams, I decided to split all players according to their positions and use machine learning to develop ranked groups within each position. As documented on Basketball-Reference, WNBA players are classified according to these five positions: Forward, Center, Forward-Center, Guard, and Forward-Guard. Of the 923 WNBA players, 908 had positions listed. Here’s a breakdown of players by position.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pz3sgUTv6yDMemxzC9dI-A.png" /><figcaption>Distribution of positions of all-time WNBA players.</figcaption></figure><h4>Step 3: Identify Best Performance Rates for Each Position</h4><p>After I divided all players into five categories according to their position, I calculated each position’s average performance based on the following categories: field goal percentage (FG%), total rebounds (TRB), steals (STL), blocks (BLK), assists (AST), and total points (PTS). Some positions performed better on more categories than other positions. For instance, forward-center players performed significantly higher on more performance categories than other positions, so they have four best qualities. On the other hand, forward players were more specialized and performed well in two categories. Here’s what I determined were the best performance qualities for each position.</p><ul><li>Forward-Center: TRB, BLK, FG%, PTS</li><li>Forward-Guard: AST, PTS, STL</li><li>Center: BLK, FG%, TRB</li><li>Guard: AST, PTS, STL</li><li>Forward: FG%, TRB</li></ul><h4>Step 4: Use Machine Learning to Create Ranked Clusters Within Each Position</h4><p>With the WNBA players divided according to their positions, I created clusters within each position using their best-performing qualities as my predictor variables. I used an unsupervised machine learning model called <a href="https://www.naftaliharris.com/blog/visualizing-k-means-clustering/">K-Means Clustering</a> to help me with this task. What K-Means Clustering does is it groups data around central points, thereby creating distinct clusters of similar data. The number of central points, represented by the letter k, is a parameter that needs to be determined beforehand. Finding the best k to create ranked clusters for each position took many attempts. I also knew beforehand that I wanted to cluster each position by the same number k, so there were some cases where the clusters for one position created cleaner groupings than others. Ultimately I went with n_clusters = 8 since that number tended to have a relatively higher silhouette and lower inertia score across the board. The higher the silhouette score the more distinct the groups are, and the lower the inertia score the more similar each data point is within a cluster. In the image below, you can see how the silhouette score is pretty high for the Forward-Center clusters (see left), but low for Guard clusters (see right). This means that clusters of players among Forward-Centers will be more distinct than the clusters of players among Guards.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*63a67u8P2Qa3QF3flK8Isw.png" /><figcaption>Here’s an example where my k worked better for Forward-Center compared to Guard, specifically looking at the silhouette scores.</figcaption></figure><p>After the players were categorized into clusters, it was up to me to determine the rankings and make tweaks to any of the assignments. Clusters don’t automatically translate into rankings, and sometimes clusters form imperfect groups. I’ll walk you through how I interpreted the clusters for Forward-Guards. In the cluster visualization below (see left), there are eight clusters corresponding to n_clusters = 8. Remember, I determined which performance categories to use for each position. For forward-guards I chose assists, total points, and steals since they performed well in these categories. Now to create the rankings, I referred to the centroid calculations (right). The index of the centroid DataFrame refers to a specific cluster number, ranging between 0 to 7. The cluster with the highest average tended to perform better across all performance categories. Players in cluster 5 would be ranked as the best, in cluster 4 the second best, and so on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vlI9xbDzocXD38_XgPKPrg.png" /><figcaption>Cluster visualizations (right) and centroid calculations (left). There’s a lot going on here! I explain how to interpret all of this in the paragraph below.</figcaption></figure><p>However, if you take a look at the visualization you’ll see that cluster 4 only has one player in it. It was easy for me to figure out that the player who belongs to cluster 4 is <a href="https://www.wnba.com/player/elena-delle-donne/">Elena Delle Donne</a> of the Washington Mystics. She scored the highest total points of all players in her position (her cluster point is farther than everyone else’s in the PTS visualization), and she’s a five-time WNBA superstar. According to this ranking, she got placed in the <em>second-best</em> team? Well, if you take a closer look, Donne performed lower than average in assists and steals compared to other players in her position. However, if you take a closer look at how her cluster (4) compares to cluster 1 which has more players in it, they significantly outperform her in the steals and assists categories. So because of this, I swapped positions between clusters 4 and 1. The new ranking became cluster 5 is the best, cluster 1 the second best, cluster 4 the third best, and so on. I scrutinized all five positions’ eight clusters and ranked them from best to worst within each position. Now it’s time to form the teams.</p><h4>Step 5: Create Eight Ranked Teams With All-Time WNBA Players</h4><p>Since basketball teams are made up of five positions, I took the ranked clusters from each position and re-joined them into teams. The size of each team varies, and so the number of players in each position. Since the distribution of performance for most categories is right-skewed, there are fewer players who perform significantly better than everyone else in each category (see image below). Therefore, the best team out of the eight will have fewer players in it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IPsyK0yWuH585iY68Jl7BQ.png" /><figcaption>Distribution of performance across the categories I chose to measure. Most of the distributions are right-skewed except for free throw percentage. According to this, WNBA players are great at making free throws.</figcaption></figure><p>I named the teams “Team 1” through “Team 8,” with Team 1 being the highest performing and Team 8 being the lowest performing. For the sake of brevity, I’ll go over the top two best teams, and you can access my GitHub repository (linked at the end of this article) to see the rest of the details. Team 1 has 35 players and Team 2 has 56 players. Both teams have all-star players, but it just turned out that the players on Team 1 tended to perform better in more than one skill than other players in their position. Therefore, Team 1 should be the team with players who are the most well-rounded in terms of skill abilities. Since I did not use the number of games played to determine the rankings, each team has a good mix of rookie and veteran players. For instance, veteran <a href="https://www.wnba.com/player/cynthia-cooper/">Cynthia Cooper</a> ranked number 1 in Team 1 for the highest point average per game, and rookie <a href="https://www.wnba.com/player/aja-wilson/">A’ja Wilson</a> ranked number in Team 2 for the highest point average per game.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LcAqVWYdLFxjgeXB1jExAQ.png" /><figcaption>Players who had the highest point average per game in Team 1 and Team 2. Image sources: <a href="https://in.pinterest.com/pin/42432421462727330/?lp=true">left</a>, <a href="https://thetandd.com/sports/s_carolina/basketball/a-ja-wilson-named-wnba-all-star-in-rookie-season/article_cdf84b03-c997-5988-bd4a-73eb5409c196.html">right</a>.</figcaption></figure><p>Below is the final roster for Team 1 — the dream team — comprised of 16 Guards, 12 Forwards, 3 Centers, 2 Forward-Guards, and 2 Forward-Centers. To name just a few highlights: Cynthia Cooper has the highest point average per game, <a href="https://liberty.wnba.com/katie-smith-head-coach/">Katie Smith</a> has played the most games, <a href="https://www.wnba.com/player/tamika-catchings/">Tamika Catchings</a> has started the most games, <a href="https://www.wnba.com/player/chiney-ogwumike/">Chiney Ogwumike</a> has the highest three-point percentage average per game, and <a href="https://www.wnba.com/player/brittney-griner/">Brittney Griner</a> has the highest block average per game.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HNeYLiJBM3TSP3dg8XsTRA.png" /><figcaption>Team 1 roster comprised of 35 of the best WNBA players as identified through K-Means Clustering.</figcaption></figure><h4>Step 6: Simulate a Data-Driven Game Between the Top Two Teams</h4><p>Take a seat, everyone. The ultimate (data-driven) WNBA game is about to begin! To tip off the game, let’s go with the players from each team who have started the most games: Tamika Catchings with 448 games started from Team 1 and <a href="https://www.wnba.com/player/sue-bird/">Sue Bird</a> with 508 games started from Team 2. It’s a close call with offensive rebounds. Team 1 has a higher mean average for making offensive rebounds, but their distribution is more skewed than Team 2 who has a similar mean and median for offensive rebounds. If Team 1’s outliers are off the court, Team 2 has a higher chance of making more offensive rebounds. But there’s no denying it with defensive rebounds, Team 1 performs significantly better in this category than Team 2. The three-pointer success rate is going to be high in this game, giving you more opportunities to cheer at the sight of that ball flying across the court and making it effortlessly into the hoop. Both teams have a high percentage of making three-pointers.</p><p>For the moment you’ve all been waiting for, the winner of this game. Well, Team 1 beats Team 2 by having a points-per-game average that’s four points more than Team 2. But you never know — if the outliers of both teams who score an average of 20 points per game play against each other, it’s safe to say that the game could be a close call.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BTDzF8RlCZCzJUr7ssQSWw.png" /><figcaption>Points per game distribution for both teams. On average, players from Team 1 score 4 more points than players on Team 2.</figcaption></figure><h4>Conclusion</h4><p>Watching sports through data alone was more fun than I thought it would be. I’m pleased with my results and looking ahead, I’ll probably go back to my data to refine my feature selection process and model parameters. In addition to envisioning my daydream of having all women’s sports players play on the same platform, I believe I achieved something even greater through this process: giving the WNBA the spotlight it deserves. Considering that sports data analysis is a thriving field, there needs to be more attention paid to women’s sports data and analysis of that data. Lastly, I felt so inspired witnessing (through data) the feats of the greatest WNBA players of all time. I was never really a serious sports fan, but this project made me fall in love with the WNBA. To the WNBA community, you now have a new fan thanks to data science.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*3L1S_3nUD3rG8VSSX25DYg.gif" /><figcaption>LA Sparks showing off their three-pointer skills.</figcaption></figure><p>To view the code and analysis referenced here, check out my GitHub <a href="https://github.com/jasminevasandani/WNBA_Teams_Clustering">repo</a>.</p><p><em>Thanks to Shawn Vasandani and Anuva Kalawar for helping me understand basketball better. And thanks to Riley Dallas for helping me think through my modeling process.</em></p><p><em>Jasmine Vasandani is a data scientist and a proud fan of the WNBA. You can learn more about her here: </em><a href="http://www.jasminev.co/"><em>www.jasminev.co/</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=278f06eee503" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/how-machine-learning-made-me-fall-in-love-with-the-wnba-278f06eee503">How Machine Learning Made Me Fall in Love with the WNBA</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Built a Fake News Detector Using Natural Language Processing and Classification Models]]></title>
            <link>https://medium.com/data-science/i-built-a-fake-news-detector-using-natural-language-processing-and-classification-models-da180338860e?source=rss-7ee6a045d4f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/da180338860e</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-journalism]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[fake-news]]></category>
            <dc:creator><![CDATA[Jasmine Vasandani]]></dc:creator>
            <pubDate>Tue, 09 Apr 2019 13:26:19 GMT</pubDate>
            <atom:updated>2021-04-21T12:18:15.486Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-VMXf__EIfoVExbHeCFHAQ.png" /><figcaption>Credit: <a href="https://unsplash.com/photos/XmMsdtiGSfo">Unsplash</a></figcaption></figure><h4>Analyzing open source data from Subreddits r/TheOnion &amp; r/nottheonion.</h4><p>When WhatsApp <a href="https://www.theguardian.com/technology/2019/feb/06/whatsapp-deleting-two-million-accounts-per-month-to-stop-fake-news">announced</a> that it was deleting 2 million accounts every month to prevent the spread of fake news, I was intrigued. Of the millions of accounts flagged for deletion, how many are misclassified as fake news? How did WhatsApp even create an automated process of deleting millions of fake news accounts? In an attempt to answer these questions, I built my own fake news detector using open source data from Reddit. Here’s how I did it and what I learned along the way.</p><p>With the help of <a href="https://github.com/dmarx/psaw">Pushshift.io API Wrapper</a>*, I scraped approximately 30,000 posts from the Subreddits <a href="https://www.reddit.com/r/TheOnion/">r/TheOnion</a> and <a href="https://www.google.com/search?q=nottheonion&amp;rlz=1C5CHFA_enUS820US820&amp;oq=nottheonion&amp;aqs=chrome..69i57j69i60l2j69i61j0l2.1961j0j4&amp;sourceid=chrome&amp;ie=UTF-8">r/nottheonion</a>. I chose these Subreddits to see how well I could distinguish between fake news and absurd news. Posts on the r/TheOnion feature satirical news from <a href="http://www.theonion.come/">www.theonion.com</a> or other similar parody sites. Posts on r/nottheonion feature absurd current events reported on by credible news outlets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G-wOR4ZlL8yO8U_RpHhVwQ.png" /><figcaption>r/TheOnion has 95.2k subscribers while r/nottheonion has 15 million subscribers. Image credit: Reddit.</figcaption></figure><p>To keep my data clean and concise, I chose to make my predictor variable (X) the title of a post and my target variables (y) be 1 to represent r/TheOnion and 0 to represent r/nottheonion. To clean my data, I created a data cleaning function that dropped duplicate rows in a DataFrame, removed punctuation and numbers from all text, removed excessive spacing, and converted all text to lowercase.</p><pre># Data cleaning function<br>def clean_data(dataframe):</pre><pre># Drop duplicate rows<br>    dataframe.drop_duplicates(subset=&#39;title&#39;, inplace=True)<br>    <br>    # Remove punctation<br>    dataframe[&#39;title&#39;] = dataframe[&#39;title&#39;].str.replace(&#39;[^\w\s]&#39;,&#39; &#39;)</pre><pre># Remove numbers <br>    dataframe[&#39;title&#39;] = dataframe[&#39;title&#39;].str.replace(&#39;[^A-Za-z]&#39;,&#39; &#39;)</pre><pre># Make sure any double-spaces are single <br>    dataframe[&#39;title&#39;] = dataframe[&#39;title&#39;].str.replace(&#39;  &#39;,&#39; &#39;)<br>    dataframe[&#39;title&#39;] = dataframe[&#39;title&#39;].str.replace(&#39;  &#39;,&#39; &#39;)</pre><pre># Transform all text to lowercase<br>    dataframe[&#39;title&#39;] = dataframe[&#39;title&#39;].str.lower()<br>    <br>    print(&quot;New shape:&quot;, dataframe.shape)<br>    return dataframe.head()</pre><p>Now that my Subreddit datasets were nice and clean, I was ready to conduct an exploratory data analysis (EDA). Even though I decided to assign post titles to my predictor variable (X), during my data scrape I also acquired other features of a post to uncover any hidden stories in the data. In total, I scraped the following features from each post:</p><ul><li>title: title of subreddit post</li><li>subreddit: which subreddit the post belongs to</li><li>num_comments: the number of comments for a post</li><li>author: author&#39;s username of a post</li><li>subreddit_subcribers: number of subscribers for that subreddit</li><li>score: the score received on Reddit</li><li>domain: the domain referenced in the post</li><li>created_utc: date and time the post was created</li></ul><p>Something peculiar stood out to me when I observed the number of posts shared by an author. In r/notheonion with 15 million subscribers, only three authors shared over 100 posts, while r/TheOnion with 95k subscribers had 14 authors who shared over 100 posts, the most being 4,113 posts. After making this observation, I confirmed that I made a good decision to use r/TheOnion as a case study to understand WhatsApp’s fake news problem. In WhatsApp’s “<a href="https://faq.whatsapp.com/en/android/26000216/?category=5245250">Tips to help prevent the spread of rumors and fake news</a>,” three of the seven tips focus on preventing the spread of fake news. One of the biggest problems with fake news is not necessarily that it gets written, but rather that it gets spread. The activity of r/TheOnion’s authors mimics the core qualities of the fake news phenomenon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AOuGrDY-CvNoF00har5BYA.png" /><figcaption>Most Active Authors in r/nottheonion &amp; and r/TheOnion. Image credit: Jasmine Vasandani</figcaption></figure><blockquote><strong>The first biggest mistake in data science is looking every business challenge as predictive approach. Remember 70% of low hanging problems can be solved by just doing an EDA.</strong></blockquote><blockquote>— Sundar Ramamurthy</blockquote><p>Another interesting thing I discovered during my EDA of the data was the most referenced domains in each Subreddit. Of course, the majority of the domains referenced in r/TheOnion were from <a href="http://www.theonion.com/">theonion.com</a> and other parody news sites. However, the most referenced domains in r/nottheonion gave me a kick. The top five most referenced domains on r/nottheonion were <a href="http://www.foxnews.come,/">foxnews.com</a>, <a href="http://www.theguardian.com/">theguardian.com</a>, <a href="http://www.google.com/">google.com</a>, <a href="http://www.bbc.com/">bbc.com</a>, and <a href="http://www.newsweek.com/">newsweek.com</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aWURXZ4M3et3D4OVcWXYDQ.png" /><figcaption>Top 5 Most Referenced Domains in r/TheOnion &amp; r/nottheonion. Image credit: Jasmine Vasandani</figcaption></figure><p>I performed more EDA on my datasets and analyzed the most frequently used words by applying CountVectorizer(ngram_range = (1,1)) on the data. I also analyzed the most frequently used bigrams by applying CountVectorizer(ngram_range = (2,2)) on the data. Between the two Subreddits I made note of common frequent words and added them to a custom stop_words list which I would later use in my modeling of the data.</p><p>I could have begun the modeling process early on, but I decided to conduct EDA first in order to get to know my data well. After the data shared their stories with me, I began to create and refine my predictive models. I set my predictor (titles) and target (subreddit) variables, conducted a train/test split, and found the best parameters for my models through <a href="https://scikit-learn.org/stable/modules/generated/sklearn.pipeline.Pipeline.html">Pipeline</a> and <a href="https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.GridSearchCV.html">GridSearchCV</a>. I used a combination of vectorizers and classification models to find the best parameters that would give me the highest accuracy score. I optimized for accuracy to ensure that all fake news gets classified as fake news, and that all authentic news does not get classified as fake news.</p><p>I implemented four models with combinations of using <a href="https://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.CountVectorizer.html">CountVectorizer</a> and <a href="https://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.TfidfVectorizer.html">TfidVectorizer</a> paired with <a href="https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html">LogisticRegression</a> and <a href="https://scikit-learn.org/stable/modules/generated/sklearn.naive_bayes.MultinomialNB.html">MultinomialNB</a>. My best model for achieving the highest test accuracy score implemented CountVectorizer and MultinomialNB. Here’s my code for how I found the best parameters for this model.</p><pre># Assign vectorizer and model to pipeline<br>pipe = Pipeline([(&#39;cvec&#39;, CountVectorizer()),    <br>                 (&#39;nb&#39;, MultinomialNB())])</pre><pre># Tune GridSearchCV<br>pipe_params = {&#39;cvec__ngram_range&#39;: [(1,1),(1,3)],<br>               &#39;nb__alpha&#39;: [.36, .6]}</pre><pre>gs = GridSearchCV(pipe, param_grid=pipe_params, cv=3)<br>gs.fit(X_train, y_train);<br>print(&quot;Best score:&quot;, gs.best_score_)<br>print(&quot;Train score&quot;, gs.score(X_train, y_train))<br>print(&quot;Test score&quot;, gs.score(X_test, y_test))</pre><pre>gs.best_params_</pre><p>My best model for interpreting coefficients implemented CountVectorizer and LogisticRegression. Here’s my code for how I found the best parameters for this model.</p><pre>pipe = Pipeline([(&#39;cvec&#39;, CountVectorizer()),    <br>                 (&#39;lr&#39;, LogisticRegression(solver=&#39;liblinear&#39;))])</pre><pre># Tune GridSearchCV<br>pipe_params = {&#39;cvec__stop_words&#39;: [None, &#39;english&#39;, custom],<br>               &#39;cvec__ngram_range&#39;: [(1,1), (2,2), (1,3)],<br>               &#39;lr__C&#39;: [0.01, 1]}</pre><pre>gs = GridSearchCV(pipe, param_grid=pipe_params, cv=3)<br>gs.fit(X_train, y_train);<br>print(&quot;Best score:&quot;, gs.best_score_)<br>print(&quot;Train score&quot;, gs.score(X_train, y_train))<br>print(&quot;Test score&quot;, gs.score(X_test, y_test))</pre><pre>gs.best_params_</pre><p>To evaluate my CountVectorizer and MultinomialNB model, I implemented a confusion matrix. While a 90% accuracy test score is high, that still signifies that 10% of posts are being misclassified as either fake news or real news. If this were WhatsApp’s scores for their fake news detector, 10% of all fake news accounts would be misclassified on a monthly basis. Good thing I created a fake news detector on a smaller dataset first.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IJ5MyLoQICQ57L52-DbVmQ.png" /><figcaption>Confusion Matrix. Image credit: Jasmine Vasandani</figcaption></figure><p>Finally, even though my CountVectorizer and LogisticRegression model didn’t perform as well as the model above, I still decided to interpret its coefficients to get a better picture of how each word affects the predictions being made. In the graph below of my logistic regression coefficients, the word that contributes the most positively to being from r/TheOnion is ‘kavanaugh’, followed by the ‘incredible’ and ‘ftw’. The word that contributes the most positively to being from r/nottheonion is ‘Florida’, followed by ‘cops’ and ‘arrested’. After exponentiating my coefficients, I discovered that as occurences of “kavanaugh” increases by 1 in a title, that title is 7.7 times as likely to be classified as r/TheOnion. And as occurrences of “florida” increases by 1 in a title, that title is 14.9 times as likely to be classified as r/nottheonion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iO7ilhQybGdRMF2apabCIA.png" /><figcaption>Logistic Regression Coefficients. Image credit: Jasmine Vasandani</figcaption></figure><p>Looking back at my process, I would have tested more NLP vectorizers and classification models on my data. Moving forward, I’m curious to learn more about how to parse through images, videos, and other forms of media through machine learning, since news articles aren’t always written in text format. I also have a better understanding of how WhatsApp might have created a model to detect fake news accounts. As far as WhatsApp’s accuracy score for deleting accounts, that’s a question that’s still on my mind.</p><p>To view all of my code for this process, check out my <a href="https://github.com/jasminevasandani/NLP_Classification_Model_FakeNews">GitHub repo</a>.</p><p>*Hat tip <a href="http://davidcapella.com/">David Capella</a> for sharing the API wrapper with me!</p><p><em>Jasmine Vasandani is a data scientist, strategist, and researcher. She is passionate about building inclusive communities in data. Learn more about her: </em><a href="http://www.jasminev.co/"><em>www.jasminev.co</em></a><em>/</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da180338860e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/i-built-a-fake-news-detector-using-natural-language-processing-and-classification-models-da180338860e">I Built a Fake News Detector Using Natural Language Processing and Classification Models</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[10 Steps to Teaching Data Science Well]]></title>
            <link>https://medium.com/data-science/10-steps-to-teaching-data-science-well-322966188323?source=rss-7ee6a045d4f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/322966188323</guid>
            <category><![CDATA[education]]></category>
            <category><![CDATA[bootcamp-experience]]></category>
            <category><![CDATA[teaching]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Jasmine Vasandani]]></dc:creator>
            <pubDate>Sun, 31 Mar 2019 23:54:47 GMT</pubDate>
            <atom:updated>2019-05-17T02:21:51.404Z</atom:updated>
            <content:encoded><![CDATA[<h4>A resource for data science instructors.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*segfSnDJKL-6E2lHBZyqqw.jpeg" /><figcaption>Image source: <a href="https://broadlygenderphotos.vice.com/">https://broadlygenderphotos.vice.com</a></figcaption></figure><p>With the increase in <a href="https://searchbusinessanalytics.techtarget.com/feature/Demand-for-data-scientists-is-booming-and-will-increase">demand</a> for data scientists, there has been a parallel growth in training programs within companies and educational institutions that teach people data science. In addition to focusing on meeting the job demand, there need to be more resources for instructors facilitating data science classrooms. Here’s a list of ten steps for current and prospective data science instructors to make sure they’re creating an optimal learning environment for their students.</p><blockquote><strong>Better than a thousand days of diligent study is one day with a great teacher.</strong></blockquote><blockquote>— Japanese Proverb</blockquote><h4><strong>1. </strong>Ensure everyone in your class feels comfortable to participate<strong>.</strong></h4><p>Create an <a href="https://poorvucenter.yale.edu/ClassClimates">inclusive learning environment</a> by ensuring everyone feels like they belong to the classroom and can participate, whether it’s through answering questions in front of everyone or approaching the instructor one-on-one. Prioritize people of color, women, LGBTQIA+, and folks with disabilities when assessing participation rates in the class.</p><h4><strong>2. Make sure students with no technical background are keeping up.</strong></h4><p>The students in your classroom will have varying levels of expertise in data science. During a lesson, take a moment and determine if all students are keeping up with the material. This can be done by asking for a simple head nod, or a response to a poll if the class is being taught online. Encourage students to reach out to you if they feel like they are falling behind.</p><h4><strong>3. Be an engaging speaker.</strong></h4><p>Data science is not an easy topic to comprehend with all the coding, math, and analysis that goes into this type of work. When teaching data science lessons, ensure that you are an engaging and <a href="https://www.ted.com/playlists/226/before_public_speaking">confident speaker</a>. Pace yourself and speak clearly. Ensure that your students are engaged in your material and understanding each step of your process well.</p><h4><strong>4. Begin lessons with the answers to your problem sets.</strong></h4><p>Data science offers a set of tools to answer and analyze <a href="https://www.kdnuggets.com/2015/09/questions-data-science-can-answer.html">real-life questions</a>. Sometimes those tools can get overly complicated and it’s easy to lose students in the process of explaining a concept. Always begin lessons with the answer to the data science question you’re asking. For example, if the problem set is about predicting outcomes, begin the lesson showing what the predicted outcomes might look like. It’s easier for students to follow along with the minutiae of data science processes if they clearly understand <em>why</em> they are conducting each step.</p><h4><strong>5. Translate numerical outputs and data visualizations into clear sentences.</strong></h4><p>This one is similar to the step above but places emphasis on how you state your conclusions. Always translate numerical outputs of your code and your data visualizations into clear sentences. What do the numbers you’ve calculated signify? What do your data visualizations reveal about your data? Go back to your original data science question and state the answers clearly.</p><h4><strong>6. Introduce new and/or alternate coding methods in separate cells.</strong></h4><p>Most data science courses use Jupyter Notebook for instruction. If you are showing multiple methods to code a concept <em>or</em> if you are making edits to an original block of code that alters an output, use a new cell. Do not keep iterating on one block of code and changing your output within one cell. Teach your code in steps, and showcase variations to your code in new cells.</p><h4><strong>7. Tie previous lessons to the current one.</strong></h4><p>When introducing new concepts, demonstrate and contextualize how the current lesson connects to what students have learned already. One way of doing this is through using tools like <a href="https://en.wikipedia.org/wiki/Mind_map">mind-maps</a> to illustrate how the topics are related to each other. This empowers students with context and tools to communicate what they’ve learned so far.</p><h4><strong>8. Use inclusive datasets.</strong></h4><p>Data science is a powerful tool to help uncover hidden truths and unknown stories about the world. Use the potential of data science to explore datasets that are <a href="https://www.gaytascience.com/">overlooked</a>. For example, if you’re using sports data to illustrate a concept, why not use <a href="https://towardsdatascience.com/how-machine-learning-made-me-fall-in-love-with-the-wnba-278f06eee503">WNBA</a> datasets instead of the NBA? To determine how inclusive your datasets are, make a list of all the datasets you use in the entirety of the course you are teaching. Who and what do your datasets represent? And who and what isn’t being represented?</p><h4><strong>9. Use real datasets.</strong></h4><p>And while we’re on the topic of datasets, make sure to use real-life datasets in your lessons. Yes, it’s still extremely useful to use the iris, wine, breast cancer, and Boston <a href="https://scikit-learn.org/stable/datasets/index.html#toy-datasets">toy datasets</a>. However, whenever possible, supplement your teaching material with actual and attainable datasets. Get students used to answering real-life questions using data about the real world that they can take with them beyond the classroom. There are tons of places to acquire <a href="https://github.com/awesomedata/awesome-public-datasets">open source data</a> that you can use.</p><h4><strong>10. Have fun!</strong></h4><p>Create a learning environment that’s fun! This might be the most important step to teaching data science well. Have fun in your classroom, whether it’s an in-person or remote setting. Data science is an exciting and revolutionary topic to be learning and sharing. As an instructor, you should feel proud of your ability to democratize knowledge and make data science accessible to all interested students.</p><p><em>This article also appears in </em><a href="https://widusa.com/blog/10-steps-to-teaching-data-science-well"><em>Women in Data</em></a><em>.</em></p><p><em>Jasmine Vasandani is a data scientist and researcher. She is passionate about building inclusive communities in the field of data. Jasmine is thankful for the instructors teaching her data science today.</em></p><p><em>You can learn more about Jasmine here: </em><a href="https://www.jasminev.co/">https://www.jasminev.co/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=322966188323" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/10-steps-to-teaching-data-science-well-322966188323">10 Steps to Teaching Data Science Well</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>