<?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 Taylor Jensen on Medium]]></title>
        <description><![CDATA[Stories by Taylor Jensen on Medium]]></description>
        <link>https://medium.com/@T_Jen?source=rss-4d9206d21dd8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*393sSeVS1Dm02UniTH0s4g@2x.jpeg</url>
            <title>Stories by Taylor Jensen on Medium</title>
            <link>https://medium.com/@T_Jen?source=rss-4d9206d21dd8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 10:33:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@T_Jen/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[Using Probabilistic Words in Data Science]]></title>
            <link>https://medium.com/data-science/using-probabilistic-words-in-data-science-3b0b9777e9d7?source=rss-4d9206d21dd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b0b9777e9d7</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Taylor Jensen]]></dc:creator>
            <pubDate>Tue, 07 Feb 2023 13:23:42 GMT</pubDate>
            <atom:updated>2023-02-07T13:23:42.576Z</atom:updated>
            <content:encoded><![CDATA[<h4>Transform vague feedback into concrete probabilities for machine learning</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1zK1hzusTWsr_LHK" /><figcaption>Photo by <a href="https://unsplash.com/@wocintechchat?utm_source=medium&amp;utm_medium=referral">Christina @ wocintechchat.com</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>When starting a new data science model, you must evaluate the data given to you. Often, new data science initiatives begin with a dataset and connecting with a subject matter expert or another contact. The subject matter expert provides additional context to what the dataset means. This includes outliers or exceptions in the dataset and what the subject matter expert considers to be “normal” or “abnormal” or what “always” or “never” happened. But what if “never” doesn’t mean “never” and “always” doesn’t mean “always”? These words are known as “probabilistic words” and contain critical information that cannot be found elsewhere. This article discusses how to use these probabilistic words to learn about your data and improve your models.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*yu8-YgeFA2VgP_VhaHbI_w.png" /><figcaption>“Never” doesn’t mean “never”</figcaption></figure><h3>Defining Probabilistic Words</h3><p>Probabilistic words are words that express uncertainty or probability. They include words such as “maybe,” “perhaps,” “probably,” “likely,” “unlikely,” “possible,” “impossible,” and so on. These words are used to indicate an implicit distribution of someone’s beliefs or confidence in an event.</p><p>Everyone, consciously or unconsciously, assigns a probability to these probabilistic words in their heads. However, the exact probabilities of the words are often obscured by the personal interpretation of the words, which creates a poor connection to data. For example, does “usually” mean 40% or 80% of the time? This definition can vary between people and situations. Once the interpretation of these probabilities is extracted, they can be incorporated into the modeling development process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9le82_k1OUm9ZUAEwzUAeg.png" /><figcaption>The range of probabilities in people’s minds can vary dramatically.</figcaption></figure><h3>Probabilistic Words &amp; Previous Work</h3><p>Two notable studies involving probabilistic words include “Words of Estimative Probability” by Sherman Kent of the US Central Intelligence Agency (CIA) in 1993 (<a href="https://www.cia.gov/static/0aae8f84700a256abf63f7aad73b0a7d/Words-of-Estimative-Probability.pdf">Words of Estimative Probability (cia.gov)</a> ). The second article is “If You Say Something Is ‘Likely,’ How Likely Do People Think It Is?” written by Andre Mauboussin and Michael J. Mauboussin in the Harvard Business Review in 2018.</p><p>The study written by Kent looked to remedy that people often speak in non-specific statements about how likely an event might happen within the intelligence industry. In the article, he used a sample of reports to build a map between words and probabilities to put numbers to the uncertainty of people’s responses. The original table output ranged from 0% of impossibility to 100% certainty, with a “general area of possibility” in between. The “general area of possibility” contains 7 probabilistic phrases. These words are (in order of increasing certainty): “impossible”, “almost certainly not”, “probably not”, “changes about even”, “probable”, “almost certain”, and “certain”.</p><p>Later, Andre and Michael Mauboussin followed up on the study with a refreshed survey that included more diverse words. Their goal was to increase the number of people in the study and expand outside of the intelligence community. They polled users on the web to link words to their interpreted probabilities. The authors also sought to identify differences in other contextual aspects, such as gender and those that learned English as a second language. One of the lessons from their study is that people should use probabilities to explain data rather than probabilistic words to avoid misinterpretations when sharing data insights. In addition, people should use a clear methodology to collect the probabilities.</p><p>This section is just a brief overview of the articles, I would highly recommend reading them in their entirety. But the question remains — what does this mean for data science?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oye7YOTFsUSFyAkIs_AD_A.png" /><figcaption>The range of “usual” to “rare” can vary between people.</figcaption></figure><h3>Using Probabilistic Words in Data Science</h3><p>Connecting vague word meanings to concrete examples is an excellent way to expand knowledge about a dataset and augment a dataset with additional knowledge. This additional information can increase the information available to your models and improve model performance.</p><h4>Learn About Your Data Context</h4><p>There are many different ways to learn more about a dataset in addition to the traditional data exploration techniques. This can be done through various approaches which usually involve discussions with an interviewee. This person could be a subject matter expert, a content moderation team, an accountant, a user, or a person related to the dataset, industry, or problem.</p><p>When speaking to the interviewee, be prepared to identify their probabilistic words. Start by asking about the general statistical behavior of the data such as correlations and treat each correlation as a hypothesis. This hypothesis is to be proven or disproven by the interviewee from their experience. The goal is to listen for qualifiers that people put before their opinion on an action. You can use these probabilistic words to identify what is normal, what is abnormal, and what is an outlier in their experience. This can also be used to double-check if your dataset aligns with your task. For example, is there a bias that you do not know about in the dataset or with the people involved? Is something that is considered abnormal by the interviewee happen a lot in the data?</p><p>When identifying normal data, abnormal data, and outliers, it helps to have the image of a distribution in your head or drawn out. By looking for probabilistic words, we are looking to identify where a sample of events from our interviewee falls on the distribution. However, it’s essential to ensure that we collect data from the interviewee’s point of view. An event that seems normal in the data could be very unexpected or unusual inside the business process — and that knowledge is gold when modeling.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PjftwvjbABSJadhYI2UIhA.png" /><figcaption>An example of an implicit distribution regarding interest rate changes.</figcaption></figure><p>For example, put yourself into the shoes of a Data Scientist tasked with developing a model to predict if the Federal Reserve will increase interest rates. When learning about the interest rates, federal reserve moves, and market reactions, it is crucial to gather an expert’s point of view to give us a sense of what they believe will impact these decisions. Say we ask what a fund manager thinks will happen to interest rates, and they say, “it will probably increase at a slower rate.” In this case, it is important to ask the trader to quantify in probabilistic terms (ratios, percentages, etc.) what “probably” means to them. By asking the trader for their understanding in percentage terms, we can begin to build an understanding of:</p><ul><li>What does “<strong>probably</strong>” means to them, and what economic context is needed to make it happen</li><li>What would cause an <strong>almost certain</strong> positive or negative interest rate move</li><li>What they think the Federal Reserve <strong>usually</strong> does in this situation</li><li>What would an <strong>unusual</strong> <strong>negative</strong> interest rate move look like</li><li>What would an <strong>unusual</strong> <strong>positive</strong> interest rate move look like</li></ul><p>Follow up by asking the trader to describe the context of each of the responses in detail. Clarify the probabilistic likelihood of each word the trader refers to and look for verbally explained statistical insights. These insights include multi-collinearity, secondary effects, and other sources that would affect the performance of that model but are not in the training dataset. To reduce the bias of the results, try to interview several people.</p><p>With this information, you are more knowledgeable about what could cause a rate change, and build out a sentiment of what traders believe. The data could even be used to build a web-scraped sentiment model that translates external sentiment into business sentiment.</p><h4>Augment Your Dataset</h4><p>Using probabilistic words, a dataset can be augmented to include insights. For example, you could add a categorical column that specifies a flag for “unusual” circumstances. You could use this data to predict feedback on a larger data set, use it as raw input to a machine learning model, and quantify the value of this “human” information to your data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pXSwvQrpVVdpYVtLR1dEPw.png" /><figcaption>An example dataset with feedback integrated into the data.</figcaption></figure><p>Using the data to predict feedback on a larger dataset is called “weak learning”. In this case, a model is built that uses the sample of feedback to predict what feedback would be on the rest of the dataset. This means that a sample of feedback and be expanded to cover the whole dataset. This expanded feedback can then be used as input to another model or in exploratory data analysis. The benefit of this approach is that a sample of data can be expanded to cover a large set of data. However, this comes at the cost of accuracy. Since the model is trained on a small sample, there is a higher possibility that the model will have increased bias or not fully behave in a way that the interviewee would.</p><p>If you need instant feedback to make predictions as part of a model, then “weak learning” can be used to build a “feedback on the fly” system. As the model makes online predictions, the “weak learning” model takes the incoming raw data, predicts what feedback would be, and then passes the raw data and predicted feedback to the main online model. This allows you to build a functional model without needing a human involved all the time.</p><p>Another great part about collecting this data is that it can be used to quantify how much more information interviews provide than raw data. This can be evaluated by building a model with and without feedback. After both models are trained, compare the difference between model scores and that gives you the relative value of the feedback. If your model scores 15% better with the feedback data than the model trained only on raw data, then it is proven that interviews improve performance for your model. If the 15% improvement can be linked to business impact, this can help justify interviewing costs and give a dollar value of the feedback. For example, if a forecasting model improves performance by 15%, and that translates to $200,000 of value, then the feedback is worth that $200,000.</p><h3>Build Your Own Probabilistic Survey</h3><p>Now that probabilistic words have been introduced, this knowledge can be used to create your probabilistic surveys.</p><p>To get started, take inspiration from typical common probabilistic words from the original studies referenced earlier. Feel free to add your own words and probabilistic words frequently used by your organization. It may also be beneficial to take a week and identify common words used in your meetings and keep a running list of the most common items. An example used in my professional background is “uncertainty”. If I am writing a probabilistic survey for my organization, I would want to include items like “great uncertainty” and “almost certain” to the list of words to get feedback on. Remember, you can always add words later on and gather more responses, so perfection isn’t required.</p><p>Once a list of words has been gathered, an architecture to collect the words from people or another data source needs to be created. If you already have a data source, you can use your favorite method to input the data into your processes. If you’re collecting feedback from people inside your organization, it is beneficial to have a simple survey architecture set up to facilitate the collection of information. This could include something like Google Forms, Microsoft Forms, and Streamlit. My usual go-to is Streamlit as it is quick to set up, is built in Python, and I can run it quickly on my local PC as needed or on its website.</p><p>You could also collect basic metadata about each person as they supply feedback. Metadata like the level in the company, department, and years of experience could be useful to segment out how different departments use probabilistic words. Once a significant amount of feedback has been collected, you can collect the data and analyze the distributions of each of the responses. From these distributions, you will be able to answer questions like:</p><ul><li>What words have the same probability meaning?</li><li>Do words that have similar definitions have different probabilities associated with them?</li><li>For example, “certainty” and “sure thing” could have 70% and 95% average probabilities associated with them.</li><li>What is the spread of probabilities for a word?</li><li>What are the distribution characteristics of the words? (Mean, median, mode, standard deviation, etc.)</li></ul><p>After this analysis, you can use this information to help connect the dots between nondeterministic words collected during interviews, feedback sessions, and exploratory data analysis. This data can be used in a data pipeline to classify probabilities in statements, identify unique situations, and improve model outcomes.</p><p>All images are by the author unless otherwise specified.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b0b9777e9d7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/using-probabilistic-words-in-data-science-3b0b9777e9d7">Using Probabilistic Words in Data Science</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[Design Thinking Improves Your Data Science]]></title>
            <link>https://medium.com/data-science/design-thinking-improves-your-data-science-4c4aaaa9204a?source=rss-4d9206d21dd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c4aaaa9204a</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[notes-from-industry]]></category>
            <category><![CDATA[design]]></category>
            <category><![CDATA[design-thinking]]></category>
            <category><![CDATA[modeling]]></category>
            <dc:creator><![CDATA[Taylor Jensen]]></dc:creator>
            <pubDate>Thu, 13 Oct 2022 04:16:17 GMT</pubDate>
            <atom:updated>2022-10-14T14:24:13.012Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>New ways to understand your problem and increase your project’s impact</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*aisfy3tJ2PQtAx_Y" /><figcaption>Photo by <a href="https://unsplash.com/@jasongoodman_youxventures?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Jason Goodman</a> on <a href="https://unsplash.com/s/photos/design-thinking?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Design Thinking helps you organize thoughts to create optimal solutions.<br>At the beginning of a project we, the data scientists, ask questions about the problem statement and the data. The stakeholders usually respond with some concrete (or not) answers about their problem. This usually happens for a couple of meetings. We take the requirements, firmly in hand, and begin wrangling data, building models, etc.</p><p>But… What if the problem statement you are working on is not the real problem you are asked to solve? What if, in the end, and after a lot of work, you show the stakeholders your results, and they are underwhelmed or, even worse, not using the results? In this article, I will be covering some ways to avoid these outcomes using Design Thinking.</p><h4>How Does This Impact a Data Scientist?</h4><p>One of the biggest mistakes that a data scientist can make is jumping straight to the development of the project and not spending enough time understanding the <strong>true</strong> goals that have the biggest impact.</p><p>Sometimes, these goals are easy to identify, and complications are easy to see coming. This is usually true if the data scientist is familiar with the problem space and/or is integrated into the business processes.</p><p>Many data scientists come in as a “third party” to help drive the strategic goals of the group. This means that there is a high risk of misunderstanding the problem and creating a solution that doesn’t live up to stakeholder expectations. Or worse — creating the wrong solution. If you’re involved in these types of projects, then this article is for you. There is a framework that we can use to help negate this risk before even starting the data science work. This framework is Design Thinking.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uovQwwtI5mJ5epaTSFd4KA.jpeg" /><figcaption>Design Thinking helps you organize thoughts to create optimal solutions.</figcaption></figure><h3>What is Design Thinking?</h3><p>According to the <a href="https://www.interaction-design.org/literature/article/what-is-design-thinking-and-why-is-it-so-popular">Interaction Design </a>Foundation — “Design thinking is an iterative process in which you seek to understand your users, challenge assumptions, redefine problems and create innovative solutions which you can prototype and test.”</p><p>This enables us as data scientists to:</p><ul><li>Figure out what is the real problem we are trying to solve</li><li>Understand if we even need a model</li><li>Make sure what is in our stakeholder’s head is what we are going to provide</li><li>Know how the model will impact the users/business</li></ul><p>There are several formal Design Thinking based processes out there. You can choose to follow them if you wish (like a design sprint). However, Design Thinking to me is not a formal process but also a framework of how to think and how to build an understanding of who/what you are working with. This means that the design thinking structure can change depending on the audience, business, and problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cZk0207aUrhsg88btEJZGg.jpeg" /><figcaption>General Phases of Design Thinking</figcaption></figure><p>Usually, Design Thinking is considered an iterative path of empathizing, defining, ideating, prototyping, and testing. Here the emphasis is on the word <strong>iterative</strong>. Although the steps I am reviewing are shown linearly, each step can be performed again as needed. Many times, I repeat steps to gather more information and further refine my understanding of the problem, user, or stakeholder.</p><p>The general definition of each step is:</p><ul><li><strong>Empathize</strong>: Build up an understanding of your customer and the problems they are facing.</li><li><strong>Define</strong>: Define the problem(s) that need to be solved.</li><li><strong>Ideate</strong>: Think about all the different ways that the problem can be solved. Any idea can be a good idea. Afterward, narrow down to the best idea(s).</li><li><strong>Prototype</strong>: Develop the simplest possible working model of what you would like to build.</li><li><strong>Test</strong>: Test the idea with your stakeholders. Get their feedback.</li></ul><p>Let’s review how you can use each step to start your next project.</p><h3>Empathize</h3><p>As data scientists, our first instinct is to begin to understand the data we are going to use to solve our problems. However, we need to understand what is beyond the data to the people involved in this problem. We can have all of the data in the world but if we do not know how users or stakeholders interact with the product and understand it in their terms, we cannot possibly make a solution that is going to fully solve their problem. My favorite saying here is that we need to “fall in love with the problem”. Falling in love with the problem allows us to gain empathy for what our customers/stakeholders are going through.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*icVAe3XxMLPOb6mYhJPo1g.jpeg" /></figure><p>There are a couple of different ways that we can gain empathy:</p><h4>Interviews</h4><ul><li>Spend an hour (or more) in 1–1 meetings with stakeholders.</li><li>Learn the language, jargon, and methods that your stakeholders use today and where they see the gap.</li><li>Learn about how they are currently doing the work today or what they currently see.</li><li>Gather their ideas of how they would want to use the product if they had a magic wand to make everything better.</li></ul><h4>Product Exploration</h4><ul><li>Get to know the product you are working with if a version of it exists today</li><li>Get a user account in a test environment or a read-only account in a production environment to test out the product and become familiar with how a new user would interact with the product.</li><li>Use your understanding of data to see how your solution will impact the customers of your solution.</li><li>As a data scientist, you have a very useful lens to identify additional possible improvements or opportunities that others might not see.</li></ul><h4>Discussions with Leadership, Product Managers, and Team Leads</h4><ul><li>Inquire how leadership is using the product/data/system today to drive their business goals (if they are). Identify how the solution will or could contribute to those outcomes. Note: If the solution won’t contribute to the business goals, is it something that the stakeholders want or need?</li><li>If leadership is not using the outcome to drive any business goals, figure out what requirements there are to add model metrics to the process. Note: It might be possible to create a new metric that contributes to the overall goals of the business.</li></ul><h3>Define</h3><p>Once the context and understanding are gathered, we need to distill it all down into the problem(s) that need to be solved. The define phase should be done with your stakeholders and it will encourage productive conversations about the problems that need to be addressed. These conversations also ensure alignment on what the problem means to both customers/stakeholders and data scientists.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iEcwCCcu_CvmtFkBqDYMOw.jpeg" /><figcaption>Turn fuzzy user feedback into discrete problems in the “Define” phase.</figcaption></figure><p>The most important aspects of this are:</p><ol><li>Define the problem in the terms and language that your stakeholders use</li><li>Use the knowledge from the interviews to inform what problem statements should be generated</li></ol><p>Now, there is a risk that the problem statements might morph into vision statements. The way to mitigate this is to ensure that your defined problems are manageable and actionable. This is especially important if you are working with people who are used to setting the vision for the group as that vision-setting might come most naturally to them.</p><p>The opposite can be true as well — a problem statement can get locked into a framework of the problems of today. This can happen if your audience is composed of those that are in the weeds and doing the work on a day-to-day basis. It is important to make sure the problem statement is a stretch goal and that we do not have to consider the frameworks, limitations, or structures of today. They might not be useful or even exist after the project is complete.</p><p>There are several ways to define a problem statement, but the two I use most are “How Might We” (HMW) statements and the use of the five W’s, which are discussed below.</p><h4><strong>How Might We “HMW” Statements</strong></h4><p>My favorite way to approach generating problem statements is to use HMW statements. In this process, everyone writes down problem statements starting with the phrase “How might we…”. They are usually generated individually and voted on by the group to obtain the best problem statement. HMW statements are written positively to make sure how we remember how the user should feel.</p><p>Some examples are:</p><ul><li><strong>“</strong>How might we… redesign the car buying experience so people know how much their car is worth anytime?”</li><li><strong>“</strong>How might we… make users feel confident their data is secured?”</li></ul><p>Make sure that the HMW statements do not suggest an outcome — the goal is not to figure out <strong>how</strong> to solve the problem at this point but identify <strong>what</strong> the problem is. Here are some examples of HMW statements rewritten from the previous examples that suggest an outcome:</p><ul><li><strong>“</strong>How might we… build a model to predict a car value from a car metadata?”</li><li><strong>“</strong>How might we… create a data locking system to secure our data?”</li></ul><p>See how easy it is to slip into suggesting an outcome? We all have ideas, but we want to make sure we are aligned on the problem is before we start thinking of <strong>how </strong>we are going to solve a problem. Sometimes, you may find that the problem you were asked to solve can be solved with something other than a model.</p><p>Now, the goal of this process is to come up with one or many approaches. The people involved also need to understand this path is iterative and that the group is on a journey to find the right problem and the right solution — knowing that ideas and requirements can morph and change just as the business does.</p><h4><strong>The Five W’s</strong></h4><p>If you are tight for time, the five W’s allow for a quick breakdown of problem statements into a single discrete problem statement. The five W’s are Who, What, When, Where, and Why. In this case, ask yourself and the team (probably with some debate):</p><ul><li>Who is going to use the outcome?</li><li>What do they need to do with it?</li><li>When are they going to use it? (At what point in their process?)</li><li>Where and what platform will they use it?</li><li>Why would they use this outcome? (Is it important?)</li></ul><p>Once you have an HMW statement or answered the five W’s, you will have at least one problem statement that the team can tackle. After voting on and selecting the most important problem statement, the next step is to think of all of the ways that the problem can be solved. This is the idea generation step of the Design Thinking process called ideation.</p><h3>Ideate</h3><p>Now that you have our problem statement, you will need to think about the different ways the problem can be solved. In this step, any idea is a good idea, focusing on quantity over quality. Make sure to do this step with your stakeholder if possible, so you can receive immediate feedback on the ideas. Use this as a time to merge the technical speak into a non-technical story.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WjILHIDRHJPsXY8PFP7WMQ.jpeg" /></figure><p>When you are ideating, try and discuss similar solutions that have solved similar problem statements before. This could be in the same industry you are operating in or different industries. These types of conversations can beget even more interesting ideas and inspirational ways to combine existing or new data with problem statements. For example, if you’re trying to figure out the optimal place for truckers to stop to sleep, could you build a model like Airbnb to allow drivers to stay in their homes?</p><p>Using a whiteboard, PowerPoint, or Google Sheets to keep track of ideas can be beneficial. Come up with as many ideas as possible and prioritize them based on complexity, time to complete, and impact. For this, I like to keep in mind the impact to effort matrix from the <a href="https://uxplanet.org/lightning-decision-jam-a-workshop-to-solve-any-problem-65bb42af41dc">Lightning Decision Jam</a><strong>.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*unmB6PLOoJ4TEWUpJlfbXg.jpeg" /><figcaption>Impact to Effort Matrix from the Lightning Decision Jam</figcaption></figure><h3>Prototype</h3><p>Once you have your list of ideas of how you would solve the problem, the next step is to build a prototype.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7djzvBcQ5266qKNMEFYStw.jpeg" /><figcaption>Come up with a couple of prototypes that are quick to build.</figcaption></figure><p>Now, we are not talking about something that is a fully functional application. The goal here is to build something that looks like it would work but embraces the “fake it ’til you make it” mentality.</p><p>Most importantly, this outcome is NOT a model design. It should be the output of whatever model you are looking to build. In the end, your data science solution is probably going to end up on some sort of visualization — this could be a dashboard, a notification in an app, or an API response. In this case, we are looking to build out what the end result <strong>could</strong> look like, not an actual fully functional outcome.</p><p>This prototype could be a JSON file of what the model would return, a PowerPoint of how the app could look, or a hand-drawn picture of the graph that the model would generate. There is no “best” way to build the prototype. I usually go with the approach that allows me to create a couple of realistic-looking prototypes in a few hours.</p><h3>Test</h3><p>Once you have one or more prototypes, test them and collect feedback about the design by showing the stakeholders. This is an important time for feedback. If what you’re looking to create doesn’t meet with the approval of the stakeholder, this is usually the time that any discrepancy comes out. It is also the time for feedback and alignment. Anything that the stakeholder notices are off or could be improved should be added to the requirements for the final model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hz7M9DxtmOV_TJFP-rjT_g.jpeg" /></figure><p>Some important considerations when collecting feedback about the prototype are:</p><h4><strong>Answer Questions without Leading the Feedback</strong></h4><p>Try not to directly answer a question like “what is this metric supposed to be?” Instead of directly answering with “that’s the number of reservations made per hour”, ask what the user stakeholder or user thinks it is.</p><p>For example, respond to “What is this metric supposed to be?” with “What do you expect this metric to mean if anything?”</p><p>This gives you greater insight into what is driving the questions. Could it be that the feature is not clear enough or is it that an outcome is not useful or as expected?</p><h4><strong>Silence is OK</strong></h4><p>Be OK with silence — let the stakeholder or user play with or study the result. Try not to guide the user through your prototype. If your solution is supposed to be self-explanatory, then the user should hopefully be able to figure out what the solution is telling them. It’s OK if there are quiet spells as a user studies the prototype.</p><h3>After the Test</h3><p>After we get feedback about the simple prototype, that is when the real work begins.</p><p>With a clear outcome in mind, the assurance that you can think in terms of the customer, and the confidence that you will provide a solution they will value, you can start building the real solution.</p><p>The benefit of the Design Thinking process is that you can have a clear outcome of what needs to be done. In addition, your stakeholders feel connected to your process. They have the confidence that you are building something that will benefit them. They trust that you understand their point of view, where their opportunities are, and that you can identify where additional opportunities might be.</p><p>Try using these approaches in your next project — you might be surprised with what you learn.</p><h3><strong>Some More Resources</strong></h3><p>If you’re interested in diving into the details of a couple of different Design Thinking processes, there are several excellent resources that have also helped to inspire this article. My two favorites are:</p><ul><li><a href="https://www.thesprintbook.com/book">Sprint: How to Solve Big Problems and Test New Ideas in Just Five Days (thesprintbook.com)</a>. This is a full book and week-long Design Thinking process.</li><li><a href="https://uxplanet.org/lightning-decision-jam-a-workshop-to-solve-any-problem-65bb42af41dc">Lightning Decision Jam: A Workshop to Solve Any Problem | by Jonathan Courtney | UX Planet</a>. This is an excellent and brief article describing the Lightning Decision Jam (a 45-minute activity).</li></ul><p>All images unless otherwise noted are by the author.</p><p>Feel free to connect with me on <a href="https://www.linkedin.com/in/taylor-jensen-02999/">LinkedIn</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c4aaaa9204a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/design-thinking-improves-your-data-science-4c4aaaa9204a">Design Thinking Improves Your Data Science</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[Feature Importance for Any Model using Permutation]]></title>
            <link>https://medium.com/@T_Jen/feature-importance-for-any-model-using-permutation-7997b7287aa?source=rss-4d9206d21dd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/7997b7287aa</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Taylor Jensen]]></dc:creator>
            <pubDate>Fri, 23 Sep 2022 16:30:03 GMT</pubDate>
            <atom:updated>2022-09-23T16:30:03.803Z</atom:updated>
            <content:encoded><![CDATA[<p>The simplest and model-agnostic approach to evaluating feature importance in machine learning models.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wV0ZQqz_-rBw3ewFebFBtQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@kmuza?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Carlos Muza</a> on <a href="https://unsplash.com/s/photos/product-management?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3>Why Feature Importance?</h3><p>Feature importance is a major part of any model building and evaluation. Without determining what model inputs are the most important, any model is a “black-box” model. Even in the simplest modeling problems, we need some ability to learn what inputs affect model predictions and those that do not.</p><p>There are several ways to estimate feature importance from models. However, few are model-agnostic and even fewer are extremely easy to understand. However, permutation importance is not only model-agnostic but intuitive to understand and easy to implement.</p><p><strong>Permutation feature importance </strong>measures<strong> </strong>the change in model error (like MAE, r-squared, or accuracy) after a single model feature’s values have been permuted (aka. shuffled).</p><p>Before I get to explaining exactly how permutation importance works, let’s review problems with feature importance in some common models.</p><h3>Problems with Feature Importance in Common Models</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TfXzdBgdNSsY-RYgQ7f5jg.png" /><figcaption>The general equation format for linear regression</figcaption></figure><h4><em>Linear Regression</em></h4><p>You can calculate a representation of feature importance for a linear regression by standardizing features and taking a look at the coefficients of the model.</p><p>While this gives you an idea of the relative feature importance of one feature vs. another, this misses out on connecting the impact of the features in terms that can be used to compare against other models, like a Support Vector Machine with a non-linear kernel. In addition, this “coefficient importance” is only in terms of the linear model itself, not in terms of a model metric, such as mean squared error (MSE).</p><h4><em>Support Vector Machine</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*FrpwrtShuQCMbQKVGRo-XQ.jpeg" /><figcaption>Simple visualization of a Support Vector Machine with a non-linear kernel</figcaption></figure><p>The support vector machine (SVM), while powerful, can lack the direct ability to calculate feature importance. There is one key word in the last sentence — “can”. If you use a support vector machine with a linear kernel, the way to calculate feature importance is the same as linear regression. By taking the coefficients of the model, the relative feature importance of the variables come to light. However, this suffers the same drawback as the linear regression as the feature importance is relative to the model itself, not to any specific error metric.</p><p>If a non-linear kernel is used, such as the polynomial or radius basis function (RBF) kernel, extracting coefficients is no longer achievable. With non-linear kernels, the support vector machine maps data to a higher feature space, where the data is more likely to be able to be linearly separated. By mapping features to a higher dimension, the linear nature of the model is broken, meaning that the coefficients are not available.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V5pVS9ehMb_SEgRji7vQ6w.png" /><figcaption>Simple artistic rendering of a Random Forest</figcaption></figure><h4><em>Trees &amp; Random Forests</em></h4><p>Feature importance in trees is typically defined as the features that contribute most to a decrease in the impurity metric used for the model, such as Gini impurity.</p><p>However, fitting a decision tree or random forests over a dataset can be tricky because decision trees are notorious for over-fitting on training datasets.</p><p>In addition, the feature importance of a decision tree typically prefers features that have a large quantity of possible values (known as high cardinality). This bias can potentially skew the feature importance and give results that may not make sense, especially if the model is over-fitting on the training data.</p><p>The <a href="https://scikit-learn.org/stable/auto_examples/inspection/plot_permutation_importance.html#sphx-glr-auto-examples-inspection-plot-permutation-importance-py">Sci-kit Learn documentation </a>has a really good example of Permutation Importance vs. Random Forest in action, if you’re interested in learning more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*QJGzZAKJAvYEYgX1cMr04g.jpeg" /></figure><h3>The Benefit of Permutation Feature Importance</h3><p><strong>Does not require model retraining.</strong> I am interested in how the model is using the current column, instead of retraining the model to find new relationships. Permutation feature importance uses only the model that was originally trained.</p><p>There are methods that recommend dropping a column and then retraining a model to get an idea of the feature importance. However, not only does this take time to retrain a model, but it allows the model to “cheat” and identify potentially different relationships than it did in the original training, which is not useful in the analysis of feature importance for an existing model.</p><p><strong>Captures variable interactions. </strong>By randomly shuffling only one column at a time, I see what the model has learned about how variables work together.</p><p>This means that when I shuffle a column and another column is dependent on the interaction, I will see a larger change in performance across both column than if the columns were not directly related (aka linearly separated). This means that permutation importance is capturing the holistic model impact by changing only one column’s values.</p><p><strong>Model agnostic. </strong>Permutation of feature importance across models gives us a better understanding of how a variable impacts a model in real terms. Since permutation feature importance calculates the change in error, it shows how important a feature is across many models.</p><p>For example, if there are two models with given error rates, we can see how much those error rates change as different features are permuted. We also get an idea of what the models have learned, regardless of model type. Neural network, linear regression, and all other classes of model are all analyzed the same way, as long as we have a target metric.</p><h3>Considerations for Permutation Feature Importance</h3><p><strong>Performance with correlated variables. </strong>If the model contains correlated features, then permutation importance can cause confusing results.</p><p>If the model has learned to use either of the correlated features in predictions, then the correlated feature is used as a substitute for the data that was randomly switched around. This means that the permutation importance will report a lower importance score for both of the correlated features.</p><p>This can mislead you into incorrectly thinking that an important feature is not important, even though the data is being hidden inside of another correlated feature.</p><p><strong>Poor performance on over-fit models. </strong>When any model is over-fit, the variables can memorize noise in the dataset. If the relationships between the variables are not representative of real life, then the permutated feature importance will not be either.</p><p>A sign of overfitting with permutation feature importance is very different feature importance values across both training and testing sets. So, make sure the model performs well across the training and testing set.</p><p><strong>Useful for Supervised Learning. </strong>For permutation importance to work, there needs to be a metric to compare the permutations to. Otherwise, if the problem is completely unsupervised, there will not be any metric to compare the effect of the column permutations with.</p><h3>Calculating Permutation Feature Importance</h3><h4>Overall Approach</h4><p>Calculating permutation feature importance is pretty straightforward, which makes it appealing to use. Permutation feature importance works as follows:</p><ol><li>Pick a column</li><li>Randomly shuffle the column</li><li>Predict results using current model</li><li>Compare the existing model performance metrics vs. the model with shuffled column</li><li>Repeat for new columns or new iterations</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PNEI1L6MR4Br1p8BfgPgyA.png" /><figcaption>General feature permutation process</figcaption></figure><h4>With Sci-kit Learn</h4><p>Lucky for us, <a href="https://scikit-learn.org/stable/modules/generated/sklearn.inspection.permutation_importance.html#sklearn.inspection.permutation_importance">Sci-kit Learn</a> provides us with a handy function to calculate feature importance for any model developed with Sci-kit learn or that is compatible with Sci-kit Learn in a single line of code.</p><p>A simple example of its use is below. This assumes you have a trained estimator and the data prepared already.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oaX3ZCBO4Ng_GOvK5QHd3w.png" /><figcaption>Sci-kit Learn permutation importance snippet</figcaption></figure><h3>Case Study: Insurance Medical Costs</h3><p>Let’s review a real-life example using the <a href="https://www.kaggle.com/datasets/mirichoi0218/insurance">Medical Cost Personal Dataset</a> with the goal to predict the medical charges that someone might be billed by health insurance.</p><p>There are 6 variables of various data types in the dataset and one target column.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1JHQSP9yV1v_c9h9dmoi8Q.png" /></figure><p>The columns are:</p><ul><li>Beneficiary age</li><li>Gender</li><li>Body Mass Index (BMI)</li><li>Number of dependents covered</li><li>If the insured person is a smoker</li><li>Region of the US where the beneficiary resides</li><li><strong>Target variable:</strong> Medical Costs billed by insurer</li></ul><p>First, I import the necessary Python libraries:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c5f7009818054998294de18cd5074ab5/href">https://medium.com/media/c5f7009818054998294de18cd5074ab5/href</a></iframe><p>Then, I import the data and perform some data processing in order to get the data suitable for model training. In this case, I one hot encode the beneficiary residence into 4 columns and encode the binary gender and smoker columns.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9fba7b9b0499ff5efe45117d60e0f0b1/href">https://medium.com/media/9fba7b9b0499ff5efe45117d60e0f0b1/href</a></iframe><p>The final output of the simple pipeline looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*c3T1qeEotLgApfyS0zDeWg.png" /></figure><p>To save us some time and get right to the modeling comparisons, I’ve done some pre-selection of model types and hyperparameters. I test a linear regression, SVM, and Random Forest and am able to achieve models that do not overfit on severely on the dataset.</p><p>For this exercise, good R2 across the data splits are enough to signal the models are not overfitting. The training code for the models is below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/57107dea02beb6f3d75b585b59ed94ec/href">https://medium.com/media/57107dea02beb6f3d75b585b59ed94ec/href</a></iframe><p>I’m almost positive I could do more to achieve better performance, but these models serve as illustrative examples, so I just want to make sure the results are reasonable. In this case, each model is within 4% R2 different between the training and testing splits.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/285/1*hLc_1RcOIYrztR6La62cIA.png" /><figcaption>Modeling Performance Across Training and Testing Sets</figcaption></figure><p>After the models are trained, I gather the permutation importance using the mean squared error (MSE) for each model using the Sci-Kit Learn function from earlier:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8e57767f214faec233f9a963c93111bc/href">https://medium.com/media/8e57767f214faec233f9a963c93111bc/href</a></iframe><p>Then, I combine the results into a visualization so I can compare the permutation importance across each of the three models.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/973d127cce14629326cff3f4b979b854/href">https://medium.com/media/973d127cce14629326cff3f4b979b854/href</a></iframe><p>The visualization code outputs the below visuals for the training and testing data, respectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CrgSkey0OBouChcS1uRPQg.png" /><figcaption>Training Data Permutation Importance</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p3v0zKQAxPnQiMyEcwXiFg.png" /><figcaption>Test Data Permutation Importance</figcaption></figure><h4>Analysis of Results</h4><p>The results of the permutation feature importance are telling. Since the models are not overfitting on the dataset, the results between the training and testing sets are consistent.</p><p>It appears that for each model, two variables are the biggest drivers of model predictions: age and if the insured is a smoker. In all three models, shuffling the data in these columns causes the model mean squared error to increase to varying degrees.</p><p>For the age variable, the model that depends on this variable the most appears to be the simple linear regression, with an increase of RMSE of almost 7, which is a significant increase when compared to the rest of the models. The SVM and random forest models also pick up on the importance of this feature, but do not attribute it with as much importance as the linear regression. This is most likely due to the non-linear nature of the models picking up on different relationships inside of the dataset, such as with the smoker_yes column.</p><p>For the smoker_yes variable, it the story is the opposite. The linear regression column places little importance on the column, as can be seen by the tiny increase in model error. The SVM and random forest, on the other hand, see RMSE increase by significantly more.</p><p>One interesting thing to note is the <strong>improvement in linear regression model error</strong> with the permutation of the bmi column. Although this improvement in performance is rather small, it is important to consider that the model may have learned some spurious relationship while looking for linear relationships in the dataset. In this case, it would be important to test if model performance would change significantly with the removal of this feature, as well as other features they had little impact on model error.</p><h3>Summary</h3><p>In this article, I reviewed of some of the problems with gathering model-specific feature importance. Then, I discussed the benefits permutation importance can add to cross-model feature importance. I also discussed things that we need to remember when using permutation importance, like ensuring we do not have any correlated variables, to ensure it works correctly. Finally, I did a quick data experiment to prove out the approach and compare how different three different models choose their important features and how these features impact the models.</p><p>I would also encourage you to check out other model explanation processes like SHAP, LIME (both are model agnostic) and integrated gradients (for Neural Networks).</p><p>Interested in more data science content? Follow me on Medium or connect with me on <a href="https://www.linkedin.com/in/taylor-jensen-02999/">LinkedIn</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7997b7287aa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Landing on Asteroids: The Value Story of Deep Learning]]></title>
            <link>https://medium.com/@T_Jen/landing-on-asteroids-the-value-story-of-deep-learning-d06be2957460?source=rss-4d9206d21dd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d06be2957460</guid>
            <category><![CDATA[space]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Taylor Jensen]]></dc:creator>
            <pubDate>Tue, 13 Sep 2022 16:22:27 GMT</pubDate>
            <atom:updated>2022-09-13T16:26:14.978Z</atom:updated>
            <content:encoded><![CDATA[<p>Over 18,000 hours spent annotating images. Synthetic data combined with deep learning could change this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ef62auh3mTVvmYxL.png" /><figcaption><a href="https://www.nasa.gov/content/osiris-rex-images">OSIRIS-REx Asteroid Bennu 3D Shape Model</a> Credit: NASA/Goddard/University of Arizona</figcaption></figure><p>Asteroids can contain secrets about the origin of the universe and can have commercial applications including mining, space stations, and commerce. The asteroid Bennu was selected by NASA in 2016 as a part of the <a href="https://www.asteroidmission.org/">OSIRIS-REx Mission</a> because it may provide information on the origins of our solar system and increase understanding asteroids that could impact earth.</p><p>However, landing a probe on an asteroid can require thousands of hours of work to identify safe areas on the surface. This can be even more complex when there are rocks the size of your fist all the way up to the size of a house or larger.</p><p>Historically, gathering the image data necessary is difficult to accomplish because of the lack of images annotated with rocks, the diverse nature of asteroid surfaces, and the inclusion of human interpretation bias in manual identification of rocks. The definition of what a “rock” is can mean different things to different people.</p><p>In this article, I review the value of solving this problem. In the next article in this series, I evaluate several deep learning architectures and their ability to find landing areas on the Asteroid Bennu while being trained only with synthetic image data. In the end, I built an image segmentation model that is better than industry-standard U-Net, while being only 4.5% of the size and complexity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*lRAIfAHiyl14Y9OG0EIU2A.png" /><figcaption><a href="https://www.asteroidmission.org/candidate-sample-sites/nightingale/bouldercount_nightingale_north/#main">Nightingale Boulder Count — Northern Region </a>Credit: NASA/Goddard/University of Arizona</figcaption></figure><h3>This is a Big Deal</h3><p>The OSIRIS-REx spacecraft launched to Bennu on September 8th, 2016. The asteroid was expected to have a sandy surface, like a beach. However, when the OSIRIS-REx arrived at Bennu in 2018 the surface was extremely rocky. This posed a difficult challenge for NASA. To identify potential landing sites, individual boulders across the surface of Bennu had to be counted by the human eye, using a single image at a time. To address this massive task, NASA utilized about 3,500 volunteers from the <a href="https://cosmoquest.org/x/about-cosmoquest/">CosmoQuest Bennu Mappers</a> citizen science campaign.</p><p>Volunteers took up to <a href="https://www.psi.edu/news/bennusite">45 minutes per image</a>, with the top 98 volunteers marking at least 100 images. If the top 98 volunteers took 45 minutes per image, this means that at least 18,375 hours were spent manually labeling rocks.</p><p>Since the annotation process is based in collective data sets and repetitive manually work, it becomes apparent that machine learning can have a massive impact on the speed, quality, and effectiveness of NASA missions.</p><h3>Why Synthetic Data for Asteroid Missions</h3><p>You might be wondering, why use synthetic images? There are two main reasons for this — the accessibility and the quality of the available images.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*yvTZ-UyniS2XZBgBPdxlJA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*2JJIAbjPR-M99jLkBxao1w.png" /><figcaption>Synthetic Images and Classification Masks, gathered from Romain Pessia’s and Genya Ishigami’s <a href="https://www.kaggle.com/datasets/romainpessia/artificial-lunar-rocky-landscape-dataset">Artificial Lunar Landscape Dataset</a></figcaption></figure><h4><em>Quality of Space Images</em></h4><p>As you might imagine, given the relative infrequency of missions to asteroids and other celestial bodies, image quality varies greatly. This can be due to the technology available at the time of the mission, the type of mission performed (such as exploration, extraction, etc.) and distance from the asteroid itself.</p><p>The NEAR Shoemaker mission in 2001 even crashed the probe into the surface of the asteroid 443 Eros. Images were taken on the way down and probe continued to operate. On top of all of this, the quality from a 2001-era camera taken from a moving probe in space and sent back to Earth is not entirely conducive to machine learning.</p><p>In fact, there have only been about three successful major missions to asteroids in our history. This contributes to the lack of images of the surface of asteroids available.</p><p>Those missions are the:</p><ul><li>NEAR Shoemaker mission to Eros (~2001)</li><li>Hayabusa mission to Itokawa (~2005)</li><li>Hayabusa2 mission to Ryugu (~2018–2019)</li></ul><h4><em>Accessibility of Space Images</em></h4><p>While most images are openly available in mission archives from NASA, not all programs or data gathering is created equal. There are different goals to different asteroid missions. Some missions aim to collect samples, take photographs, do scientific tests, study the behavior of asteroids, do all of these, or none of these. If visual images are not of sufficient quality, then they might not be published. Of course, all of these depend on what space agency is performing the study. There are also usually many papers that are published but datasets and images may not be openly available for use.</p><p>However, the OSIRIS-Rex photos of the surface of the asteroid Bennu <a href="https://www.universetoday.com/145486/highest-resolution-mosaic-image-of-the-surface-of-bennu/">are the highest resolution images of a celestial body that have been gathered thus far</a>. With NASA scouring the surface of the asteroid manually in search for landing areas, and the synthetic data available, this provides the optimal conditions to train a machine learning model and test it on the real surface of an asteroid. Hopefully, this mission is setting the standard for image collection quality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JSZ6R07rERYzq96y1J_ZoA.png" /><figcaption>The Global Mosaic of the Surface of Bennu Credit: NASA/Goddard/University of Arizona</figcaption></figure><p>To see how I used <a href="https://astrogeology.usgs.gov/search/map/Bennu/OSIRIS-REx/OCAMS/Bennu_OSIRIS-REx_OCAMS_Global_PAN_Mosaic_5cm_v1">images of the surface of Bennu from the USGS Astrogeology Science Center</a> and the <a href="https://www.kaggle.com/datasets/romainpessia/artificial-lunar-rocky-landscape-dataset/metadata">Artificial Lunar Landscape Dataset from Kaggle</a> to build a model to find rock-free areas on Bennu, check out my next article in this series: <a href="https://medium.com/@T_Jen/deep-learning-synthetic-data-for-asteroid-landings-e8f857a1e924">Deep Learning &amp; Synthetic Data for Asteroid Landings</a>.</p><p>If you would like an in-depth dive, you can find my full paper here: <a href="https://arch.library.northwestern.edu/concern/generic_works/7h149q33c?locale=en"><strong>Autonomous Rock Detection for Asteroid Missions Using Deep Learning and Synthetic Data | Northwestern University</strong></a></p><p>Interested in more data science content? Follow me on here on Medium or connect with me on <a href="https://www.linkedin.com/in/taylor-jensen-02999/">LinkedIn</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d06be2957460" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deep Learning & Synthetic Data for Asteroid Landings]]></title>
            <link>https://medium.com/@T_Jen/deep-learning-synthetic-data-for-asteroid-landings-e8f857a1e924?source=rss-4d9206d21dd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8f857a1e924</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[space]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Taylor Jensen]]></dc:creator>
            <pubDate>Tue, 13 Sep 2022 16:22:26 GMT</pubDate>
            <atom:updated>2022-09-13T16:28:00.768Z</atom:updated>
            <content:encoded><![CDATA[<h4>Using deep learning and synthetic images to find safe landing areas on asteroids.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*YUGhWR9YZo0yDnX2qNJSkQ.png" /><figcaption><a href="https://www.asteroidmission.org/bennu_global_mosaic/">Bennu Asteroid Global Mosaic</a></figcaption></figure><h3>Introduction</h3><p>The goal of this modeling process is to find rock-free areas of the surface of the asteroid Bennu using only synthetic images of a lunar surface for training. The use of these models could have saved over 18,000 hours of manual image review in the OSIRIS-Rex NASA mission.</p><p>Read on if you want to find out how my custom deep learning model outperforms the industry standard U-Net model with this semantic segmentation class, with only 3% of the complexity.</p><p>If you are curious about the potential scale and impact of this approach, see my previous article about the <a href="https://medium.com/@T_Jen/landing-on-asteroids-the-value-story-of-deep-learning-d06be2957460">in-depth value of using these approaches</a>.</p><h3>The Data &amp; Preprocessing</h3><p>There are two datasets used for this model creation: Romain Pessia’s and Genya Ishigami’s <a href="https://www.kaggle.com/datasets/romainpessia/artificial-lunar-rocky-landscape-dataset">Artificial Lunar Landscape Dataset</a> (ALLD) and the <a href="https://www.asteroidmission.org/bennu_global_mosaic/">Bennu Global Mosaic</a> (BGM).</p><p>The ALLD is a dataset of synthetically created images of lunar surfaces with pixel-by-pixel labels of boulder, rock, sky, and background classes. This dataset is used for the initial training and testing of algorithms. There are 9,766 synthetic images of 480x720p resolute in the dataset. Each image has an associated prediction mask, which makes semantic segmentation the best approach to handle this modeling opportunity.</p><p>To match the problem I am solving, I’ve simplified the classes so that there is only a binary class — “rock” and “not rock”. I did this as we don’t want our spacecraft hitting any rock, regardless of shape and size. In addition to this simplification, I also preprocess each image by passing it through Sobel edge detection, for later use in custom models.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/1*RYbcPxqoA8lccbRuDVJbog.png" /><figcaption>Sample of ALLD with original visual (left) and mask (right) image data.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*mfaQ-AfkDNq7UZUxdFeYgA.png" /><figcaption>Sample of preprocessed ALLD with binary class mask (left) and Sobel edge detection (right).</figcaption></figure><p>The BGM is a high-resolution real image of the entire surface of the asteroid, with each pixel representing 5cm distance and a total size of 15708x7854 pixels. The BGM is used to test algorithm performance on actual NASA data. I break down this image into separate individual images that are the same size as the ALLD dataset (480x720p), for easy processing after model training.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*YUGhWR9YZo0yDnX2qNJSkQ.png" /><figcaption><a href="https://astrogeology.usgs.gov/search/map/Bennu/OSIRIS-REx/OCAMS/Bennu_OSIRIS-REx_OCAMS_Global_PAN_Mosaic_5cm_v1">Bennu OSIRIS-REx OCAMS Global PAN Mosaic 5cm v1 | USGS Astrogeology Science Center</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zUAHKbHGq5IU2raWnI1y7w.png" /><figcaption>Zoomed-In 480x720 Sample of the Global Bennu Mosaic</figcaption></figure><h3>Evaluation Structure</h3><h4>Model Scoring</h4><p>To appropriately evaluate each of the semantic segmentation models, we need to have consistent metrics. Each model produces precision and recall metrics for each class across all pixels and images. I use the precision and recall metrics to generate an F1 Score for each model. The <a href="https://scikit-learn.org/stable/modules/generated/sklearn.metrics.f1_score.html">F1 Score</a> is the harmonic mean between precision and recall.</p><p>The training and test sets consist of the ALLD dataset in a 70% training and 30% testing split. The final validation set reserved for the entire surface of the BGM. Once model training is completed, the two models with the best F1 score on the validation set are used in a final evaluation where it will predict rocks on the primary landing site “Nightingale” on the surface of the asteroid Bennu. As I do not have access to the image segmentation data on the real images, the comparison of models is based on how well the models identified the two landing areas for the mission.</p><h4>High-Level Model Design</h4><p>Weighted binary cross-entropy is utilized as the loss function for all neural networks. This loss function allows us to have the model focus on predicting one class over the other. In the ALLD dataset, the average ratio of positive to negative class pixels across all the images in the training dataset had approximately 10 times the number of negative classes than positive classes per pixel.</p><p>The cost of predicting a flat surface instead of a rock (a false negative) is much higher than predicting a rock and there actually being a flat surface (a false positive), so the best model is one that has a mix of the highest accuracy and recall. To combat this, the cost of misclassifying missing a rock is weighted ten times more than missing an empty area.</p><p>Each model is using an Adam optimizer, with a learning rate of 0.0001 and 480x720 pixel images and each network uses a Sigmoid activation function for the final class prediction probability.</p><h3>Model Architectures</h3><p>To spare us some time, we will take a look at the best two models: the standard U-Net model and my custom Y-Model.</p><h4><strong><em>U-Net</em></strong></h4><p>The <a href="https://arxiv.org/pdf/1505.04597.pdf">U-Net</a> architecture was originally developed in 2015 for biomedical image segmentation. The architecture’s design and rigorous testing in other research make this architecture an excellent base-line model for comparison.</p><p>U-Net architecture uses two different “paths”, called contracting and expansive paths. The paths deconstruct and reconstruct an image in a way that outputs the desired predictions while maintaining as much of the original image as possible. U-Net has just over 31 million trainable parameters. So, this is a relatively complex model as far as parameters are concerned when compared to the Y-Model. A visual of the U-Net architecture is below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FwoCeMxyxAxby2C8CwLuTA.png" /><figcaption><a href="https://arxiv.org/pdf/1505.04597.pdf">U-Net</a> architecture as designed by Olaf Ronneberger, Philipp Fischer, and Thomas Brox</figcaption></figure><h4><strong><em>Y-Model</em></strong></h4><p>The Y-model architecture is shaped like a horizontal letter “Y”. The Y-Model architecture attempts to capture information useful for predictions from two versions of the input image: the raw image and the raw image with Sobel edge detection applied. This model contains about 1.4 million parameters and has 4.5% of the trainable parameters as U-Net.</p><p>What is distinct about this model is the fact that it has a branch dedicated to the ingestion of a preprocessed image. In this case, the preprocessed image has Sobel edge detection applied to it. The idea of using Sobel edge detection in conjunction with the original image, is that I can provide the model with what I know is important information about the objects to be predicted.</p><p>This means that the model wouldn’t have to learn that edges were important by itself. Instead, I know that in order to identify if something is a rock or not, it usually needs to have a solid edge to it. With this intuitive knowledge, I provide this information to the model in order to narrow the possible feature space that needs to be explored.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*4Cqa4XxfzPtW0X2B89PQ5A.png" /><figcaption>Custom Y-Model Architecture with a Raw Image Branch (for ingestion of original images) and Processed Image Branch (for ingestion of preprocessed images).</figcaption></figure><h4>Results</h4><p>After training for 20 epochs the model performance on the training and test sets are evaluated. The performance for training and testing sets are as follows:</p><ul><li>U-Net F1 training score: 71.4%</li><li>Y-Model F1 training score: 59.4%</li><li>U-Net F1 test score: 73.1%</li><li>Y-Model F1 test score: 63.8%</li></ul><p>Friendly reminder- the <a href="https://scikit-learn.org/stable/modules/generated/sklearn.metrics.f1_score.html">F1 Score</a> is the harmonic mean between precision and recall.</p><p>By using these metrics alone, it appears that U-Net is the better model. However, these metrics are only part of the story.</p><h4><em>Visually Reviewing Test Set Images</em></h4><p>In addition to the metrics, I get a better sense of how the models are performing by reviewing samples of images from the dataset. In the samples, the brighter yellow the pixel is, the higher the probability the model is predicting that the pixel belongs to a rock. From the samples of the synthetic images from the ALLD, it is easy to see that U-Net clearly best matches up to the original mask.</p><p>The Y-Model prediction mask is messier due to the simpler model structure. The Y-Model also has a greater difficulty discerning the background class from rocks, as is clear across the horizon. You can see this clearly in the Y-Model prediction mask where the background is a dull green/blue. The big question is… does this behavior hold true when we look at real images?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/1*BG7OGdSq-1Tfl80O2YTYqQ.png" /><figcaption>Original Mask</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nV78pZD5WnzoZrfZq_k9mw.png" /><figcaption>U-Net Mask Prediction</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*TrNUB290Cwfx6e45PVkCMA.png" /><figcaption>Y-Model Mask Prediction</figcaption></figure><h4><em>Visually Reviewing Validation Set Images</em></h4><p>When we compare predictions for the Nightingale landing area (which is the official landing area of the mission), we get a clear sense of the difference in U-Net and Y-Model performance in real life.</p><p>If you’ve peeked ahead to the images, you may notice that the model performance seems to have flipped.</p><p>We can clearly see that U-Net does not perform as well as the Y-Model. The U-Net model misses a significant portion of the rocks in the landing area, while Y-Model cleanly identifies the NASA landing area. This is a critical indicator of the U-Net model over-fitting on the synthetic images. This over-fitting means that U-Net has learned features from the synthetic images that are not applicable to the training set. Without this knowledge, I might have had recommended a poor-performing U-Net model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*ApbIgEOBJG6njgSo38w8KA.png" /><figcaption>Original Image of the Landing Site Nightengale</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*nA8sN1di6b8tjHYyz8T61Q.png" /><figcaption>U-Net Heatmap Prediction of the Landing Site Nightengale</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*qqcUIZAg23jenHlqJvBr2g.png" /><figcaption>Y-Model Heatmap Prediction of the Landing Site Nightengale</figcaption></figure><h3>Conclusion</h3><p>The Y-Model provides satisfactory performance when we look at the landing site Nightengale, while U-Net performs better on the synthetic data. This is a twist if we were only looking at the training data, as U-Net could have been misconstrued as the highest performing model, given the improved performance on the synthetic data over the Y-Model.</p><p>In addition to this discovery, it is important to note that it took NASA volunteers over 18,000 hours to search the surface of the asteroid, but in order to get results for the entire surface of the asteroid Bennu from the Y-Model took about 2 minutes. To give you an idea of how fast this prediction is vs. asteroid size— Bennu is as <a href="https://www.asteroidmission.org/bennu-height-landmark-comparison/">big as the Empire State Building.</a></p><p>In conclusion, by using a less complex model and doing some of the image preprocessing up front, I was able to build an effective model using only synthetic images that quickly and effectively identifies rock-free areas on asteroids.</p><p>As a bonus, below is the resulting image across the entire surface of the asteroid Bennu from the Y-Model. It has landing sites Nightingale (the actual landing site) and Osprey (the backup landing site) labeled. To give you an idea of the scale of some of the rocks, I’ve labeled rock “A” — which is as big as a house.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*xfdO41Mg0Yv1ozmn-TVKvQ.png" /><figcaption>Y-Model results across the entirety of the Bennu surface.</figcaption></figure><p>If you would like an in-depth dive, you can find my full paper here: <a href="https://arch.library.northwestern.edu/concern/generic_works/7h149q33c?locale=en"><strong>Autonomous Rock Detection for Asteroid Missions Using Deep Learning and Synthetic Data | Northwestern University</strong></a></p><p>Interested in more data science content? Follow me on Medium or connect with me on <a href="https://www.linkedin.com/in/taylor-jensen-02999/">LinkedIn</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8f857a1e924" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DIY Software Alternatives to Microsoft & Google Products]]></title>
            <link>https://medium.com/@T_Jen/diy-software-alternatives-to-microsoft-google-products-98c4e30f4630?source=rss-4d9206d21dd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/98c4e30f4630</guid>
            <category><![CDATA[office]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[nas]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[Taylor Jensen]]></dc:creator>
            <pubDate>Fri, 09 Sep 2022 14:31:20 GMT</pubDate>
            <atom:updated>2022-09-09T14:31:20.598Z</atom:updated>
            <content:encoded><![CDATA[<h3>Do-It-Yourself Software Alternatives to Microsoft &amp; Google Products</h3><p>Why pay subscriptions for online services when you can get it for free and control your data with Network Attached Storage?</p><p>In my previous article about hosting your own cloud software, I mentioned the value of building out your own personal cloud with a Network Attached Storage (NAS) device. This article continues the discussion by focusing on the NAS software I use for free. This means I don’t have to give up my personal information, data, or pay to the big cloud providers.</p><p>Yes, I’m looking at you, Microsoft ($70 per year subscription) and Google (up to $100 per year).</p><p>See the reasons I built my own personal cloud with a Network Attached Storage (NAS) device in my last article.</p><p><a href="https://medium.com/@T_Jen/why-i-built-my-own-personal-cloud-6fb426f61973">Why I Built My Own Personal Cloud</a></p><p>I’ll cover the major comparison points of each software with the big cloud providers.</p><p>It’s important to note that different software for <a href="https://www.truenas.com/">TrueNAS</a> or <a href="https://nextcloud.com/">Nextcloud</a> can be implemented via open source or for free without having to purchase a Synology product. These alternatives may need some know-how of how to set a server up. I am personally familiar with the products provided with my Synology DiskStation so I will be covering those in three broad categories.</p><h3>The Types of Services I Use:</h3><ul><li>Document Collaboration (Like Google Docs)</li><li>Document Syncing Across Devices (Like Microsoft Office 365)</li><li>Automatic Photo &amp; Video Backup (Like Google Photos)</li></ul><h3>Document Collaboration</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*eL8eM5XHVmXMhLEhxotQaQ.png" /><figcaption>Photo by <a href="https://unsplash.com/@anniespratt?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Annie Spratt</a> on <a href="https://unsplash.com/s/photos/collaboration?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p><strong>What I Use:</strong> <a href="https://www.synology.com/en-us/dsm/feature/office">Synology Office</a></p><p><strong>What is Free: </strong><a href="https://nextcloud.com/">Nextcloud</a></p><p>Synology provides software on top of their NAS systems which allows you to use the NAS device as a document collaboration tool. This can be extremely helpful in several situations. Think about the last time you wanted to get feedback on a document from someone. If you want to share it with them and they do not have Microsoft Office and you do not want to import it into Google Drive, Synology Office is a good choice for quick sharing and collaboration!</p><p>Below I’ve pulled an example of how I have been developing my Medium articles.</p><p>By the way, if you’re curious here is the article that from this draft: <a href="https://medium.com/@T_Jen/required-an-intuitive-understanding-of-your-models-59d3a6f923fa?source=your_stories_page-------------------------------------">Required: An Intuitive Understanding of Your Models</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sB7fKHg9S-HUDxOo_rYxag.png" /><figcaption>Synology Office Collaboration</figcaption></figure><p>So, let’s go over a couple of the handy features that come with having your own office suite. You can see that the user interface rather familiar. There is the “File”, “Edit” and “View”, “Insert” tabs up top. These cover what you would think they might. In the “File” tab you can save copy, move and see the version history of the file.</p><p>You can also generate a custom link to share with someone in this menu. Once created, they can immediately use the link, hop into a web browser, and start working with you. No subscription required. A visual of this drop down is in the example below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*h2fL816YpAZuOD1aILjVlg.png" /><figcaption>The “File” Tab Menu on Synology Office</figcaption></figure><p>If you decide to share your document with someone, you can add additional security to the link you share such as password and time limit on the link. This is especially hand when you just need someone to access your document for a short period of time. When you are done editing the document, it is stored right on your NAS for immediate use!</p><p><strong>Key Takeaway: </strong>Not only can you do all of the popular office functions in the Synology Office, but you can openly collaborate with someone and control who accesses your document and when. All of this access includes typical office offerings like documents, spreadsheets, and slides.</p><h3>Document Syncing</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q7wCouKXEksHPnggi8ItfA.png" /><figcaption>Photo by <a href="https://unsplash.com/@dlxmedia?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">dlxmedia.hu</a> on <a href="https://unsplash.com/s/photos/sync?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p><strong>What I Use: </strong><a href="https://www.synology.com/en-us/dsm/feature/drive">Synology Drive</a></p><p><strong>What is Free:</strong> <a href="https://nextcloud.com/files/">Nextcloud Files</a></p><p>What used to be one of the biggest benefits of using Microsoft OneDrive for me was document synchronization. I could log into my desktop at home and make some changes to a file. Then, I would go to a coffee shop, open up my laptop, and my files would be there with all of the latest changes. I was able to be super productive on the go.</p><p>However, when I hit my free file limit on OneDrive, I had to make choices about what I wanted to access and when or pay more money for storage. Making this choice all the time is hard and does not work for me. Sometimes I need a document I accessed six months ago and sometimes I need a document I worked on yesterday — why should I have to choose?</p><p>Thankfully Synology Drive (also check out <a href="https://nextcloud.com/files/">Nextcloud Files</a>) was here to help me out. Once I got my Synology NAS set up, the first thing I did was set up Synology Drive. After setup, I moved all of my files to the Drive. Now I have all of my documents available to me anytime I have internet access. When I won’t have access to internet, I download my files ahead of time. That way I can access it without any internet! Once I restore my access, my files sync and I’m up to date again.</p><p>I used the sync feature all of the time when I was working on my thesis for graduate school. My thesis involved computer vision and machine learning and the dataset I used for my images was almost 20 Gigabytes — and that’s before I started creating and storing machine learning models which can also be Gigabytes in size!</p><p>By having the sync feature, it meant that all of my training and testing data was available and synced on all of my computers. That way, if I made any changes to the preprocessing pipeline and stored new images in the morning, they would be available for me to use over lunch at work.</p><p>You can also set some documents to be on your personal cloud only — so there is no file downloading required. If you open the file, it will automatically download for you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/1*JTyD_exPMXJDPJCrFpuw2w.png" /><figcaption>Document Syncing via Synology Drive</figcaption></figure><p><strong>Key Takeaway: </strong>Sync all documents across your devices so you’re always up to date. Continuously. For free.</p><h3>Automatic Photo &amp; Video Backup</h3><p><strong>What I Use: </strong><a href="https://www.synology.com/en-us/dsm/feature/photos">Synology Photos</a></p><p><strong>What is Free: </strong><a href="https://github.com/nextcloud/photos/">GitHub — nextcloud/photos</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p_YdEkWaRZqL4DcLoOHDqw.png" /><figcaption>Photo by <a href="https://unsplash.com/@aks_is_1?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Akshay Kumawat</a> on <a href="https://unsplash.com/s/photos/phone-camera?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Ever had the desire to find that photo from that trip from last year to show a friend? Ever searched for it for a couple of minutes only just to realize that it was on your old phone or that you had to delete it to make room for more space on your phone or subscription plan? This used to be my life all day, every day. The moment that Google Photos was no longer free — that’s when I made the switch to doing my own photo backup.</p><p>The Synology Photos service allows me to automatically back up photos from my phone, tablet, and computer without me having to manually click &amp; drag photos. This has also been a lifesaver as I have filmed several long 4K videos on my phone as a “sudo-cameraman” for my friends, which can take up a lot of space and be hard to share around because of their size. In this case, once the video is synced from my phone to my Synology Photos, I simply provide my friends with a link, and they are able to download the video. In addition to that, I have ongoing access to my entire history of photos and videos!</p><p>To prove it, below is a photo from June 2021 of Monty, my girlfriend’s dog who loves to be a puppy burrito. Good boy, Monty.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*xbpO1JORESF-7t6ycNFWFg.png" /><figcaption>Monty: A Good Boy</figcaption></figure><p><strong>Key Takeaway: </strong>Don’t worry about accidentally deleting precious memories. Back them up with your own backup service and always have them available, wherever you are!</p><h3>Bonus: More Ideas for Software That You Can Set Up Yourself</h3><ul><li>Git Server (Like GitHub)</li><li>Virtual Private Network (VPN) (like NordVPN)</li><li>Game Server (I use Linux Game Server Manager [GSM])</li><li>Cloud Compute (Like Google Colaboratory)</li></ul><p>Interested in connecting further? Follow me here on Medium or connect with me on <a href="https://www.linkedin.com/in/taylor-jensen-02999/">LinkedIn</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98c4e30f4630" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why I Built My Own Personal Cloud]]></title>
            <link>https://medium.com/@T_Jen/why-i-built-my-own-personal-cloud-6fb426f61973?source=rss-4d9206d21dd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/6fb426f61973</guid>
            <category><![CDATA[nas]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[Taylor Jensen]]></dc:creator>
            <pubDate>Wed, 07 Sep 2022 12:31:01 GMT</pubDate>
            <atom:updated>2022-09-07T12:31:01.687Z</atom:updated>
            <content:encoded><![CDATA[<p>Why my Network Attached Storage (NAS) device is my cost effective, preferred storage, and main service solution to the big cloud providers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JENE0OxYtaT3O9-Il0cP7A.png" /><figcaption>Photo by <a href="https://unsplash.com/es/@alexcpl?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Alex Cheung</a> on <a href="https://unsplash.com/s/photos/nas?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3>What is Network Attached Storage (NAS)?</h3><p>Network attached storage (NAS) is a high-capacity storage device that connects to your local network and can store various data files. These systems can be built with open-source programs (such as <a href="https://www.truenas.com/">TrueNAS</a>) or with a third-party solution (such as <a href="https://www.synology.com/en-af">Synology</a>). I personally use a Synology DiskStation which works only with a Synology drive bay product, like the one in the headline photo of this article. However, I know several people who have used an old computer or built a custom system with TrueNAS and have a great experience too.</p><p>I am most familiar with <a href="https://www.synology.com/en-af">Synology </a>services and that is what I use personally, so most of my comments will be addressing those features. In addition, almost all of these services can be found in multiple shapes and forms in other NAS solutions, such as “Plugins” for the freely available <a href="https://www.truenas.com/">TrueNAS</a>.</p><h3>Benefits of a Personal NAS System:</h3><h4>1) I Own My Data</h4><blockquote>“Why is Google offering such a feature-rich [photos] product that doesn’t appear to be readily monetizable, outside of the few print photo books the company plans to sell? The simplest answer is that the company wants to keep people within its all-encompassing ecosystem. Today’s tech giants now offer to serve as caretakers to our digital lives across a suite of services in exchange for access to our personal information.”</blockquote><blockquote><a href="https://www.theringer.com/2017/5/25/16043842/google-photos-data-collection-e8578b3256e0">Why Google Is Suddenly Obsessed With Your Photos — The Ringer</a></blockquote><p>The most important benefit to me is that I own my own data. For example, I am able to back up all of my photos from my phone, computers, and tablet. I know where the data is being housed and how it is being used. In the end I get to choose how I want my data stored and I feel like I haven’t given any functionality up in order to achieve that.</p><h4>2) No Subscription Fees</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*aGEyQliMmKWxcbC4" /><figcaption>Photo by <a href="https://unsplash.com/es/@markuswinkler?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Markus Winkler</a> on <a href="https://unsplash.com/s/photos/subscriptions?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Nowadays, almost all of the major technology providers (Google, Apple, Microsoft, etc.) are charging subscriptions for extended access to their products. For example, Google charges $1.99 per month in the United States for 100GB of storage.</p><p>Let’s do some quick math — a quick search on Amazon.com shows that I can get a cheap external 100GB USB plug hard drive for $14.48 USD as of the time this article was written. At $1.99/month, that means it would take just over seven months (7.27, to be exact) to break even on the cost of the hard drive. Seems like simply copying your files over every once and a while to a hard drive is a pretty good deal to me.</p><p>When using an NAS system, you usually have the data replicated for failure protection. You would probably also be buying NAS-Grade hard drives, which cost more but you get increased durability as these drives are specifically designed for continuous use. With these costs and quality products also comes a longer lifespan and increased number of services you can use with an NAS software platform. Of course, if you already have old hard drives or even an old computer, you can potentially even start using those for your own at-home cloud service with TrueNAS.</p><h4>3) Easy to Replicate and Expand Storage</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*qMNyXnwX6AktJBDk" /><figcaption>Photo by <a href="https://unsplash.com/@foxxy2002?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">iyus sugiharto</a> on <a href="https://unsplash.com/s/photos/hard-drives?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>The key acronym here is RAID, which stands for Redundant Array of Independent Disks. A RAID setup means that given two hard drives (or more), data from one is replicated over to another. What does this get us?</p><p>RAID enables us to simply swap one hard disk for another without losing any data. If you have two 10 terabyte hard drives and one suddenly suffers a fatal error and stops working, have no fear! With a RAID set up, your data is still safe and sound in the second hard drive. By simply replacing the drive with a drive of at least 10 terabytes, the NAS system copies the data from the remaining working drive to the new drive. Once the copy is complete, you are back to your original data redundancy.</p><p>For me, this feature was also handy in expanding my drives from 4 terabytes to 12 terabyte drives on my Synology DiskStation. All I had to do is take the drive out, plug a new one in, let the data copy over, and do the same for the remaining drive and I had full local data redundancy again.</p><h4>4) Security Through Multi-Factor Authentication &amp; Encryption</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*liQkHpVPmtYZIyH-" /><figcaption>Photo by <a href="https://unsplash.com/@impelling?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Ed Hardie</a> on <a href="https://unsplash.com/s/photos/mfa?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>With great data comes great security needs. Thankfully, it’s easy to secure data from unwanted access through the use of multi-factor authentication (MFA). By using MFA, I can use an authentication provider, such as <a href="https://www.microsoft.com/en-us/security/mobile-authenticator-app">Microsoft Authenticator</a>, to make sure I have a rotating security key as a secondary login. That way, in the unlikely event that someone was able to get my server address, username, and password, I have a secondary layer of protection.</p><p>In addition, NAS software can allow you to encrypt your data so that in the event someone somehow physically took a hard drive, they would not be able to access or read the data on the drive.</p><p>There are a lot of ways to safeguard your data, and no one way will be 100% foolproof. That’s why it’s important to layer different safeguards together in a sort of “Swiss-cheese” approach. You can easily see through one slice of Swiss cheese because of the holes in it but it’s much harder to see through multiple layers. By combining together multiple services, you greatly reduce the probability of data loss or unwanted access.</p><p>Great, now I’m hungry.</p><h4>5) My Own Remote Computer</h4><p>When I was doing machine and deep learning in the past or even playing some video games, I had to carry a powerful laptop with me, I was chained to my desktop, or I would rent compute on a cloud provider such as Amazon Web Services, Google Collab, etc. Let’s be clear that there are some significant benefits to having your machine learning compute be available in the cloud but when I don’t need 4 graphics cards and 200 gigabytes of RAM for a couple of hours, most of the time my Linux machine has all of the compute that I would need to comfortably code remotely.</p><p>By using a VPN to securely connect to my home network over the internet, I can code and test my models or programs on a lightweight laptop remotely. This is a game changer — now not only do I have the option to bring up large compute and use a cloud service like AWS to host websites and do all of the heavy lifting for me for production, but I can use my local compute environment to quickly develop mid-level complexity projects and proof of concepts. The bonus is I can do this anywhere I get an internet connection.</p><h3>What do I need to make this work?</h3><p>In order to make these solutions work, you will need to provide a computing system for them to operate on. For a solution like TrueNAS, it can be an old computer. For a 3rd party solution like Synology, it is done via the purchase of a Synology DiskStation, which can house multiple hard drives, depending on the size of the unit that you purchase. Then, Synology provides the software, CPU, RAM, and other computing essentials for you. All you need to worry about is the hard drives that you are using.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*WN8U7_4RTa38Uqec" /><figcaption>Photo by <a href="https://unsplash.com/@raflfc?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Rafael Leão</a> on <a href="https://unsplash.com/s/photos/google-photos?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3>Bonus: NAS Software Comparable to the “Big Guys”</h3><p>In addition to all of these benefits, there are many software platforms and plugins to an NAS system that allow me to do things such as:</p><ul><li>Document Syncing Across Devices (Like Microsoft Office File Sync)</li><li>Document Collaboration (Like Google Docs)</li><li>Automatic Photo Backup (Like Google Photos)</li><li>Virtual Private Network (Like NordVPN or Surfshark)</li></ul><p>I’ll make sure to cover how I personally use these in a future post.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6fb426f61973" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Required: An Intuitive Understanding of Your Models]]></title>
            <link>https://medium.com/@T_Jen/required-an-intuitive-understanding-of-your-models-59d3a6f923fa?source=rss-4d9206d21dd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/59d3a6f923fa</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[modeling]]></category>
            <category><![CDATA[explainable-ai]]></category>
            <category><![CDATA[visualization]]></category>
            <dc:creator><![CDATA[Taylor Jensen]]></dc:creator>
            <pubDate>Mon, 05 Sep 2022 14:36:14 GMT</pubDate>
            <atom:updated>2022-09-05T19:34:06.879Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Don’t just go by your metrics. Build a basic and intuitive sense of </em><strong><em>how</em></strong><em> </em><strong><em>and why </em></strong><em>your model is working.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eGHkpxzlnzwfR6yBG1JgWw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@ikukevk?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Kevin Ku</a> on <a href="https://unsplash.com/s/photos/machine-learning?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>In one of my first Deep Learning classes in graduate school, we got to choose our final project. The assignment was to find a deep-learning grade problem and build out a successful model. Although this project was years ago, it also taught me one of the most important lessons in Data Science.</p><h4>The Opportunity: Detecting Hard Hats</h4><p>I found an interesting industrial use case for machine learning by searching through Harvard’s DataVerse. I found a dataset that contains images of people with and without hardhats. It can be found <a href="https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/7CBGOS">here</a>. The data set contains train/test split of about 7,000 images of people with hardhats and without hard hats. The goal was to predict if someone was wearing a hardhat or not in an image, which is extremely important on industrial sites. Thus, this problem was framed as a binary image classification problem.</p><figure><img alt="Image containing construction workers in hardhats." src="https://cdn-images-1.medium.com/max/431/1*4lgGXA4djpA-iWEDgnT6RA.png" /><figcaption>Hard Hat Dataset Sample Image 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*D3fHbmSjk6NHuMDAzuKV2w.png" /><figcaption>Hard Hat Dataset Sample Image 2</figcaption></figure><p><em>Fun fact:</em> <a href="https://doi.org/10.1016/j.amepre.2011.03.007">Research </a>has shown that traumatic brain injuries (TBIs) in the construction industry are of significant concern. In fact, nearly 7,300 TBIs were recorded between 2003 and 2008 in the US!</p><h4>The Model:</h4><p>Since I was considering my model for use at industrial sites and situations where everyone should be wearing a hart hat, I thought I’ll just build a straightforward CNN model that predicts if a “head” class is found in an image. Ideally, if a head is found in the image, then a notification would be sent to the site manager that someone is being unsafe. Pretty straightforward, right?</p><h4>The Results:</h4><p>I was able to train a simple 3-layer CNN with an accuracy of 82%! I was pretty happy with the results until I started to notice an interesting trend when I was picking examples to look at… the accuracy was not what it seemed.</p><p>I started to notice that there seemed to be a trend with the background of these images. If someone did not have a hard hat on in an image, it seemed to be because they were not actually at an industrial site. A hypothesis formed in my head: Would the background in the datasets affect what my CNN learned and predicted?</p><p>When I looked through some of the activation heatmaps, I started to notice something that confirmed my … my CNN model is differentiating images based on the type of background in the image!</p><p>For example, take a look at the images below. The image that is being fed into the neural network contains no hard hats. However, when we look at a sample of what is being activated in the CNN filters, the model is not paying attention the heads, it’s highlighting the whiteboard, the centerpiece of the table, posters on the wall, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/183/1*2JCNa2QQmXiSAJQKFIMCIQ.png" /><figcaption>Original Image Fed to CNN</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*PpLy6HmREvKwRj7Hl2CMbQ.png" /><figcaption>Sample of Layer Activation Heatmaps in CNN</figcaption></figure><p>Of course, this was a setback in the project. How could I use a model that was essentially an industrial environment detector instead of a hard hat detector? There are many ways to solve this particular problem, but to me this is a case of the right tool for the right job. With the environment as confounding data, I had to change up my approach. In the end, I used the Faster-RCNN-Inception-V2 object detector from Google which reduced this effect and provided significantly better (but not perfect) performance across all images (as you can see below).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/312/1*RkG1D1xhcp_PGPEM4aHFEA.png" /><figcaption>Faster-RCNN Detection Example 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/308/1*jdBEIbTjNh29UtXNDQ7fZQ.png" /><figcaption>Faster-RCNN Detection Example 2</figcaption></figure><h4>Summary</h4><p>Even years later, this experience holds value to me in my career. Not only does this provide me with an additional intuition about how CNNs work, but also reminds me to check all aspects of a model before finalizing it.</p><p><em>Don’t just go by your metrics. Build a basic and intuitive sense of </em><strong><em>how and why </em></strong><em>your model is working.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=59d3a6f923fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>