<?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 Timothy Eakin on Medium]]></title>
        <description><![CDATA[Stories by Timothy Eakin on Medium]]></description>
        <link>https://medium.com/@timothy-eakin?source=rss-88b399b29e48------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*34x2v_B_0zkA_Tv0PGdIWw.jpeg</url>
            <title>Stories by Timothy Eakin on Medium</title>
            <link>https://medium.com/@timothy-eakin?source=rss-88b399b29e48------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 00:17:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@timothy-eakin/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[Unconventional Education: Sometimes the Greatest Lessons Aren’t on the Syllabus.]]></title>
            <link>https://medium.com/analytics-vidhya/unconventional-education-sometimes-the-greatest-lessons-arent-on-the-syllabus-f2735293fe57?source=rss-88b399b29e48------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2735293fe57</guid>
            <category><![CDATA[unconventional]]></category>
            <category><![CDATA[lambda-school]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[leadership-development]]></category>
            <dc:creator><![CDATA[Timothy Eakin]]></dc:creator>
            <pubDate>Wed, 28 Apr 2021 22:51:32 GMT</pubDate>
            <atom:updated>2021-04-30T15:55:12.680Z</atom:updated>
            <content:encoded><![CDATA[<p>So it’s been a year of determination, frustration, victories, struggles, but all the time… learning. I have just finished the Data Science program at Lambda School, on time, amidst a pandemic, and I couldn’t be more proud.</p><p>Through the year we were taught many valuable frameworks and libraries in Python, concepts in Machine Learning, Model Interpretation, Neural Networks, Natural Language Processing, Data Wrangling, Feature Engineering, Data Storytelling, Visualizations, and even learned a good bit about Statistics including Bayesian statistics, T-tests, and A/B testing. Add SQL queries, Containerization, Productization, Cloud Deployment, and some Data Structures and Algorithms for good measure, and I find myself quite knowledgable in the world that is now known to me as “Data Science”.</p><p>As we wrapped up our education, the final section was “Labs”. The time I could put everything I learned to use. The time to build the best thing yet, the biggest project to add to my portfolio as I venture out into the wild world of data in search of my first job at which I would begin my career… or so I thought.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OKhIgwKocgxKKtK-cZ-Ywg.jpeg" /><figcaption>Screenshot of our Trello Board near the end of Lambda Labs</figcaption></figure><h4>What I Thought vs. Reality</h4><p>Going into Labs I knew we would be working on a cross-functional team for multiple weeks to deliver a project, or upgrades to a project, but instead of just 2 weeks to work, we would have 2 months. Little did I know that I would have more technical learning to do within those two months, more side missions to accomplish, more meetings, lectures, group chats… more distractions than ever. It wasn’t time to show what I had learned, but instead to show what I could still learn while also getting the job done.</p><p>I could go through the details about how we created user stories, broke them into engineering tasks, navigated the brown-fields of another teams code base, created FastAPI endpoints, worked within an Agile framework to show our progress and communicate with each other and the project leads, and eventually deployed the final project on AWS which we had never encountered before, but that’s not what I found the most value in learning during this experience.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*fzMOeGomp5vhw4LRZXm-Uw.jpeg" /><figcaption>A snap of a card I completed on our Trello board.</figcaption></figure><h4><strong>The Real Lessons</strong></h4><p>What I learned, for one, is that I will always continue learning. Technical learning in a field like Data Science literally never ends. I also learned that I am a more capable team member and leader than I had been aware. I really felt this from the reactions and responses from my fellow Data Science teammates. I was able to identify who needed support, who needed space to work and trust that they had it under control, and who just needed to know I had their back either way. I was happy to see how well we all did when everyone was positioned to do their best. This is the sort of skill I can’t summarize as a bullet point on my resume, but it should prove invaluable in my future roles in Data Science. Lastly, and one of the most valuable lessons I learned, was that there likely will not be anyone holding my hand through new challenges out there in the field. If they were going to take the time to show me exactly how to do a task, they may as well just do it themselves. This isn’t to say there won’t be challenges I need help to overcome, but just that it is important to be willing to try, to fail, to try another way or two, and reserve the help requests for only when other options have been exhausted or time is running short.</p><h4>My Final Take</h4><p>In Lambda School I learned many valuable skills, techniques, and lessons, but the ones that I found the most valuable, were not in the syllabus, but in the interaction with the other students, the teaching assistants, the section leads. and the instructors. These are the strengths Lambda has over other forms of unconventional educational paths and cannot be taught through a video collection or a website full of documentation alone. I hope I carry them with me throughout my journey as a fully capable but always learning, Data Scientist.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2735293fe57" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/unconventional-education-sometimes-the-greatest-lessons-arent-on-the-syllabus-f2735293fe57">Unconventional Education: Sometimes the Greatest Lessons Aren’t on the Syllabus.</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What makes a good coder into a great data scientist?]]></title>
            <link>https://medium.datadriveninvestor.com/what-makes-a-good-coder-into-a-great-data-scientist-94d43dc4e0aa?source=rss-88b399b29e48------2</link>
            <guid isPermaLink="false">https://medium.com/p/94d43dc4e0aa</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[teamwork]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[communication]]></category>
            <dc:creator><![CDATA[Timothy Eakin]]></dc:creator>
            <pubDate>Mon, 09 Nov 2020 21:21:39 GMT</pubDate>
            <atom:updated>2020-11-11T01:41:14.087Z</atom:updated>
            <content:encoded><![CDATA[<p>An opinion piece of an up and coming Data Scientist. All feedback is welcomed in the comments. Let me know what you think are the best attributes a data scientist can have!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pOKqQz8PgzgU0NI6ex0Tkg.jpeg" /><figcaption>Image created by the author</figcaption></figure><h4>Data Visualization</h4><p>Some people can understand numbers very well, and others do better with clearly worded explanations, but just about everyone can ‘get the picture’ from a good visualization. Bar charts, color-coded maps, and even line graphs have become a staple of explaining data through internet media and televised news. Great example libraries to check out for useful data visualizations would be <a href="https://matplotlib.org/">MatPlotLib</a>, <a href="https://seaborn.pydata.org/">Seaborn</a>, <a href="https://chart-studio.plotly.com/feed/?_ga=2.230398235.667386343.1604877626-797187231.1604877626#/">Plotly</a>, and <a href="https://altair-viz.github.io/">Altair</a>.</p><h4>Data Storytelling</h4><p>Explaining the inner workings of a machine learning model in a way most people can understand is a talent that is beyond priceless. It can be difficult enough to do all the data wrangling, data cleaning, predictive modeling, hyper-parameter tweaking, and data visualizations, but to then have the ability to completely humanize your explanation of all of that for presentation to people who may have no understanding of how these things work, and also the work that it takes to achieve them, are skills that can separate a great data scientist from the pool of people who are good at writing code. The best library to help unlock the mysterious ‘black box’ of machine learning models in a presentable, explainable manner that I have come across is <a href="https://github.com/slundberg/shap">Shapley</a>.</p><h4>Interpersonal Communication</h4><p>In my life since leaving college at the University of Delaware in 1994 to pursue a career as a full-time raver and professional slacker, I have propelled myself into many different social circles and have yet to find one that I wasn’t able to fit in and also embraced. This includes, but is not limited to, clubs, jails, retail work establishments, arts and music festivals, light industrial warehouses, special needs education, food service, forex trading groups, health insurance companies, gaming communities, home improvement roles… My point is, each of these different walks of life has helped me to understand how to communicate with many different types of people in many different ways. I believe that is one skill that sets me apart from the rest of my peers. <br>Now, I don’t suggest anyone take a 20-year break from their education just to gain life experience, but recognizing that you may have to be capable of accepting and communicating with many types of people from varying backgrounds can only help your value as a data scientist.</p><h4>Teamwork Skills</h4><p>Although some companies may only employ a single data scientist. I believe it is more often than not that the opposite is true. From what I have heard and seen in my initial job searches, most companies that have a data scientist want at least 2. Senior and Junior are often titles attached to data science roles. Relying on a single employee to handle all data science tasks would not only be a bad model for sustainability, but it may also put an excessive amount of pressure on a single employee to solve every problem and predict future trends. For these reasons alone it is a good idea to have experience working along with other data scientists. Even for companies that do only have a single role for Data Science, though, you are more than likely going to be working in tandem with a team of front-end and/or backend developers. Learning to work on projects with other humans that may not even speak the same (coding) language with which you are familiar, is essential to aid in overcoming technical issues and solving any number of brand new problems that may arise.</p><h4>A Healthy Appetite for Knowledge</h4><p>Although there are surely more attributes that can help mold a great data scientist out of a good coder, I can’t think of a better skill on which to end. No matter how much I learn in the rest of my journey towards data science as a career, I have little doubt that education will be a constant in this field of work. As new technologies emerge that increase the processing speed of computing, also will new tools that test the limits of those technologies. Natural language processing has grown from simply predicting which word you were trying to spell on your flip phone to actually being able to listen, transcribe, and predict groupings of words input verbally to our devices. That shift has happened in a very short span of time. Neural networks are emerging and the always somehow eerie sounding “AI” is already more of a reality than some people realize. A hunger to stay current with a working knowledge of the best tools at their disposal will surely be a valuable trait to exhibit for an up and coming data scientist.</p><h3>Outro</h3><p>Thank you for the read! Please share your ideas in the comments about what is the most valuable trait you think a data scientist should have. As always all claps are dedicated to the universe for keeping me intrigued. The universe is, after all, comprised of data, just waiting to be observed, described, and appreciated. Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94d43dc4e0aa" width="1" height="1" alt=""><hr><p><a href="https://medium.datadriveninvestor.com/what-makes-a-good-coder-into-a-great-data-scientist-94d43dc4e0aa">What makes a good coder into a great data scientist?</a> was originally published in <a href="https://medium.datadriveninvestor.com/">DataDrivenInvestor</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What makes a good coder into a great data scientist?]]></title>
            <link>https://medium.com/analytics-vidhya/what-makes-a-good-coder-into-a-great-data-scientist-ca9c253f36ad?source=rss-88b399b29e48------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca9c253f36ad</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[teamwork]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[communication]]></category>
            <category><![CDATA[data-visualization-tools]]></category>
            <dc:creator><![CDATA[Timothy Eakin]]></dc:creator>
            <pubDate>Sun, 08 Nov 2020 23:42:45 GMT</pubDate>
            <atom:updated>2020-11-11T12:44:41.484Z</atom:updated>
            <content:encoded><![CDATA[<p>An opinion piece of an up and coming Data Scientist. All feedback is welcomed in the comments. Let me know what you think are the best attributes a data scientist can have!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pOKqQz8PgzgU0NI6ex0Tkg.jpeg" /><figcaption>Image created by the author</figcaption></figure><h4>Data Visualization</h4><p>Some people can understand numbers very well, and others do better with clearly worded explanations, but just about everyone can ‘get the picture’ from a good visualization. Bar charts, color-coded maps, and even line graphs have become a staple of explaining data through internet media and televised news. Great example libraries to check out for useful data visualizations would be <a href="https://matplotlib.org/">MatPlotLib</a>, <a href="https://seaborn.pydata.org/">Seaborn</a>, <a href="https://chart-studio.plotly.com/feed/?_ga=2.230398235.667386343.1604877626-797187231.1604877626#/">Plotly</a>, and <a href="https://altair-viz.github.io/">Altair</a>.</p><h4>Data Storytelling</h4><p>Explaining the inner workings of a machine learning model in a way most people can understand is a talent that is beyond priceless. It can be difficult enough to do all the data wrangling, data cleaning, predictive modeling, hyper-parameter tweaking, and data visualizations, but to then have the ability to completely humanize your explanation of all of that for presentation to people who may have no understanding of how these things work, and also the work that it takes to achieve them, are skills that can separate a great data scientist from the pool of people who are good at writing code. The best library to help unlock the mysterious ‘black box’ of machine learning models in a presentable, explainable manner that I have come across is <a href="https://github.com/slundberg/shap">Shapley</a>.</p><h4>Interpersonal Communication</h4><p>In my life since leaving college at the University of Delaware in 1994 to pursue a career as a full-time raver and professional slacker, I have propelled myself into many different social circles and have yet to find one that I wasn’t able to fit in and also embraced. This includes, but is not limited to, clubs, jails, retail work establishments, arts and music festivals, light industrial warehouses, special needs education, food service, forex trading groups, health insurance companies, gaming communities, home improvement roles… My point is, each of these different walks of life has helped me to understand how to communicate with many different types of people in many different ways. I believe that is one skill that sets me apart from the rest of my peers. <br>Now, I don’t suggest anyone take a 20-year break from their education just to gain life experience, but recognizing that you may have to be capable of accepting and communicating with many types of people from varying backgrounds can only help your value as a data scientist.</p><h4>Teamwork Skills</h4><p>Although some companies may only employ a single data scientist. I believe it is more often than not that the opposite is true. From what I have heard and seen in my initial job searches, most companies that have a data scientist want at least 2. Senior and Junior are often titles attached to data science roles. Relying on a single employee to handle all data science tasks would not only be a bad model for sustainability, but it may also put an excessive amount of pressure on a single employee to solve every problem and predict future trends. For these reasons alone it is a good idea to have experience working along with other data scientists. Even for companies that do only have a single role for Data Science, though, you are more than likely going to be working in tandem with a team of front-end and/or backend developers. Learning to work on projects with other humans that may not even speak the same (coding) language with which you are familiar, is essential to aid in overcoming technical issues and solving any number of brand new problems that may arise.</p><h4>A Healthy Appetite for Knowledge</h4><p>Although there are surely more attributes that can help mold a great data scientist out of a good coder, I can’t think of a better skill on which to end. No matter how much I learn in the rest of my journey towards data science as a career, I have little doubt that education will be a constant in this field of work. As new technologies emerge that increase the processing speed of computing, also will new tools that test the limits of those technologies. Natural language processing has grown from simply predicting which word you were trying to spell on your flip phone to actually being able to listen, transcribe, and predict groupings of words input verbally to our devices. That shift has happened in a very short span of time. Neural networks are emerging and the always somehow eerie sounding “AI” is already more of a reality than some people realize. A hunger to stay current with a working knowledge of the best tools at their disposal will surely be a valuable trait to exhibit for an up and coming data scientist.</p><h3>Outro</h3><p>Thank you for the read! Please share your ideas in the comments about what is the most valuable trait you think a data scientist should have. As always all claps are dedicated to the universe for keeping me intrigued. The universe is, after all, comprised of data, just waiting to be observed, described, and appreciated. Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca9c253f36ad" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/what-makes-a-good-coder-into-a-great-data-scientist-ca9c253f36ad">What makes a good coder into a great data scientist?</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Machine Learning to Predict Dying Stars in our Galaxy… and Beyond!]]></title>
            <link>https://medium.com/analytics-vidhya/pulsar-stars-what-are-they-and-why-should-you-care-8eba0cbcdcf6?source=rss-88b399b29e48------2</link>
            <guid isPermaLink="false">https://medium.com/p/8eba0cbcdcf6</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[xgboost]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[pulsar]]></category>
            <category><![CDATA[astronomy]]></category>
            <dc:creator><![CDATA[Timothy Eakin]]></dc:creator>
            <pubDate>Thu, 27 Aug 2020 05:31:38 GMT</pubDate>
            <atom:updated>2020-12-10T16:09:12.841Z</atom:updated>
            <content:encoded><![CDATA[<h4>In this article, I demonstrate how machine-learning models can be used to correctly classify dying stars or more specifically, Pulsars, as they seem to be the most potentially useful for space exploration.</h4><p>This will be a journey into predicting whether or not observations, made by high powered telescopes on Earth and potentially deep space probes in the future, are pulsars. Before we jump into the machine learning model I have developed to help identify pulsars, let’s talk a bit about what pulsars, or ‘pulsar stars’, actually are since they aren’t pulsating and actually aren’t technically stars (anymore).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7MCzwmt68sxwj7OmbtWcrA.jpeg" /><figcaption>Image via: PITRIS/GETTY IMAGES</figcaption></figure><h3>What are pulsars?</h3><p>Consider, for the sake of explanation, that stars have a life. (no offense to any stars here on Earth) Stars eventually die when they go supernova and collapse into a black hole if they are extremely massive. If they are less massive, between 7 and 25 solar masses (7–25 times the mass of our sun) or maybe a bit larger if they are especially metal-rich, they then become neutron stars, a super-dense mass only around 10 kilometers in radius but so dense that a teaspoon full of their mass would be as heavy as Mt. Everest if placed on Earth. Neutron stars continue to emit radiation from their collapsed core for millions of years until they eventually cool completely and become cold dead remnants of their once brilliant heavenly bodies.</p><p>A smaller subset of these star remnants called neutrons is one called ‘pulsars’ or ‘pulsar stars’. While the term ‘pulsar’ is a combination of the words ‘pulse’ and ‘star’, pulsars aren’t pulsating and are no longer living stars. Their electromagnetic emissions are continuous but beamed from their magnetic poles as seen in the photo above. The magnetic axis is not usually the same as the rotational axis, so they are called pulsars due to how, from any singular perspective, a pulse of radiation is observed each time the beam sweeps through the observer’s point of view. These sweeps are extremely regular in their interval since they occur with each rotation of the pulsar. It should be noted that pulsars can never ‘die’ since they are already actually dead stars, but eventually, over the course of probably more than a million years, their spins will slow and their emissions will cease. At this point, they would only become detectable from the gravity they exert on other celestial bodies or by detection of something called <a href="https://en.wikipedia.org/wiki/Black-body_radiation">black-body radiation</a>.</p><h3>What do earthlings care about pulsars?</h3><h4>People on earth cannot observe most pulsar bodies or even their beams with our limited five senses. They have no effect on us, so you may be wondering: “What does this have to do with me or humankind as a whole?”</h4><p>It takes a good amount of time, money, and effort to discover pulsar candidates and to then correctly identify whether those potential pulsars are true pulsars or not. This has been going on for over half a century and has undoubtedly involved many scientists and lots of funding to accomplish the identification of the over 2,000 known pulsars to date.</p><p>We already have a system of navigating the solar system with a network of radio antennas on Earth called the <a href="https://en.wikipedia.org/wiki/NASA_Deep_Space_Network">Deep Space Network</a>. This does a pretty good job of determining how far a craft has flown and how much further it must go to reach its destination. The only issues with the DSN are the further away from earth a spacecraft gets, the less precise the DSN gets, and it can only determine the distance of the craft from Earth, not its lateral position in space. Using pulsars as a set of lighthouse beacons, a craft could determine exactly where it is positioned in three-dimensional space. This will become more important as more crafts are sent out to explore the outer reaches of our solar system and beyond.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/1*1uFWURi840ATAkmmCFSXiQ.jpeg" /><figcaption>Image via: Multiverse Hub</figcaption></figure><h3>Now for the Data Science!</h3><h4>Those that are here for the witty banter and pictures may feel free to scroll past all this… it’s about to get extremely technical.</h4><p>What you are about to witness, if you stick around, is what’s called “supervised machine learning”. I have all the verified labels, (pulsar or non-pulsar) for each observation in the data set. After splitting the data into train/validate/test sets I then will take away the answers for the validate and test sets and train my model using the answers on a majority of the data (training data), and then use the model to predict the answers for the rest of the data.</p><p><em>The data set used for this project can be found on Kaggle </em><a href="https://www.kaggle.com/pavanraj159/predicting-a-pulsar-star"><em>here</em></a><em> and UCI </em><a href="https://archive.ics.uci.edu/ml/datasets/HTRU2"><em>here</em></a><em>.</em></p><p>Since this data was meticulously collected and documented by astronomers and was remarkably clean and complete, my first task was to split the data into a set used to train each model that I develop, one used to validate each models performance and check the metrics for tuning my hyper-parameters, and finally, a set on which to test my models that the models have never seen.</p><p>I chose to separate 10% of the data into the test set, and of the remaining 90%, 20% of that was used for my validation set. This means the model was trained on 72% of the data available and validated and tested on the remaining 28%.</p><pre># Setting aside a sample of the data for testing.<br># this portion will not be “known” during the model adjustment process.<br> train, test = train_test_split(ps,test_size=0.10, <br>                                stratify=ps[‘target_class’],<br>                                random_state= 17)</pre><pre># Separating the remaining data into training and validation sets.<br>#this allows me to tweak my model to perform at it&#39;s best before testing <br>#it on unknown data. <br>train, val = train_test_split(train,test_size=0.20, <br>                              stratify=train[&#39;target_class&#39;],<br>                               random_state= 17)<br>train.shape,val.shape,test.shape</pre><pre>Out[7]:((12886, 9), (3222, 9), (1790, 9))</pre><p>Next, I do a quick check of the distributions of the target class within my splits. This even distribution is accomplished using the ‘stratify’ argument on the ‘target class’ feature. (In this column pulsars are labeled with 1 and non-pulsars are labeled with 0)</p><pre>train[&#39;target_class&#39;].value_counts(normalize=True),<br>val[&#39;target_class&#39;].value_counts(normalize=True),<br>test[&#39;target_class&#39;].value_counts(normalize=True)</pre><pre>Out[8]:</pre><pre>(0    0.908428<br> 1    0.091572<br> Name: target_class, dtype: float64,<br> 0    0.908442<br> 1    0.091558<br> Name: target_class, dtype: float64,<br> 0    0.90838<br> 1    0.09162<br> Name: target_class, dtype: float64)</pre><h4>Solid</h4><p>If I just built a model that always reported ‘0’ (non-pulsar star) it would be correct about 90.8% of the time (our baseline accuracy). This may prove difficult to improve upon with machine learning, but I enjoy a challenge!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3GcbosksbaAp1tiuFGUigw.jpeg" /><figcaption>Image via: <a href="https://public.nrao.edu/gallery/parts-of-a-pulsar/">NRAO pulsa</a>r</figcaption></figure><p><strong>Now to separate our data into X feature matrices and y target vectors.</strong></p><pre>target = &#39;target_class&#39;<br>features = ps.columns.drop(target)</pre><pre>X_train = train[features]<br>y_train = train[target]<br>X_val = val[features]<br>y_val = val[target]<br>X_test = test[features]<br>y_test = test[target]</pre><h4>On to model production…</h4><p>I won’t post the code for the rest of this as it can get a bit lengthy but feel free to visit my GitHub page where the <a href="https://github.com/DoctorDroid/Build2/blob/master/Bulid%202%20%20Pulsar%20Stars.ipynb">project notebook</a> lives if code examples are your jam.</p><h3>Model The First: Random Forest Regressor</h3><pre>Validation Accuracy for Random Forest Regrssor : 0.8039317754042418</pre><p>This model does not show improvement from the baseline accuracy. It only predicted the correct class 80.4% of the time. While this is about what I expected, and may still seem pretty good for many tasks, simply predicting that none of the observations were pulsars would have given me 90.8% accuracy, so to me, this model is not useful for this use case.</p><h3>Model #2: Logistic Regression</h3><pre>Validation Accuracy for Logistic Regression 0.978895096213532</pre><p>On the first try, with no adjustments from the stock Logistic Regression function in SciKitLearn’s linear_model module, this model does a great job at predicting pulsars given the data. This is great for me because I can use a linear model to determine the coefficients of each feature in the data set with a couple of simple lines of code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jZl1hjxSMLhqWWmtvp0n7Q.png" /><figcaption>Coefficients plot for Linear Regression model</figcaption></figure><h3>Model V3.0: Random Forest Classifier</h3><pre>Validation Accuracy for Random Forest Classifier 0.9798261949099938</pre><p>After multiple iterations, tweaking the hyper-parameters lower and higher, I found the sweet spot of this model&#39;s performance capabilities. <br><br>Now we’re talking! the RFC model was able to get even closer to predicting the proper classification 98% of the time on the validation set. There isn’t much more improvement that can be made, but I still will try for a better accuracy score… for science!</p><h4>Although I’d love to see another season of ‘Lost in Space’, I wouldn’t want to be responsible for the reality-show version’s release.</h4><p>So for my own peace of mind or the sake of proof, let’s take a look at another metric before deciding if this is a useful model.</p><h3>Additional metrics</h3><p><strong>Confusion Matrix of predictions made on the validation set by my random forest classifier model :</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/369/1*l2uCsb8M1O5q1mqss0WvIg.jpeg" /><figcaption>Plot images created by the author</figcaption></figure><p><em>This confusion matrix displays how often my model was correct in its predictions and when it became ‘confused’ by the features and incorrectly labeled the observation.</em></p><p>If I were floating around aimlessly in space after an unforeseen course change from impact or spatial anomaly, I would want my analytics to err more on the side of caution, (classifying ‘maybes’ as ‘not pulsars’) than the opposite. In this hypothetical, my crew does not use the actual pulsars that the machine labeled as non-pulsars and just goes with the observations it reported back as pulsars to reorient and course correct.</p><h3>ROC/AUC Curve</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*Q5aY0bOjsgJfIGEe0osUeg.png" /><figcaption>Plot Images created by author</figcaption></figure><pre>ROC/AUC score =  0.9754350205277573<br>F1 score =  0.8969258589511754<br>Recall score =  0.8406779661016949</pre><p>My RFC model leans more towards false negatives than false positives where errors in classification were made.</p><p>For this reason, I will accept this model as useful.</p><h4>Still, the quest for ‘better’ goes on…</h4><h3>Final round: XGBoost Classifier :</h3><pre>Validation Accuracy using XGBoost 0.9823091247672253</pre><pre>This is a  0.0024829298572315306  improvement on the RFC model.</pre><p>Another improvement in predictive accuracy that could not be achieved with my RFC model. This, again, took fine-tuning of hyper-parameters to achieve.</p><p><strong>Confusion Matrix of predictions made on the validation set by my XGBoost classifier model :</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/369/1*yy-vXYjEcUeDEpFAI2Rspw.jpeg" /><figcaption>Plot Images created by the author</figcaption></figure><h3>Eureka?…</h3><h3>Not so fast. I’ll need to check the other metrics.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*8XEGM0xCMRj_TeCx8Q76kg.jpeg" /><figcaption>Plot Images created by author</figcaption></figure><pre>ROC/AUC score =  0.9828035878698036<br>F1 score =  0.8969258589511754<br>Recall score =  0.8406779661016949</pre><p>Accuracy and ROC/AUC scores have seen some improvements with XGBoost, with no drop in the recall or F1 score.</p><p><em>Warning: Objects in the following image may appear closer than they are.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*fVlC9w2PYjqapzx959LBdA.jpeg" /><figcaption>Image via: <a href="https://phys.org/news/2018-09-neutron-star-jets-theory.html">PHYS.org</a></figcaption></figure><h3>Testing Accuracy:</h3><p>That’s right, I finally get to break out the testing data that my model never got to know about until after all the fun was had in coding, validating, tweaking, validating, tuning, validating… well, you get it.</p><pre>Testing accuracy with Random Forrest Regressor =  0.7627017333383153<br>Testing accuracy with Linear Regression =  0.976536312849162<br>Testing accuracy with Random Forrest Classifier =  0.976536312849162<br>Testing accuracy with XGBoost =  0.9793296089385475</pre><h3>We have a winner: XGBoost!</h3><p>A lot of what goes on within machine learning algorithms are hidden to the user. Thanks to Lundberg and Lee, we data scientists now have an ML library called SHAP to help explain how this digital wizardry takes place. Fun fact: Shapley values were originally developed for game theory and named after <a href="https://en.wikipedia.org/wiki/Lloyd_Shapley">Lloyd Shapley</a> who introduced it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*4iY9SSOWynJx-klyPgoh2g.png" /><figcaption>Image via: SHAP Github. (link in acknowledgments)</figcaption></figure><h3>Model interpretation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/757/1*SLKazh2gz01mbLkghts9Cg.jpeg" /><figcaption>The models feature impacts separated into Class 1-Pulsars &amp; Class 0-Not pulsars</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/994/1*1w5FMS_qwoFWameVCkqA0w.jpeg" /><figcaption>Shapley Force Plot of an observation that is not a pulsar from RFC model</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*BnPVViyQdgC2gg0pa1HK-Q.jpeg" /><figcaption>Shapley Force Plot of an observation that is a pulsar from RFC model</figcaption></figure><p>A couple more plots for those that can’t get enough. Again, all of the code for these plots and others can be found <a href="https://github.com/DoctorDroid/Build2/blob/master/Bulid%202%20%20Pulsar%20Stars.ipynb">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/573/1*UusKpbQBLzmfkw4AtI1yyg.jpeg" /><figcaption>Permutation importance list of all features using <a href="https://eli5.readthedocs.io/en/latest/">eli5</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*PMCMv6tjsvFLJ_thQc1Cpw.png" /><figcaption>Partial dependence plot for the most impactful feature</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*fUo3XpIe8N4ND2U0mayedg.png" /><figcaption>Created by the author using <a href="https://github.com/SauceCat/PDPbox">pdpbox</a></figcaption></figure><h3>Outro :</h3><p>I can imagine that sometime after we get sailing through the cosmos much slower than the speed of light, some other beings from another time, place, or dimension may just hand us a glowing rock that can wisp us away to anywhere at the blink of an eye with little more than a thought… but until that day comes, we have machine learning.</p><p>Thanks for the read! All claps will be dedicated to the universe for keeping me intrigued. Cheers!</p><p>Citations:</p><p>R. J. Lyon, B. W. Stappers, S. Cooper, J. M. Brooke, J. D. Knowles, Fifty Years of Pulsar Candidate Selection: From simple filters to a new principled real-time classification approach, Monthly Notices of the Royal Astronomical Society 459 (1), 1104–1123, DOI: 10.1093/mnras/stw656</p><p>DOI of the data set:</p><p>R. J. Lyon, HTRU2, DOI: 10.6084/m9.figshare.3080389.v1.</p><p>Acknowledgments</p><p>This data was obtained with the support of grant EP/I028099/1 for the University of Manchester Centre for Doctoral Training in Computer Science, from the UK Engineering and Physical Sciences Research Council (EPSRC). The raw observational data was collected by the High Time Resolution Universe Collaboration using the Parkes Observatory, funded by the Commonwealth of Australia and managed by the CSIRO.</p><p>Additional sources:</p><p><a href="https://academic.oup.com/mnras/article/443/2/1651/1058949">[SPINN: a straightforward machine learning solution to the pulsar candidate selection problem]</a></p><p><a href="http://old.inspirehep.net/record/856422/plots?ln=en">[Selection of radio pulsar candidates using artificial neural networks]</a></p><p><a href="https://creativecommons.org/licenses/by/3.0/">[NRAO public image licensing terms]</a></p><p><a href="http://ipta.phys.wvu.edu/files/student-week-2017/IPTA2017_KuoLiu_pulsartiming.pdf">[Introduction to Pulsar, Pulsar Timing, and measuring of Pulse Time-of-Arrivals]</a></p><p><a href="http://papers.nips.cc/paper/7062-a-unified-approach-to-interpreting-model-predictions">[S. Lundberg, S. Lee “A unified approach to interpreting model predictions,” NIPS 2017]</a></p><p><a href="https://github.com/slundberg/shap">[SHAP Github]</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8eba0cbcdcf6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/pulsar-stars-what-are-they-and-why-should-you-care-8eba0cbcdcf6">Using Machine Learning to Predict Dying Stars in our Galaxy… and Beyond!</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How much did the shutdowns in response to the CoViD19 change people’s…]]></title>
            <link>https://timothy-eakin.medium.com/how-much-did-the-shutdowns-in-response-to-the-covid19-change-peoples-a92b16033146?source=rss-88b399b29e48------2</link>
            <guid isPermaLink="false">https://medium.com/p/a92b16033146</guid>
            <category><![CDATA[timothy-eakin]]></category>
            <category><![CDATA[covid19]]></category>
            <category><![CDATA[artist]]></category>
            <category><![CDATA[maryland]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Timothy Eakin]]></dc:creator>
            <pubDate>Thu, 25 Jun 2020 02:31:34 GMT</pubDate>
            <atom:updated>2021-01-03T20:00:44.569Z</atom:updated>
            <content:encoded><![CDATA[<h3>How much did the shutdowns for CoViD19 change people’s activity in Maryland?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*yG9jVxRUhbbuKxwFZu0Alw.jpeg" /><figcaption>Image created by the author.</figcaption></figure><p>We know things have been a bit different over the past couple of months, and we are sure that these times will be remembered by all who were affected directly and indirectly by the novel corona virus now known as CoViD19 (Corona Virus Disease 2019)</p><p>But how much have things ~really~ changed? <strong>Quite a lot.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*65Flzx7fFJA0I3fFqszzSg.png" /><figcaption><em>Image created by the Author. All data sourced from </em><a href="https://www.google.com/covid19/mobility/"><em>Google Mobility Report</em></a><em>s</em></figcaption></figure><h3>Okay, that’s *lots* of dots, I know.</h3><h4>As a Data Scientist, exploratory data analysis is my first step in finding out which data would be important to compare…. hence, all those dots.</h4><p>Each dot represents the percentage of change of the cell-phone toting public(<em>basically everyone</em>)’s movements from the baseline of usual movements in a particular day during the pandemic response in MD. This data represents the mobility stats collected by Google beginning March 5th, 2020, when the first cases of CoViD19 were reported in MD, but before any response was mandated by our local government, until June 23, 2020.</p><p>On March 12th, MD’s Governor Larry Hogan made a dramatic announcement issuing an order banning all large gatherings of people, and activating the National Guard. The same day, all public schools in the state announced a temporary closing for two weeks… which eventually became months and until the end of the 2020 school year. All charts shown in this article represent the data from those early days of the pandemic until the 14th of June, 2020. A good amount of data cleaning had to be carried out to limit the reports to just those dates and also to zero in on Maryland from a global scale.</p><p>I quickly noticed, in the above graph, that the percentage of change from the baseline of Maryland activity was most positively correlated in time spent at pharmacies and grocery stores as compared to time spent in retail and recreational activities. If one was lower, the other was also, and vice versa. On the other hand, The amount of time spent at work was negatively correlated with their amount of time spent at home. Without even having any personal experience you could infer those two things may happen during a time of panic or pandemic. More time at home and less time at places of work, less spending in retail and recreation, and less traveling to pharmacies and grocery stores. (Thanks <a href="https://www.instacart.com/">InstaCart</a>!)</p><h3>In the next graph, I’ll show you just the time spent at work as compared to the time spent at home.</h3><blockquote>(In relation to the (0,0) baseline.)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*H_P6ssyfqCmhyj3bePd12A.png" /><figcaption><em>Image created by the Author. All data sourced from </em><a href="https://www.google.com/covid19/mobility/"><em>Google Mobility Report</em></a><em>s.</em></figcaption></figure><h4>There is a clear negative correlation between time spent at work, and time spent at home as compared to the usual day to day movements.</h4><p>You’ll also notice the majority of the data points are in the zone that represents a positive percentage change in time spent at home (above the baseline 0 value) and a negative percentage change in the time spent at work (left of the baseline 0 value).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*WIGwpLL_gHNBkwfvfEv3dw.png" /><figcaption><em>Image created by the Author. All data sourced from </em><a href="https://www.google.com/covid19/mobility/"><em>Google Mobility Report</em></a><em>s</em></figcaption></figure><h3><strong>The second graph shows the same data, only spread out for visibility.</strong></h3><h4>Above I&#39;ve shown that not only were most of the data points below the baseline for time spent at work but above the baseline for time spent at home. Also, the negative correlation between the two is very apparent as shown by the blue line.</h4><blockquote><strong>(who can argue with the blue line?)</strong></blockquote><h3>Up next… a graph showing time spent at retail stores and recreational venues as compared to each other and their respective changes from the baselines.</h3><blockquote><strong>(which are 0’s if you forgot)</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*BuGX10PlOxSu1l9qzHGtmw.png" /><figcaption><em>Image created by the Author. All data sourced from </em><a href="https://www.google.com/covid19/mobility/"><em>Google Mobility Report</em></a><em>s. </em><strong>Not sure what was happening in those outlier counties starting with W’s but they had more fun than the rest of the state.</strong></figcaption></figure><figure><img alt="A graph showing most points below the baseline. Where pharmacy and grocery visits where low, so were retail and recreational." src="https://cdn-images-1.medium.com/max/735/1*bfAoRy-RcYVLkxvQ4PSwkg.png" /><figcaption><em>Image created by the Author. All data sourced from </em><a href="https://www.google.com/covid19/mobility/"><em>Google Mobility Report</em></a><em>s</em></figcaption></figure><p>This graph shows a strong positive correlation in time at grocery stores and pharmacies compared to the time spent at retail stores and recreational venues. (Have doubts? I refer you again to the blue line.)</p><h3>In conclusion… I found things.</h3><p><strong>Firstly I found that the less time people spent working during this pandemic, the more time they spent at home.</strong></p><p>The most this has taught me is that google location data is quite accurate as I have been witness to these changes first hand. This is a slightly less exciting realization than what else I found.</p><p><strong>I also discovered that the amount of time people have spent traveling to brick and mortar locations to be independent of whether they remained open or not.</strong></p><p>Maryland pharmacies and grocery stores remained open for the most part, but still suffered a decrease in traffic directly correlated to that of retail shops and recreational venues which were all closed.</p><p>Source for data : <a href="https://www.google.com/covid19/mobility/">https://www.google.com/covid19/mobility/</a></p><p>Data Science Artist : Timothy Eakin</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a92b16033146" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>