<?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 Heather McLauren on Medium]]></title>
        <description><![CDATA[Stories by Heather McLauren on Medium]]></description>
        <link>https://medium.com/@heatherrachael9?source=rss-a8567baed952------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*WlgrJHY2RSk9wxHrN5OaKA.jpeg</url>
            <title>Stories by Heather McLauren on Medium</title>
            <link>https://medium.com/@heatherrachael9?source=rss-a8567baed952------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 20:25:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@heatherrachael9/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[Are Bootcamps the New College in 2020?]]></title>
            <link>https://medium.com/@heatherrachael9/are-bootcamps-the-new-college-in-2020-f401ed15a061?source=rss-a8567baed952------2</link>
            <guid isPermaLink="false">https://medium.com/p/f401ed15a061</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[flatiron-school]]></category>
            <category><![CDATA[college]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[bootcamp]]></category>
            <dc:creator><![CDATA[Heather McLauren]]></dc:creator>
            <pubDate>Fri, 18 Sep 2020 14:00:27 GMT</pubDate>
            <atom:updated>2020-09-18T16:50:55.342Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZbyLTqnag0igbM_y" /><figcaption>Photo by <a href="https://unsplash.com/@nesabymakers?utm_source=medium&amp;utm_medium=referral">NESA by Makers</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>How We Got Here</h4><p>The way the world views the education system is starting to change. The baby boomer generation could go to college and get an amazing job, with great benefits and pensions, and retire 40 years later comfortably. Today, the average Millennial will go to college, accumulate 100K+ in student loan debt (I’m at 164k with my MBA) and be lucky if they can clear a 50k a year salary. The Millennial generation is said to be the first generation that will not do better than their parents. They had a hard time (I know because I am a Millennial myself), they have now been hit twice with a recession that has gained them the term “failure to launch”. With the recent events stemmed from the COVID-19 pandemic, Millennial and Generation Z-ers are headed back home, yet again, to live with mom and dad.</p><p>With these generations having a hard time building a sustainable way of life, and having enough income to also save for retirement, we cannot help but wonder what has gone wrong? Speaking to recruiters and managers, a lot of recent college grads are still not educated enough to walk into most jobs in the industries that they majored in. There is a lot of training still needed to get them up to speed and with companies needing candidates able to start on the ground running on day one, that now seems to be like finding a needle in a haystack.</p><p>But what is the issue? It seems like our education system, public and higher education system, has failed us. According to Professor F. H. Buckley who teaches at George Mason University who spoke in the opinion piece in “How American Students Truly Rank in International Testing” in the Observer, “Not long ago, we had a superb public school system, but now we trail most countries. In math, we’re 38th in the world among developed countries in terms of how 15-year-olds perform. And it’s getting worse, not better.” We are not being adequately prepared for college, and how can you excel in college if you enter it lacking the required foundational educational skills. And then, college is not teaching the most current curriculum or the most in demand skills that employers demand.</p><p>So here we are, not educated enough and in debt. This is not just hurting our economy; this is also hurting corporate America. How can they continue to product profits when they are short staffed on experience? The solution seems to be The Bootcamp. Since 2015, Bootcamps have popped up to teach those hard skills that colleges seem to not but able to keep current in their curriculums. They are an intense immersive 12–15-week program geared to prepare students for jobs now. I definitely understand how controversial they are. How can someone learn years’ worth of information in months? As a recent Flatiron School grad in Data Science, I can say, I learned more in my bootcamp, in relation to hard skills than I did in undergrad and grad school.</p><p>The biggest lesson I learned was that traditional college teaches you concepts, and you must discover your own niche and expand on those hard skills yourself outside of college. That is a lesson a lot of students do not understand or understand too late. College is not enough; believe me I know! With everything in life, you must continue to work at it to master what you want to do. I believe my bootcamp experience exposed me to the skills I lacked and filled in the gaps I needed for success professionally.</p><h4>This Seems to Be the Trend</h4><p>And they seem to be working! Over the past few years, I have noticed that major colleges and universities are now offering bootcamps on their campuses and following the same blueprint as the original bootcamps before them. Rice University in Houston, TX, Georgetown University in Washington, DC, University of Richmond in Richmond, VA, Columbia University in NY, and UNC-Chapel Hill in North Carolina just to name a few all have tech bootcamps on their campuses now. So, the conclusion seems to be that this is working. Students are getting hired and employers seem to like the results that they receive from hiring these students. I will warn, not all bootcamps are created equal so choice wisely and do your research.</p><p>Teaching hard skills first seems to be the new philosophy and major tech companies have been jumping in on this new way of teaching as well. With giant tech companies like Google, Apple, IBM, and Amazon all announcing that employees do not need a college education for employment, is a huge sign again that this new education path may be working and it may be more cost and time efficient than the past. With all these changes and transitions still being so new, 5 years or less, only time will tell if this was the best solution to solving our flawed education system.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f401ed15a061" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pandas Profiling is a Life Saver]]></title>
            <link>https://medium.com/@heatherrachael9/pandas-profiling-is-a-life-saver-a3a6ac2960f2?source=rss-a8567baed952------2</link>
            <guid isPermaLink="false">https://medium.com/p/a3a6ac2960f2</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Heather McLauren]]></dc:creator>
            <pubDate>Fri, 18 Sep 2020 01:15:25 GMT</pubDate>
            <atom:updated>2020-09-18T18:27:55.400Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yEp9gHy378eIS2qn" /><figcaption>Photo by <a href="https://unsplash.com/@introspectivedsgn?utm_source=medium&amp;utm_medium=referral">Erik Mclean</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4><strong>What is Pandas Profiling?</strong></h4><p>Have you spent hours, correction, days, working on your EDA and exploring your data? It can be a tedious and time-consuming task that can take longer than your actual modeling. Exploring your data is a particularly important part of the Data Science process because if left undone and not complete, it can cause a lot of issues and inconsistencies in your findings. In the beginning of my Data Science journey, like a lot of other people, trying to explore data before your modeling was a frustrating thing and no matter what you did, you seemed to forget to do something.</p><p>One day, searching Google for the answers as usual, I found something called Pandas Profiling. Pandas Profiling is a library in Jupyter Notebook that you can use as an extension to the Pandas library that will do the majority of your data exploration in one line of code. It returns a beautiful in-depth report on your data that creates heat maps, correlation visuals, individual feature breakdown, NaN values, data types and counts, and a data overview and summary.</p><h4><strong>How To Install and Run</strong></h4><p>To download Pandas Profiling , copy the code below:</p><pre>conda install -c conda-forge pandas-profiling</pre><p>Next, import the library from the code below:</p><pre>from pandas_profiling import ProfileReport</pre><p>Finally you are ready to run your report. Copy the code below:</p><pre>profile = ProfileReport (df, title=&#39;Pandas Profiling Report&#39;, html={&#39;style&#39;:{&#39;full_width&#39;:True}})<br>profile</pre><p>I like to set the report code to ‘profile’ and call it that way. I copy the same code in all of my notebooks and just change up the ‘df’ name to whatever name I made my new dataframe to.</p><p>It takes a little time for the report to generate. Once you see the below 3 messages, that lets you know that your report has be completed and ready for you to review it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*87lAwVceOa3v0cGC88T5wg.png" /></figure><h4><strong>Pandas Profiling Overview and Highlighted Features</strong></h4><p>Now that you have run your report, here is an overview of some of the things included.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hER24w7-kSBMMKthUcE1-w.png" /><figcaption>Overview of your dataset</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8yILPPQf4Af7johf3QdeGQ.png" /><figcaption>Shows correlations between features</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pRz3om0yy0mdkKwIXsIdEw.png" /><figcaption>Analyses features individually</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ne5456QwQIgS1whVisAI-g.png" /><figcaption>Compare and create different feature correlations visually</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*Jq-11lkpIPVPv_6nW0s19Q.png" /><figcaption>Creates a heat map</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VNRlTlR5oZhizV6kp64DBw.png" /><figcaption>Shows the total count of every feature and if there are any NaN values</figcaption></figure><p>Pandas Profiling is an amazing tool that I believe everyone should use. Of course depending on the type of data that you have, you may have to do further analysis, but this definitely is a great foundation for your Data Science projects.</p><p>Please try it out and let me know what you think!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3a6ac2960f2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Is Investing in Robinhood a Great Idea?]]></title>
            <link>https://medium.com/analytics-vidhya/is-investing-in-robinhood-a-great-idea-c466ce69cc95?source=rss-a8567baed952------2</link>
            <guid isPermaLink="false">https://medium.com/p/c466ce69cc95</guid>
            <category><![CDATA[quantitative-analysis]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Heather McLauren]]></dc:creator>
            <pubDate>Wed, 09 Sep 2020 20:39:11 GMT</pubDate>
            <atom:updated>2020-09-11T14:56:50.107Z</atom:updated>
            <content:encoded><![CDATA[<h3>Is Investing on Robinhood a Great Idea?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sbS5wiiro9TD65tA" /><figcaption>Photo by <a href="https://unsplash.com/@jamie452?utm_source=medium&amp;utm_medium=referral">Jamie Street</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>With the rise of Fintech (Financial Technology), I wanted to determine just how well investors were at investing on their own on the Robinhood platform. Are people as financially savvy as they think they are by abandoning the traditional ways of hiring a Wealth Management firm to manage and handle their investments and self-invest instead? I wanted to dive deeper to see if they were. As an ex financial advisor myself, there was always the challenge of my millennial generation wanting to make their own investment choices and not take the advice from the “experts”, so I wanted to see exactly how that has panned out.</p><p>I gathered a data set from Kaggle that had all of Robinhood’s user counts in every asset on their platform, which surprisingly enough, they report on a regular basis and is public information. Once I loaded my data into Jupyter Notebook, cleaned, condensed, and converted it into a datetime data frame, I began my EDA and my findings were really interesting. I originally wanted to look at Robinhood users as a whole from this past year, but when I started my EDA, I discovered a lot of interesting things pre and post COVID 19, so I decided to redirect my focus on that time frame.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nNXYt89WyQP42qcFtWQrLw.png" /><figcaption>Average Daily Closing Prices on the Robinhood Platform</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I0uxa0XHotXQBqImtOFdSg.png" /><figcaption>Average Daily Total Robinhood Users</figcaption></figure><p>The official declaration date for COVID was March 13, 2020 and from that time onward, the total user amount increased by 122.26%. My COVID 19 time frame went from March 13, 2020 until Jul 17, 2020 when my data ended. In my opinion, the cause for this sudden increase in users was due to the fact that more people wanted to invest and take advantage of the stock market decline in March. We were now in quarantine and people who usually were not aware of the stock market now had the time to be curious and jump in.</p><p>Now I wanted to explore the assets that Robinhood users invested in the most so I plotted the top 10 assets by popularity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*Gxqd8WUuZUOf9vZt4nN-ZQ.png" /></figure><p>Next I wanted to The most popular assets among Robinhood users were:</p><pre>     Stock Name       % Change Post COVID     $ Change 03/13 - 07/17<br>1. Aurora Cannabis Inc.     22.00%                $9.24 - $11.88<br>2. Ford                     20.78%                $5.63 - $6.80<br>3. General Electric         -9.80%                $7.84 - $7.07<br>4. Walt Disney              15.70%               $102.52 - $118.65<br>5. GoPro Inc.               82.56%                $2.70 - $4.92</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*thz3cY0p5t9vsdRwi1Y0-Q.png" /><figcaption>Ford Motors Price Changes from 9/23/2020–7/17/2020</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BTEdANUgX6IucJhBcxqnvg.png" /><figcaption>Robinhood User Changes in Ford Motors from 9/23/2020–7/17/2020</figcaption></figure><p>I calculated the percent change from March 13 through July 17 to get my percentages. These percentage changes, besides GE seems to be great looking at it from just a percentage change stand point. But all of the assets, except for Disney has a stock price of under $10 and their returns are very limited from a dollar amount stand point of a capital gain of $1-$2 a share.</p><p>Next I want to look at the most profitable assets post COVID 19 and see how they compare to the popular assets.</p><pre>     Stock Name       % Change Post COVID     $ Change 03/13 - 07/17<br>1. Moderna                   345.00%              $21.30 - $94.85<br>2. DocuSign                  153.86%              $77.37 - $196.41<br>3. Zoom                      129.00%              $107.47 - $246.54<br>4. Amazon                     65.94%             $1785.00 - $2961.97<br>5. Netflix                    46.60%              $336.28 - $492.99</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CElqZlckL2rW2L9YtdrUXQ.png" /><figcaption>DocuSign Price Changes from 9/23/2020–7/17/2020</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7YEVb40jrlGS08rGm6kSWQ.png" /><figcaption>Robinhood User Changes in DocuSign from 9/23/2020–7/17/2020</figcaption></figure><p>What I see here is that Robinhood users did not choose the most profitable assets. The percent changes blow the popular assets out of the water and their average capital gain per share is over $300.</p><p>After my analysis, I believe that the Robinhood users did not invest in the most profitable assets. The assets that were the most popular were assets that would have be profitable pre COVID 19. Because of the current circumstances, our ‘new normal’ may become a permanent reality and investment strategies must shift. Industries like the car, agriculture, home appliances, and entertainment may all never be what they once were. When investing, you must look at the bigger picture.</p><p>With companies now having to shift their business to an almost 100% digital platform, companies like FAANG are on the rise more than ever. FAANG stands for Facebook, Amazon, Apple, Netflix, and Alphabet(Google). Looking into technology companies seems to be the better investment move going forward. Thinking about how our world will forever change because of COVID 19 has to be in the forefront when making business and investment decisions. This is a concept that a lot of people, if not exposed to it, will not think about on their own. As you can see from my findings, self-managed investments without some form of in-depth knowledge about finance and economics will prohibit maximum profits. Just understanding the buy low, sell high method will give your ROI a boost. Smart investing is a proactive process and not a reactive process. If you react to the market, you will always be behind it. Working with a professional or at least someone who understands these concepts will ensure you are maximizing your portfolio growth potential.</p><p>I also created an Advanced Auto ARIMA model to predict Amazon prices. Since this post was more about my EDA, I will not go into too much depth about it but I want to share what I built. Please check out my <a href="https://github.com/mclaurenhr/Robinhood-Users">github</a> for the full project and an explanation of my model.</p><pre>plt.figure(figsize=(8,5))<br>plt.plot(df.Close, label = &#39;Training&#39;)<br>plt.plot(df_test.Close, label = &#39;Testing&#39;)<br>plt.plot(prediction2, label = &#39;Prediction&#39;)<br>plt.legend(loc = &#39;Left corner&#39;)<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*vu5-daI1pXygJ7HcavxNKw.png" /></figure><pre>prediction2.plot(figsize = (20,5), color = &#39;red&#39;)<br>df_test.Close.plot(color = &#39;blue&#39;)<br>plt.title(&#39;Predicted Amazon Stock Prices vs. Test Data&#39;, size = 24)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Um-NffNcd648ZA1MjfTLzQ.png" /></figure><pre>from sklearn.metrics import r2_score<br>df_test[&#39;predicted_stock_price&#39;] = prediction2<br>r2_score(df_test.Close, df_test.predicted_stock_price)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*K_v_J_z3IbhApX0EALvzHw.png" /></figure><p>I built multiple models and played around with different parameters. I started with an r2 score of -0.15836897303755193 and went to a 0.7006142667306581. Or a -0.16 to a 0.70. My model went from not accurate at all to being substantially accurate. Overall, I’m pretty happy about the outcome of my model. I want to definitely continue to tweak the parameters to try to enhance it to be able predict volatility as well. I also think that having the market crash in March in my data also contributed to some inaccuracy.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c466ce69cc95" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/is-investing-in-robinhood-a-great-idea-c466ce69cc95">Is Investing in Robinhood a Great Idea?</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[ML Times Series Modeling]]></title>
            <link>https://medium.com/analytics-vidhya/ml-times-series-modeling-2f39f914adc8?source=rss-a8567baed952------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f39f914adc8</guid>
            <category><![CDATA[forecasting-models]]></category>
            <category><![CDATA[data-scientist]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[time-series-analysis]]></category>
            <dc:creator><![CDATA[Heather McLauren]]></dc:creator>
            <pubDate>Fri, 21 Aug 2020 13:36:56 GMT</pubDate>
            <atom:updated>2020-08-28T14:05:19.009Z</atom:updated>
            <content:encoded><![CDATA[<h3>Deep Learning Times Series Modeling</h3><h4>The Importance of Creating a Model with Stationary Data</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sy6wvapqndDmuG4M" /><figcaption>Photo by <a href="https://unsplash.com/@kmuza?utm_source=medium&amp;utm_medium=referral">Carlos Muza</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Through out my data science journey I have learned so many different modeling techniques, but I just had not found my niche yet, and I had been patiently waiting for the right machine learning model to come along and sweep me off my feet. I had been working in the business, finance, and fintech space for the past few years and my love for business forecasting and predictions to help maximize shareholder’s wealth had to stay center staged.</p><p>Then one day, I discovered the machine learning Time Series Model! I was hooked on day one. The fact that I can create a model to test/train on past performances to help forecast the future is very interesting to me. How one can incorporate ML, Deep Learning, Neural Networks, and Auto Regression modeling to solve business problems is absolutely genius!</p><p>So the biggest question is, Exactly what is Time Series Modeling? In simple terms, it is the use of a model to predict future values based on previously observed values. You can use Time Series in the following industries:</p><p>1. Retail Industry</p><p>2. Energy Industry</p><p>3. Government</p><p>4. Financial Organization</p><p>5. Agriculture</p><h3>The Time Series Model ARIMA</h3><p>One of the most popular models to implement is the ARIMA model, which stands for Autoregressive Integrated Moving Average. ARIMA models aim to describe the autocorrelations in the data and incorporates the following concepts:</p><p>AR = Autoregression</p><p>I = Integration</p><p>MA = Moving Average</p><h3><strong>Stationarity</strong></h3><p>Before you can conduct any type of Time Series modeling, you have to ensure that your data has stationarity. Which means your data does not have trend or seasonality. Your data is considered stationary if it’s statistical properties such as mean, variance, and covariance remain constant over time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*as1hBzv-bCxqJAVOBo0iEQ.png" /></figure><p>If you do not know if your data is stationary, you can conduct the two following tests:</p><ol><li>Rolling statistics — Plot the moving average or moving variance and see if it varies with time.</li><li>The Dickey-Fuller Test — Is a statistical test for testing stationarity.</li></ol><p>Below I built a function to create both the rolling mean and the Dickey-Fuller test at the same time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F3j0FWhWpUxVl38xUZbIzA.png" /><figcaption>Original Time Series Plot</figcaption></figure><pre>from statsmodels.tsa.stattools import adfuller<br></pre><pre>def stationarity_testing(timeseries):<br>        <br>        movingAverage = timeseries.rolling(window=12, center=False).mean()<br>        movingSTD = timeseries.rolling(window=12, center=False).std()<br>        <br>        fig = plt.figure(figsize=(12,7))<br>        plt.plot(timeseries, color=&#39;blue&#39;, label=&#39;Original&#39;)<br>        plt.plot(movingAverage, color=&#39;red&#39;, label=&#39;Rolling Mean&#39;)<br>        plt.plot(movingSTD, color=&#39;black&#39;, label = &#39;Rolling Std&#39;)<br>        plt.legend(loc=&#39;best&#39;)<br>        plt.title(&#39;Rolling Mean &amp; Standard Deviation&#39;)<br>        plt.show(block=False)<br>        <br>        <br>        print (&#39;Results of Dickey-Fuller Test: \n&#39;)<br>        dftest = adfuller(timeseries[&#39;value&#39;], autolag=&#39;AIC&#39;)</pre><pre>dfoutput = pd.Series(dftest[0:4], index=[&#39;Test Statistic&#39;, &#39;p-value&#39;, &#39;#Lags Used&#39;, &#39;Number of Observations Used&#39;])<br>        for key,value in dftest[4].items():<br>            dfoutput[&#39;Critical Value (%s)&#39;%key] = value<br>        print(dfoutput)<br></pre><pre>stationarity_testing(h_mean)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*y28H_dwlrrUibyRfyIk8sg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*NXRy5WYL6pGtGkQB_91bHA.png" /></figure><p>There are two ways to determine if your data is stationary. If your “Test Statistic” is less than your “Critical Values” or your p-value is greater than 0.05, that is a clear indicator that your data is not stationary. As you can see from the above test, this data has a lot of stationary and we are going to need to remove it before we start our forecast model.</p><h3><strong>How to Remove Stationarity</strong></h3><p>A way to get rid of trend is to conduct the following processes:</p><ol><li>Taking the log transformation</li></ol><p>2. Differencing(Simple Moving Average and Exponential Moving Average)</p><p>3. Subtracting the previous value with .shift()</p><p>After I conduct each test, I will rerun through the rolling means and Dickey-Fuller test function to see if it performs better. I will pick the one that preforms the best and use it in my final ARIMA model.</p><h4><strong>Log</strong></h4><p>Using a log transformation makes the time series more uniform over time. You can tell that the log transformation test looks a lot better from our original test, but the Dickey-Fuller test shows a lot of stationary still.</p><pre>h_mean_logScale = np.log(h_mean)</pre><pre>stationarity_testing(h_mean_logScale)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*KRa_sMr2SHu-tQtF_n-w3g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*qBGfeo_VWNhjP-bi67eivQ.png" /></figure><h4><strong>Differencing (Simple Moving Average)</strong></h4><p>With the simple moving average, or also called the rolling mean, you can visually check to see if the mean changes over time. The ‘Test Statistic’ results are now lower than the ‘Critical Values’ but the p-value is still a little high. I want to run a few more tests to see if I can lower the p-value a little more.</p><pre>movingAverage = h_mean_logScale.rolling(window=12).mean()<br>datasetLogScale_movingaverage = h_mean_logScale - movingAverage<br>datasetLogScale_movingaverage.head(12)</pre><pre>datasetLogScale_movingaverage.dropna(inplace=True)<br>datasetLogScale_movingaverage.head(12)<br></pre><pre>stationarity_testing(datasetLogScale_movingaverage)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*q6pajCSXgFW6N0df9LUY5w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*3DxdAEKuxnBUOs2yuB-D8w.png" /></figure><h4>Differencing Exponential Moving Average</h4><p>The Differencing Exponential Moving Average, which is also called a weighted rolling mean, assigns weights to all the previous values with an exponential decay factor. The p-value came down a lot more this time with this test. I am going to run one more test and then decide from all of my results.</p><pre>exponentialmovingaverage = h_mean_logScale.ewm(halflife=12, min_periods=0, adjust=True).mean()<br>plt.plot(h_mean_logScale)<br>plt.plot(exponentialmovingaverage, color=&#39;red&#39;)<br>plt.show()<br></pre><pre>datasetLogScale_ex_movingaverage = h_mean_logScale - exponentialmovingaverage<br>stationarity_testing(datasetLogScale_ex_movingaverage)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*TB5X4WQsXypYpTklrnJGdA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*JkQ0tSFVeGMU6r780UYswg.png" /></figure><h3>Subtracting Previous Value with .Shift()</h3><p>When you use the .shift() method, you shift the nominal values of the process from one level to another level. A few values periodically tend to be shifted away from the process mean, resulting in outlier values. This is the most popular stationarity method used when conducing ARIMA Time Series modeling. My results turned out pretty good with this one. The p-value is not 0.05 but it’s the closest to it at 0.156593. The ‘Test Statistic’ is below the critical values as well which is an indicator that my data is now stationary.</p><pre>datasetLogDiffShifting = h_mean_logScale - h_mean_logScale.shift()<br>plt.plot(datasetLogDiffShifting)<br>plt.show()<br></pre><pre>datasetLogDiffShifting.dropna(inplace=True)<br>stationarity_testing(datasetLogDiffShifting)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*X4uPBlCbMS4Wm_ZQFlX1aA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*0irXQtx1Ta6YmXMGXNzPQQ.png" /></figure><h4><strong>ARIMA Results</strong></h4><p>I decided to use the last stationarity method above using .shift(). Once I applied my data to the ARIMA model, I got very accurate results. My original values are almost directly on top of my forecasted values. RSS stands for the Residual Sum of Squares. It measures the discrepancy between the data and the prediction model, in which my model had an RSS score of 0.0001.</p><ul><li>I wanted to dedicate this blog to explaining stationarity but there were some other preliminary models that need to be conduced before you start your ARIMA model such as:</li></ul><ol><li>Auto Correlation Modeling</li><li>Partial Auto Correlation Modeling</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/379/1*3sWXOBkN6py0szEt8I9GKA.png" /></figure><p>I also wanted to show my prediction home values verse the original home values to illustrate just how accurate your forecast modeling can be.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/332/1*XkwJwZOGTVCa9qVEYX_Y1g.png" /><figcaption>Original Values</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/436/1*UMbWRzlMK37GbNQ83OHcVA.png" /><figcaption>Forecasted Values</figcaption></figure><p>Thank you so much for reading my blog! Please go to my <a href="https://github.com/mclaurenhr/Module4_Times_Series">github</a> to check out my entire project.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f39f914adc8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/ml-times-series-modeling-2f39f914adc8">ML Times Series Modeling</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[Confusion in the Confusion Matrix]]></title>
            <link>https://medium.com/@heatherrachael9/confusion-in-the-confusion-matrix-cf7d87494b30?source=rss-a8567baed952------2</link>
            <guid isPermaLink="false">https://medium.com/p/cf7d87494b30</guid>
            <dc:creator><![CDATA[Heather McLauren]]></dc:creator>
            <pubDate>Thu, 23 Jul 2020 18:34:54 GMT</pubDate>
            <atom:updated>2020-07-25T16:26:05.819Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZdiD0lz7_ESXzdTFkdXDpw.jpeg" /></figure><p>As I started working on my Unsupervised ML model using Logistic Regression, I never really understood just how important the Confusion Matrix was and how to determine what is more important, True Positives, True Negatives, False Positives, and False Negatives. And then from there, what appropriate score between precision, recall, F1-Score, and accuracy to weight over the others. Determining how you want to guide your model depends on what type of business decision problem you are trying to solve.</p><p>So what exactly is a Confusion Matrix? The Confusion Matrix was first introduced by Ron Kohavi and Foster Provost in 1998 to help them explain how Machine Learning works. Now their concept is taught at every technology institution all over the world and is widely used in Data Science today.</p><p>A confusion matrix is a table that is used to describe the performance of a classification model on a set of test data. This model then allocates every true/false value of its classifier into its respective category of TP, TN, FP, FN. A Confusion Matrix looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/351/1*kFtZW1Mxf9jiV52hBe4gWQ.png" /></figure><p>The normal allocation would be to have most of your values in the TP and TN categories because that is usually an indicator that your model has a high prediction rate on all of the individual data samples.</p><p>· True Positives (TP): The number of observations where the model predicted churn (1), and they actually did (1).</p><p>· True Negatives (TN): The number of observations where the model predicted no churn (0), and they actually did not (0).</p><p>· False Positives (FP): The number of observations where the model predicted churn (1), but they actually did not (0).</p><p>· False Negatives (FN): The number of observations where the model predicted no churn (0), but actually did (1).</p><p>Now, what does all of this mean once you create your Confusion Matrix? This will help you evaluate your metrics in four different scoring categories that you now have to take into consideration next. These scoring categories are accuracy, recall, precision, and the F-1 score.</p><ul><li>Precision measures how precise your predictions are.</li></ul><p>Precision = True Positives / (True Positives + False Positives)</p><ul><li>Recall<em> </em>indicates what percentage of the classes you are interested in were actually captured by the model.</li></ul><p>Recall = True Positives / (True Positives + False Negatives)</p><ul><li>Accuracy measures the total number of predictions a model gets right.</li></ul><p>Accuracy= True Positives + True Negatives/ Total Observations</p><ul><li>F1 score represents the Harmonic Mean of Precision and Recall.</li></ul><p>F-Measure = (2 * Precision * Recall) / (Precision + Recall)</p><p>Like I said before, depending on what your business problem is will determine what metric is most important. If you have a balanced matrix, accuracy will probably be the best score to measure by but if your confusion matrix is imbalanced, meaning your total true/false value counts are not close to each other, a different score would be more appropriate. For example, a balanced matrix would mean you have a sample size of True: 50 and False: 50 and an imbalanced matrix would have a sample size of True:25 and False: 75. If your matrix is imbalanced, recall or precision would be a better fit to measure your model by. Precision is appropriate when minimizing false positives is the focus and recall is appropriate when minimizing false negatives is the focus.</p><p>Below is an example of my Confusion Matrix I constructed with my model. When you looked at my Confusion Matrix, I did not have a straight forward model. I think at this point we can all agree that straight forward anything in Data Science does not exist! I had to evaluate which matrix and scores worked better and determine which one was more important over the other.</p><p>My model was imbalanced so I had to adjust for that. I decided that Recall was the most appropriate scoring measurement to use because I was predicting customer churn rates. Recall is called the better safe than sorry metric. I would rather say someone churned when they didn’t and be over precautious verse say they did not churn when they did and miss out on being able to intervene and follow up with customers before they cancelled their account.</p><ul><li>Side note: Churn means a customer has ended their relationship/account with a company for X reason.</li></ul><p>My first Confusion Matrix:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*pyYcIt4mJ3ORtEFuX7hbMA.png" /></figure><pre>print(&#39;Training Precision: &#39;, precision_score(y_test, y_test_preds_again))<br>print(&#39;Testing Precision: &#39;, precision_score(y_test, y_test_preds_again))<br>print(&#39;\n\n&#39;)</pre><pre>print(&#39;Training Recall: &#39;, recall_score(y_test, y_test_preds_again))<br>print(&#39;Testing Recall: &#39;, recall_score(y_test, y_test_preds_again))<br>print(&#39;\n\n&#39;)</pre><pre>print(&#39;Training Accuracy: &#39;, accuracy_score(y_test, y_test_preds_again))<br>print(&#39;Testing Accuracy: &#39;, accuracy_score(y_test, y_test_preds_again))<br>print(&#39;\n\n&#39;)</pre><pre>print(&#39;Training F1-Score: &#39;, f1_score(y_test, y_test_preds_again))<br>print(&#39;Testing F1-Score: &#39;, f1_score(y_test, y_test_preds_again))</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*xodRE2esrniZO6wxr8RO0Q.png" /></figure><p>My second Confusion Matrix:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*Pu65X18kNbB5b7-YwfoWeg.png" /></figure><pre>print(&#39;Training Precision: &#39;, precision_score(y_test, y_test_preds_again_again))<br>print(&#39;Testing Precision: &#39;, precision_score(y_test, y_test_preds_again_again))<br>print(&#39;\n\n&#39;)</pre><pre>print(&#39;Training Recall: &#39;, recall_score(y_test, y_test_preds_again_again))<br>print(&#39;Testing Recall: &#39;, recall_score(y_test, y_test_preds_again_again))<br>print(&#39;\n\n&#39;)</pre><pre>print(&#39;Training Accuracy: &#39;, accuracy_score(y_test, y_test_preds_again_again))<br>print(&#39;Testing Accuracy: &#39;, accuracy_score(y_test, y_test_preds_again_again))<br>print(&#39;\n\n&#39;)</pre><pre>print(&#39;Training F1-Score: &#39;, f1_score(y_test, y_test_preds_again_again))<br>print(&#39;Testing F1-Score: &#39;, f1_score(y_test, y_test_preds_again_again))</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J6d0qt85bH5lp6KdNMV2Aw.png" /></figure><p>The process on how I wanted to approach my project was that I knew my original model was imbalanced and my results were over-fitted. I had 2850 false values and 483 true values. That being said, I did not have enough true values to train/test on so I decided to try two different re-balancing methods, a basic re-balancing technique using parameters and SMOTE, and see which one scored the best. After re-balancing, my first confusion matrix now had 2280 false values and 386 true values, which was still very imbalanced so I want to see how the SMOTE method would turn out. SMOTE gives you a 50/50 value count and helps normalize your model, so after conducting SMOTE on my data, I now had 2280 False and 2280 True value counts to train/test on.</p><p>I decided to pick the second matrix model because it had a higher recall score. Both models were not that great. A model having a system with high precision but low recall returns very few results, but most of its predicted labels are correct when compared to the training labels. Verse, a system with high recall but low precision which returns many results, but most of its predicted labels are incorrect when compared to the training labels. I’m looking at the lesser evil between the two. Ultimately you want a system with high precision and high recall which return many results, with all results labeled correctly.</p><p>I had to think about what the most important score was to help solve my problem and the better safe than sorry method made the most sense here, which would be measured by recall. This was a tricky problem to solve because both confusion matrix’s and evaluation scoring were not the best. Learning how to weight the good verses bad and determining what the best model is to help solve your business problem is key. I definitely would love some feed back if you have a different opinion.</p><p>Thanks for reading and check out my <a href="https://github.com/mclaurenhr/Module_3_Supervised_ML_Classification">github</a> to see the full project as well!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf7d87494b30" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a Predictive Model for Home Prices that Anyone Can Use]]></title>
            <link>https://medium.com/analytics-vidhya/creating-a-predictive-model-for-home-prices-that-anyone-can-use-73749d6b1e40?source=rss-a8567baed952------2</link>
            <guid isPermaLink="false">https://medium.com/p/73749d6b1e40</guid>
            <category><![CDATA[linear-regression]]></category>
            <category><![CDATA[predictive-analytics]]></category>
            <category><![CDATA[data-scientist]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[business-analysis]]></category>
            <dc:creator><![CDATA[Heather McLauren]]></dc:creator>
            <pubDate>Wed, 24 Jun 2020 00:29:01 GMT</pubDate>
            <atom:updated>2020-08-28T14:05:27.970Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5A7ezCTE5LI8_sNs" /><figcaption>Photo by <a href="https://unsplash.com/@webaliser?utm_source=medium&amp;utm_medium=referral">Ярослав Алексеенко</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>My team and I was given the task to create a predictive model for the sales prices of homes in the Seattle, Washington area, more specifically, King County. I personally wanted to take a deeper dive and conduct an analysis on how home condition, the year the home was built, and zip code affected home prices. I conducted a multiple linear regression model and created a predictive model of home prices specifically geared around those three features. I know there are so many ways you can construct a predictive model, some more complexed and complicated than others, but I found this method to be pretty simple and it also gives you the ability to create a user friendly interface that anyone can use simply by plugging in different feature values.</p><p>Let us first talk about exactly what Linear Regression is. Linear Regression is the modeling technique used to estimate the strength and direction of the relationship between two (or more) variables. You will use a dependent variable, also called the target variable, and independent variables, which are also called features or predictors. Linear Regression uses only one independent and one dependent variable to determine the correlation between the two and Multiple Linear Regression uses multiple independent variables and one dependent variable. Regression is a parametric technique, which means that it uses parameters learned from data and it is also considered the beginning concept of machine learning. Some assumptions that must be made when conducting a linear regression model is that the data must possess:</p><ol><li>Linearity</li><li>Multicollinearity</li><li>Normality</li><li>Homoscedasticity</li></ol><p>Once all the assumptions are made and satisfied, then you can move on to your predictive modeling.</p><p>I wanted to give you a short intro to linear regression before we moved on to the actual modeling. Next I wanted to also briefly show you some visualizations created around this data set as well.</p><p>After I have cleaned my data set and now ready for analysis, I created a few visuals to see how condition, the year the home was built, and zip code affected home price before I moved on to my regression modeling.</p><p>I created a really cool geomap of the Seattle, Washington area comparing price and their home condition rating using Plotly and Mapbox! I was very excited about it and it is a little tricky the first time you create one due to its learning curve of creating and importing a mapbox token but after you’ve made one, it’s actually pretty easy. I am going to make another post on exactly how to make this geomap because I could not find a clear step by step anywhere and it seriously took me almost a week to figure it out!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*r22y830dm7Xxx3_AJc1_8g.png" /></figure><p>Next I created a scatter plot to see how year built, condition, and price correlates with each other. This visual shows us that homes between 1900 and 1980 have the highest condition ratings and they are also holding their values very well. I wanted to know why so I did a little outside research on Seattle home prices and there is a shortage of homes in King County. The homeowners are keeping their properties up due to the fact that the county is growing at such a rapid rate. Seattle is the 5th most expensive city to live in the United States and with a home shortage of 1 home to 1060 people, the home prices are surging.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/1*KVUljTk6ueqRR8C6w1HqvQ.png" /><figcaption>The price range index conversion is $200k-$1 million</figcaption></figure><p>I also wanted to know if there was a specific zip code that had the highest rated condition homes compared to price. The two zip codes with the most 5 rated condition homes was in 98125 and 98101. These areas are located in downtown Seattle in waterfront properties but more specifically, Pikes Place Market.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/426/1*safNjC4rYJFuQNbF7bzdKw.png" /><figcaption>The price range index conversion is $200k-$1 million</figcaption></figure><p>After I completed my visualizations, I also conducted some modeling of my data. I wanted to make this post about the predictive model specifically but again if you are interesting in that process, please check my full notebook out on my <a href="https://github.com/mclaurenhr/Mod02-Linear-Regression/tree/master">github</a>.</p><p>Once my modeling was completed, I then started creating my predictive model for home prices. My first step was to solve for the linear regression model and use reg.fit to train my model. The traditional equation for the linear regression model is:</p><p>𝑦̂ =𝛽̂ 0+𝛽̂ 1𝑥1+𝛽̂ 2𝑥2+…+𝛽̂ 𝑛𝑥𝑛</p><p>But I decided to write the equation a little more simplistic to use for my model by using the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*twFpRETWhnFNZHefe9NBCA.png" /></figure><p>I next plugged in the variables for my model’s specific equation for home prices and the features condition, year built, and zip code written as:</p><p>price= m1 * condition + m2 * zipcode + m3 * yr_built + b</p><p>This will be the blueprint for my model and now it’s time to add this into python.</p><pre>import numpy as np<br>import pandas as pd<br>from sklearn import linear_model</pre><pre>reg=linear_model.LinearRegression()<br>reg.fit(housing_df_out[[&#39;condition&#39;, &#39;zipcode&#39;, &#39;yr_built&#39;]],housing_df_out.price)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lO63JqIHAIoyaMLcZjG4qQ.png" /></figure><p>Once we solve for our Linear Regression line, we next find the coefficients for the m1, m2, m3 values.</p><pre>reg.coef_</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1RoR5jPddQBy_kRAcGZZdQ.png" /></figure><p>This next step will solve for the intercept value that we can plug in for b.</p><pre>reg.intercept_</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7ZK4336XcyK3R_3Op8cdTw.png" /></figure><p>Once you solve for all variables in the equation, you can then plug in values for condition, zip code, and year built to get a predicted home price. You now have the freedom to switch out features from your data set as you please and you can use whatever values you would like to solve for your predictive price. Remember, whatever order you added your features into your reg.fit model is how you need to order your values for them as well. So, for my model, I listed my features in the order of [‘condition’, ‘zipcode’, ‘yr_built’]. That means I also have to plug in my values in the same order for the model to work correctly. I have two examples below:</p><p>This predictor solved for a home price of $436,008 with a 3 rated condition, 98003 zip code, and built in 1995.</p><pre>reg.predict([[3,98003,1995]])</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7i2kUgRbcLnhcqoNKxbmEw.png" /></figure><p>This predictor solved for a home price of $498,653 with a 5 rated condition, 98101 zip code, and built in 1986.</p><pre>reg.predict([[5,98101,1986]])</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VgkSAyU6i5V2zUYYse3l0g.png" /></figure><p>I think this is very cool and once setup correctly, you can plug in different values to solve for your predictor. This is so user friendly as well for non-technical users. At this point. they are plugging in numbers and getting an outcome. No need for complicated code for it to work.</p><p>I had a lot of fun creating this predictive model! I love to create things as simple and efficient as possible and this definitely was right up my alley. Try this out and let me know if it worked for you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73749d6b1e40" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/creating-a-predictive-model-for-home-prices-that-anyone-can-use-73749d6b1e40">Creating a Predictive Model for Home Prices that Anyone Can Use</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[The Makings of a Data Scientist: Movie Industry Analysis]]></title>
            <link>https://medium.com/@heatherrachael9/the-makings-of-a-data-scientist-movie-industry-analysis-a62f077d4072?source=rss-a8567baed952------2</link>
            <guid isPermaLink="false">https://medium.com/p/a62f077d4072</guid>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[flatiron-school]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[movies]]></category>
            <dc:creator><![CDATA[Heather McLauren]]></dc:creator>
            <pubDate>Fri, 08 May 2020 16:45:11 GMT</pubDate>
            <atom:updated>2020-05-08T16:45:11.980Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h4TLlisFk7XvtREAsS7C7Q.jpeg" /></figure><p><strong>Let me reintroduce myself.</strong></p><p>My name is Heather McLauren and I am a Data Science student at The Flatiron School living in Houston, TX. This journey to this spot in my life right now has been a world wind but I have definitely enjoyed the ride. In the last three years of my life I have accomplished a lot, like moving half-way across the country, to completing my MBA just a few months ago. Now I am ready to embrace this new challenge of mastering Data Science. My experience at Flatiron School so far has been nothing but amazing! I’ve definitely had to push myself mentally and intellectually, and I have been reacquainted with the word dedication. I have taken the full immersive approach and now I know what the saying ‘Eat, Sleep, Code, Repeat’ means.</p><p><strong>The Scientist and the Data</strong></p><p>I have just completed my first data science project and it was an awesome experience. Having the opportunity to combine all the different concepts, programs, and processes that I learned to create meaningful and impactful analysis of raw data is exciting. You can tell a story through numbers and use a completely new language to do it! For my project, I was given the task of helping Microsoft, but only hypothetically, for now!</p><p>With so many different companies now crossing their business capabilities over into the world of creating and producing original films like Netflix, Amazon, and Apple, Microsoft now wants to get in on the action of starting a movie studio and they need some analysis conducted to determine what the best business strategy is for them to start this venture. They want more insight about the film industry and what types of movies are the most profitable. <strong>I</strong> decided to do an in-depth analysis on the sales trends of the movie industry and came up with three subcategories to explore in more detail. I wanted to talk about one of those categories which is the correlation of movie genres vs. sales trends of the movie industry to help shed more light into Microsoft’s potential horizontal expansion project. Please check out my <a href="https://github.com/mclaurenhr/Module-1-Final-Project">github</a> for the full project.</p><p>I first wanted to determine exactly what was the best movie genre and what was the best way to come up with that data. I used some raw data files from IMDB that was collected from thousands of previously released movies and concatenated a few of those files to create a dataframe using Python, Pandas, and Jupyter Notebooks. I then sorted that table from highest to lowest in domestic gross profit to generate a list of the top 100 best selling movies of all time, and from that data I was able to determine what the most frequent movie genre was. I generated a visualization in matplotlib and Seaborn to get a better look at the data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vE45E15sp3WBQUdveNHm2A.png" /></figure><p>From my findings, and not to my surprise, the most produced genre was ‘Action, Adventure and Sci-Fi’ with 25 movies made out of the top 100.</p><p>The next question I wanted to determine was if there was any correlation between the success of a particular genre being released at a specific time of the year. I took the same top 100 list of movies and compared their release months and genre to see if there were any relationships. I decided to work with a smaller sampling size of 20 to get a better understanding of exactly how profitable the top movies of all time were. Did certain movies perform better being released in certain months? A visualization was again needed to see this correlation and a table preview listed as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wIobsDAsCtEes739lG415w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ihi-tq2WZk_zOYcUTjiElA.png" /></figure><p>I plotted the findings in a regression plot this time and this visual gave me a lot of interesting information. The majority of the ‘Action, Adventure, Sci-Fi’ movies were released in late Spring, Early to mid-summer and the other popular seasons were Spring break and the holidays. But there was one other finding that was interesting as well. One outlier ‘Action, Adventure, Sci-Fi’ movie which was the second highest grossing movie of all time and the most profitable movie of all time was released in February. That movie was ‘Black Panther’. It was released during Black History Month because it was a cultural Marvel movie. This data shows that if you want to create an ‘Action, Adventure, Sci-Fi’ cultural movie, it will have better success being released during that culture’s heritage month.</p><p>The last question that I wanted to answer about genre was how costly is the overall opportunity cost of the most successful genre to produce, and if the profits are worth it. This time I took the top 100 movies list and sorted them by return on investment first and then grouped by all of the ‘Action, Adventure, Sci-Fi’ genre to isolate all of the most profitable movies in that genre. Next, I generated a sorted table of just the positive domestic grossing movies in this category and created a graph to visually display my findings to see the correlation of production budget vs. domestic net gross in the ‘Action, Adventure, Sci-Fi’ genre. I used a hexbin marginal plot to show that correlation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yALkS_qPzpFkvMn8oHBJCg.png" /></figure><p>This shows that the most successful ‘Action, Adventure, Sci-Fi’ movies had a production budget of around $200 million dollars and a domestic net gross between $200-$500 million dollars.</p><p>With my analysis about genre now complete, I can recommend that the best genre for Microsoft to look more into as a successful business strategy would be ‘Action, Adventure, Sci-Fi’, having a production budget of around $200 million dollars, and releasing their film during the Spring or Summer. This will help ensure that they generate a domestic net profit between $200-$500 million dollars. There were more questions that were answered to help determine my full analysis and recommendation so again, please check out my github at the link in the beginning of the blog if you are interested.</p><p>Thank you for reading my first Medium post and following along with me in completing my first data science project. This is such a fun outlet to be creative and showcase what I know. I have always been such a creative person, and this satisfies my need to make something meaningful. My journey into Data Science has giving me the perfect harmony of thinking outside of the box and being analytical all at the same time. I know they sound like complete opposites but I’m a little quirky like that! There definitely will be more posts to come and I intent on using this ‘Medium’ to express my newfound love for Data Science and to continue to share my work. So, until next time, ‘Eat, Sleep, Code, Repeat’.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a62f077d4072" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>