<?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 Kylie Taylor on Medium]]></title>
        <description><![CDATA[Stories by Kylie Taylor on Medium]]></description>
        <link>https://medium.com/@kylie-taylor?source=rss-1519845a933d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*rSD-srKKryYdqli7OmLmdw.png</url>
            <title>Stories by Kylie Taylor on Medium</title>
            <link>https://medium.com/@kylie-taylor?source=rss-1519845a933d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 12:07:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kylie-taylor/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[The Difference Between Probability and Statistics]]></title>
            <link>https://kylie-taylor.medium.com/the-difference-between-probability-and-statistics-dd64ffe73964?source=rss-1519845a933d------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd64ffe73964</guid>
            <category><![CDATA[probability]]></category>
            <category><![CDATA[candy]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[statistical-learning]]></category>
            <dc:creator><![CDATA[Kylie Taylor]]></dc:creator>
            <pubDate>Sat, 07 Jan 2023 17:11:44 GMT</pubDate>
            <atom:updated>2023-02-05T13:32:17.104Z</atom:updated>
            <content:encoded><![CDATA[<p>This morning my brother and I were discussing the distinction between probability and statistics over a bag of gummy bears (which, let’s face it, are a far more enjoyable way to study probability than dice).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3JKLO2VEeSk8C-KzB-XsLg.jpeg" /><figcaption>Photo from the <a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fwww.smithsonianmag.com%2Fhistory%2Fthe-colorful-history-of-haribo-goldbears-the-worlds-first-gummy-bears-180980094%2F&amp;psig=AOvVaw07vL_z2AnE2j_B3Jfi-oAc&amp;ust=1673197361610000&amp;source=images&amp;cd=vfe&amp;ved=0CA8QjRxqFwoTCLizkoX4tfwCFQAAAAAdAAAAABAg">Smithsonian Magazine</a> (2022).</figcaption></figure><p>We each reached into the bag and, in a moment of cosmic coincidence, he pulled out a handful with mostly green bears and a mix of other colors, while I managed to snag one of each color. Naturally, we both exclaimed “What’s the probability of that?!” Of course, the probability of drawing a specific color bear is always 1/5, or 20%, because there are 5 possible colors and each has an equal chance of being drawn. If we assume sampling with replacement, then the probability calculation would be:</p><pre>def calculate_probability_of_handful(my_handful) -&gt; float:<br>    &quot;&quot;&quot;<br>    Calculates the probability of the selecting your handful of gummy bears.<br>    Assumes all gummy bears were selected at the same time and <br>    there is a uniform distribution of colors.<br><br>    Args:<br>      my_handful (list[str]): List of the gummy bears in your handful.<br><br>    Returns:<br>      probability    (float): The percent probability of pulling your handful.<br>    &quot;&quot;&quot;<br>    # there is a 1/5 (or 20%) chance of selecting any color bear<br>    probability = (0.20 ** len(my_handful)) * 100<br><br>    return probability<br><br><br>print(calculate_probability_of_handful(my_handful=[&#39;red&#39;, &#39;orange&#39;, &#39;yellow&#39;, &#39;green&#39;, &#39;clear&#39;]))</pre><h3>So what’s the difference?</h3><p>This is a great example of probability, because we know the distribution of the gummy bears we’re drawing from (a uniform distribution) and want to calculate the likelihood of a specific outcome (getting a certain mix of colors). This is what leads to the clever difference between the concepts of probability and statistics</p><p><strong>Probability: we <em>know</em> the source of our data and want to calculate an <em>outcome.</em></strong></p><p><strong>Statistics: we know an <em>outcome</em> and want to <em>learn</em> the source of our data.</strong></p><p>If we just had a handful of bears and didn’t know anything about their overall distribution, we would need to use statistics to learn about the larger population of gummy bears. We could do this by using a <a href="https://www.coursera.org/articles/statistical-modeling">statistical model</a>, like a linear regression. But here’s the thing: we can never be completely certain of our conclusions, because we’re dealing with random outcomes. That’s why we use the term “statistical estimate” to account for the margin of error inherent in our guesses. Every insight we gain from a statistical model is considered an estimate, because we’re trying to extract information from random events. That’s why we don’t talk about “statistical truths.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*tCTt58j38h37pV1PJETMsg.jpeg" /><figcaption>Cartoon by <a href="https://www.boredpanda.com/author/raf_2">Raf Schoenmaekers</a>, (2019) published on <a href="https://www.boredpanda.com/statistically-insignificant-comics-raf-schoenmaekers/?utm_source=google&amp;utm_medium=organic&amp;utm_campaign=organic">boredpandas.com</a>.</figcaption></figure><p>Let’s branch away from this gummy bear experiment for a moment. In the last paragraph I introduced the concept of <em>learning</em> about an underlying data source. The concept of “learning” in <a href="https://mitsloan.mit.edu/ideas-made-to-matter/machine-learning-explained">machine learning</a> is a cousin to <a href="https://hastie.su.domains/Papers/ESLII.pdf">statistical learning</a>. While statistical learning is concerned with making inferences about a population based on a random sample, machine learning is more focused on making predictions or decisions based on new, unseen data. And if we know both the distribution and the outcome? Well, in that case there’s no need for probability or statistics, because there’s no randomness involved.</p><p>Probability also raises philosophical questions about causality and determinism. <a href="https://plato.stanford.edu/entries/induction-problem/">Some philosophers</a> argue that probability <a href="https://www.sparknotes.com/philosophy/understanding/section6/">undermines the idea of determinism</a>, because it suggests that events can occur randomly and aren’t necessarily the result of previous causes. But that’s a whole other bag of gummy bears.</p><p>It’s clear that candy is a delicious and versatile tool for understanding probability and statistics. And while it’s always fun to speculate about the probability of getting a rainbow of gummy bear colors in a single handful, the real power of probability and statistics lies in their ability to help us learn about and make sense of the world around us. Just remember, when it comes to probability and statistics, it’s important to keep an open mind and a bag of gummy bears handy. You never know when a sugar rush and a sudden epiphany might strike!</p><h3>Happy learning my dear reader!</h3><p>I hope you enjoyed this article. If you did, please show your appreciation by liking it or giving it a few enthusiastic claps (feel free to clap as many times as you’d like, even 100 times!). Your support is much appreciated.</p><h3>Connect with Kylie Taylor</h3><p>Let’s be friends! You can find me on <a href="https://www.linkedin.com/in/kyliewtaylor/">LinkedIn</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd64ffe73964" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 Things You Need to Know About AI Alignment]]></title>
            <link>https://kylie-taylor.medium.com/5-things-you-need-to-know-about-ai-alignment-16e9dfa985cb?source=rss-1519845a933d------2</link>
            <guid isPermaLink="false">https://medium.com/p/16e9dfa985cb</guid>
            <category><![CDATA[ai-governance]]></category>
            <category><![CDATA[ai-alignment-and-safety]]></category>
            <category><![CDATA[human-values]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[superintelligence]]></category>
            <dc:creator><![CDATA[Kylie Taylor]]></dc:creator>
            <pubDate>Sun, 18 Dec 2022 03:23:52 GMT</pubDate>
            <atom:updated>2022-12-18T03:52:55.617Z</atom:updated>
            <content:encoded><![CDATA[<p>One of the most pressing issues in AI research and policy work at the moment, AI alignment is the research into making sure AI systems are working in the best interest of living beings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6btFWmnMGuK1VlsVPU95WA.png" /><figcaption>Craiyon was aligned with my goal of creating an image of “robot observing a Monet painting of a human”.</figcaption></figure><p><strong>AI alignment refers to the challenge of ensuring that artificial intelligence systems behave in ways that are beneficial to living beings and aligned with human values.</strong> Mis-aligned AI induces suffering to humans, animals, or any other living being as a result of actions taken by the system. I personally reside in the camp of “a world with less suffering is a better world” and believe that ethically desinged AI has the potential to help us arrive in such a place.</p><p>That being said, here are five main points that you can read off to your parents when they ask you to define AI alignment (as all parents will certainly do):</p><h3>1) The Alignment Problem</h3><p>The <a href="https://intelligence.org/stanford-talk/">alignment problem</a> refers to the challenge of ensuring that an AI system behaves in ways that are <em>aligned</em> with human values and goals. This is a particularly challenging problem because human values and goals are often complex, implicit, and <a href="https://jme.bmj.com/content/30/4/366">subject to change</a>.</p><h3>2) Corrigibility</h3><p>A corrigible AI is an AI that is willing to accept corrections from humans and update its own goals and values based on this feedback. Corrigibility is seen as an important property for aligned AI, because it allows humans to ensure that the AI remains aligned with their values over time. This sometimes is done using <a href="https://neural-network-verification.com/">formal verification techniques</a> to ensure that the AI is behaving as desired.</p><h3>3) AI Governance</h3><p>AI governance refers to the principles, policies, and practices that guide the development, deployment, and oversight of artificial intelligence systems. It involves a range of stakeholders, including governments, industry, academia, civil society, and international organizations, <a href="https://cset.georgetown.edu/">who work together</a> to ensure that AI is developed and used in ways that are ethical, responsible, and beneficial to society. Governance is critical as societies navigate the adoption of increasingly powerful AI tools into their daily lives.</p><h3>4) Oracles and Genies</h3><p>Oracles and genies are two hypothetical AI scenarios that are used to illustrate some of the potential risks and challenges associated with superintelligent AI. In the oracle scenario, an AI is able to accurately answer any question that is put to it, but it is not capable of taking any actions on its own. In the genie scenario, an AI is able to take any actions that it is asked to take, but it is not able to answer questions accurately. <a href="https://arbital.com/p/task_agi/">Research</a> suggests genie (or task driven) systems are preferred to sovereign systems that might be in the pursuit of its own long term goal.</p><h3>5) Human Value Formation</h3><p>Value alignment refers to the process of ensuring that an AI system’s values and goals are aligned with those of humans. Difficulties arise when defining human values to an AI system and ensuring the values are interpreted correctly by the AI. There are many different approaches to value alignment, with a key concern in succeeding at <a href="https://intelligence.org/files/IE-ME.pdf">indirect normativity</a> (moral obligations to positively influence actions and behaviors of one’s self and others).</p><p>Now! This is the perfect time — with your parents teetering on the edge of their seats — to cement the concepts of AI alignment with some examples:</p><h3>What do mis-aligned AI systems look like?</h3><ol><li>AI-powered autonomous weapons that are capable of making decisions about whether or not to use deadly force. A mis-aligned AI autonomous weapon has the potential of catastrophic harm to all living beings.</li><li>Economic optimization systems that maximize some measure of economic efficiency or profitability. If these systems are not properly aligned with human values, they could potentially prioritize short-term profits over long-term sustainability, or a stable long-term economy.</li><li>Social media algorithms that use AI algorithms to personalize the content that users see. If a system is not properly aligned, it could potentially reinforce biases and stereotypes, or promote misinformation and extremism.</li><li>Autonomous vehicles that might prioritize the safety of its passengers over the safety of pedestrians, or might prioritize the speed of its journey over the safety of other road users.</li><li>Predictive policing systems that are designed to predict where crimes are likely to occur and to allocate resources accordingly. If not properly aligned, the system could potentially reinforce biases and discrimination, or prioritize the interests of certain groups over others.</li></ol><p>Here are links to help answer those detailed follow-up questions your parents keep asking.</p><p>Happy learning my dear reader!</p><p>A paper on the current state of AI alignment research and resources for becoming apart of the community <a href="https://arxiv.org/pdf/2206.02841.pdf">HERE</a>.</p><p><a href="https://www.alignmentforum.org/">The Alignment Forum</a> is one of the most active communities dedicated to AI alignment research and other related topics.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16e9dfa985cb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Create a ML Replica of an Engineer — A Case Study]]></title>
            <link>https://kylie-taylor.medium.com/how-to-create-a-ml-replica-of-an-engineer-a-case-study-301690fa096b?source=rss-1519845a933d------2</link>
            <guid isPermaLink="false">https://medium.com/p/301690fa096b</guid>
            <dc:creator><![CDATA[Kylie Taylor]]></dc:creator>
            <pubDate>Thu, 30 Sep 2021 13:41:12 GMT</pubDate>
            <atom:updated>2021-10-01T03:07:20.739Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Create a ML Replica of an Engineer — A Case Study</h3><p>Complex machines used for manufacturing products are at the core of mechanical and process engineering (shocker!). Often times, these machines are as cryptic and hard to predict as a daily horoscope. In fact, that’s a bit of an unfair statement… horoscopes may be more deterministic. Although, one win these machines have over astrology is loads of data! This study leverages manufacturing data and machine learning to predict when a machine has achieved a desired state — a typical task of engineers. The hope is to demystify a portion of the manufacturing process and make engineering professional’s lives easier. So, lets get those gear turning!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*vgy9Sj8tpWXCjm6J64cAbw.jpeg" /><figcaption>R. Krishnamoorthi, 2019, <a href="https://blog.global.fujitsu.com/fgb/2019-01-15/the-factory-as-a-forge-of-data/">https://blog.global.fujitsu.com/fgb/2019-01-15/the-factory-as-a-forge-of-data/</a></figcaption></figure><h3>Project Definition</h3><p>This project uses machine learning models trained on labelled data to predict times when machines have attained a desired state. Predictions made by the model are used to subset manufacturing data — a time intensive step engineers typical undertake when investigating data.</p><p>Following is the strategy that was implemented for the project: source labelled data from private source, anonymize data, upload to a private Google Drive and Git Repo for consumption into Google Colab. Using Google Colab’s free VMs, reshape and clean up the data sets, perform an EDA, split the data into training and testing sets, conduct any feature engineering, create a function that calculates the desired scoring metrics on the test set, calculate the outcome metrics for the null model, send training data through a pipeline of many classification models, and calculate the scores for each model to identify the model with the best out-of-sample performance.</p><p>The winning machine learning model is determined by the model that simultaneously achieves the highest precision, accuracy, and specificity.</p><p><a href="https://en.wikipedia.org/wiki/Precision_and_recall">Precision</a>, or the positive predictive value, is used as the top scoring metric, because this use case favors being able to predict true positive values, over false negatives. In layman&#39;s terms, its better to predict the process is in the desired state when it really isn’t, than miss instances when the machine is in the desired state.</p><p><a href="https://developers.google.com/machine-learning/crash-course/classification/accuracy">Accuracy</a> is the second most important scoring metrics. Having a high accuracy suggests that our model is proficient at detecting both the desired and non-desired state of the machine — also important!</p><p><a href="https://en.wikipedia.org/wiki/Confusion_matrix">Specificity</a>, the third most important scoring metric, is used to gauge whether the model does a good job at identifying true negatives. Since this use case is biased towards over predicting when the machine is in the desired state, this scoring metric is least important when evaluating model performance.</p><p>The data is sourced from manufacturing machines residing in a undisclosed location and contains the values generated from five sensors attached to a machine (‘A’, ‘B’, ‘C’, ‘D’, and ‘E’ — renamed to anonymize). Each value has an associated timestamp from when it was generated and an indicator if the machine was in the desired state (very originally named ‘label’). Data used for modeling was collected from Jan 6, 2021 to August 15, 2021. Data labelling was performed by industry experts. Data pipelining and annotation is not included as a portion of the project as it contains confidential information.</p><h3>Analysis</h3><p>Initial data screening involved double checking that all data got read in as the correct data type, and screening for any missing data. Since data is generated from sensors attached to manufacturing machines, issues with missing data and entry errors were not present — phew! That being said, data analysis was straight forward: plot histograms of each input variable, check how often the desired state was present in the data set, and run some basic correlation and associations between both input features and the outcome.</p><p>A glance at the five point summary statistics reveal that features A through E all have negative skew coefficients, suggesting that the mean is less than median. This is expected because the data contains timepoints when the machine is not running, in which the features will truncate to a low number close to 0. Additional summary statistics reveal that the machine is in the desired state 58% of the time. This is good because the data does not appear to be biased towards any one state.</p><p>Strong correlations between input features was present, as expected since all inputs are components of the same manufacturing machine and don’t operate in isolation. Interestingly enough, features A and E had noticeable, but not statistically significant, associations to the desired state label. To my demise, these findings are nothing strong enough to publish a paper on…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*eoZ7QGD3rOywBvG_tm3gTw.png" /><figcaption>Heatmap showing the correlations (circles) and associations (squares) between features of the data set, 2021.</figcaption></figure><h3>Methodology</h3><p><em>Train/Test Splits</em></p><p>Train test splits were preformed using a time window since the data is generated from time stamps. We don’t want future values to inform past values generated by the machine — that wouldn’t make sense!</p><pre>train = data[data[&#39;timestamp&#39;] &lt; &#39;2021-06-01T11:03:30.000Z&#39;]</pre><pre>test = data[data[&#39;timestamp&#39;] &gt;= &#39;2021-06-01T11:03:30.000Z&#39;]</pre><pre>x_features = [&#39;A&#39;, &#39;B&#39;, &#39;C&#39;, &#39;D&#39;, &#39;E&#39;, &#39;timestamp&#39;]</pre><pre>y_feature = [&#39;label&#39;]</pre><pre>X_train, X_test = train[x_features], test[x_features]</pre><pre>y_train, y_test = train[y_feature], test[y_feature]</pre><p>Training data consists of all values collected between January 6, 2021 and May 19, 2021. Intuitively, testing data are all values collected <strong>after</strong> May 19, 2021 until August 15, 2021. Why May 19th you ask? Well it just happens to be National Devil’s Food Cake Day. No further explanation is necessary.</p><p><em>Data Preprocessing and Feature Engineering</em></p><p>Did somebody say feature engineer on engineering data to automate the work of an engineer? Say no more!</p><p>Three types of data transformations took place. First the data was transformed using Scikit Learn’s <a href="https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.StandardScaler.html">StandardScaler</a>. Up there with taking the log of data, the standard scaler needs no introduction… This step was performed to make sure all input features are in the same units, none!</p><pre>scaler = StandardScaler()</pre><pre>inputs =[&#39;A&#39;, &#39;B&#39;, &#39;C&#39;, &#39;D&#39;, &#39;E&#39;]</pre><pre>X_train[inputs] = scaler.fit_transform(X_train[inputs])</pre><pre>X_test[inputs] = scaler.transform(X_test[inputs])</pre><p>After standardization, all two way interactions between input features, A through E, were calculated and appended to the existing training and test sets. This was done to ensure that any interactions between inputs will be captured by the various models that the data tries on.</p><pre>poly = PolynomialFeatures(degree=2)</pre><pre>poly_train = poly.fit_transform(X_train)</pre><pre>poly_test = poly.transform(X_test)</pre><p>Finally, the last component of data pre-processing was calculating and appending the first three principal components of input features to the existing training and test sets. This step was done for good measure to make sure and additional variance in the input features is squeezed out of the data.</p><pre>pca = PCA(n_components=3, random_state=8721)</pre><pre>pca_results_train = pca.fit_transform(X_train[inputs].values)</pre><pre>pca_results_test = pca.transform(X_test[inputs].values)</pre><p>Voila! There you have it, the finest data preprocessing the engineering industry has seen.</p><p><em>Model Implementation</em></p><p>Thank the heavens for developers of Scikit Learn, since the magical functions they wrote are what I used to make inference of my data so streamlined! In particular, Scikit Learns’ <a href="https://scikit-learn.org/stable/modules/generated/sklearn.pipeline.Pipeline.html#sklearn.pipeline.Pipeline">Pipeline</a> functionality. Five types of classifiers were trained on the manufacturing data, including: Logistic Regression, K-Nearest Neighbors Classifier, Random Forest Classifier, AdaBoost Classifier, and Gradient Boosting Classifier. Below are the reasons for choosing each type of model:</p><p><a href="https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html?highlight=logistic%20regression#sklearn.linear_model.LogisticRegression">Logistic Regression</a> — this model uses l2 regularization, or ridge regression, to make linear estimates of the desired state. I find it best to start with simple models and add complexity where relevant. That is why a linear logistic regression was the best place to start.</p><p><a href="https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KNeighborsClassifier.html?highlight=k%20classifier#sklearn.neighbors.KNeighborsClassifier">KNN Classifier </a>— this model takes a non-parametric approach to estimating the desired state of the machine. This means the model has no underlying assumptions about the distribution of the features, unlike our linear regression friend above. This model was used to investigate if a non-linear and non-parametric model best suits the data.</p><p><a href="https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html?highlight=random%20forest%20class#sklearn.ensemble.RandomForestClassifier">Random Forest Classifier</a> —these classifiers use decision tree frame works and implements random selection and voting to settle on the best model fit to the data. This often allows random forests to conquer overfitting issues typically associated with decision trees.</p><p><a href="https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.AdaBoostClassifier.html?highlight=ada%20boost#sklearn.ensemble.AdaBoostClassifier">AdaBoost Classifier</a> — short for Adaptive Boosting Classifier, the AdaBoost Classifier is another decision tree based model. Instead, this model uses decision trees with a single split and assign heavier weights to hard to classify instances. Think of a model with the ability to focus!</p><p><a href="https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.GradientBoostingClassifier.html?highlight=gradient#sklearn.ensemble.GradientBoostingClassifier">Gradient Boosting Classifier</a> — under the hood, this model is similar to the Random Forest and AdaBoost Classifiers. Gradient Boosting models defining characteristics are it’s use of a loss function and weak learners.</p><p><em>Model Refinement</em></p><p>Five types of classifiers were used to label if the machine was in the desired state. Different hyperparameters were specified for four out of the five models, resulting in a total of nine models trained on the training data. The Logistic Regression was trained with the max iteration hyperparameters set to 200 and 1000. The KNN Classifier had leaf size (larger the leaf size, the closer the neighbors) hyperparameter settings of 30 and 80. The Random Forest was ran twice with the minimum samples required to split the tree at 2 and another at 10. The AdaBoost Classifier had hyperparameter settings for number of estimators set at 50and 100. Finally, only one Gradient Boosting model was trained using default settings, as this model took the longest to train.</p><h3>Results</h3><p><em>Model Evaluation and Validation</em></p><p>The nine models were evaluated on their ability to out of sample predict if the machine is in the desired state. Three scores were calculated on the predictions on the test set: precision, accuracy, and specificity. Below is a table that reports all three scores for each of the models:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*x_AbFQlcqK4ZJTfkmV057w.png" /></figure><p><em>Justification</em></p><p>All models perform better than the null model (always guessing the machine is in the desired state which has 60% precision and accuracy), something I consider to be the bare minimum of a ML model. The model that took home the gold is the AdaBoost Classifier with 100 estimators! While this model did not achieve the absolute highest precision (a title won by one of the Random Forest Classifiers), it did achieve reasonably high scores in all three scoring criteria. Through inspection of table of scores, it’s evident that certain models are able to achieve higher scores on individual metrics. Examples being the Random Forest classifier with precision over 80% but specificity less than 40%, or the Logistic Regression which owns a specificity close to 99%, but precision less than 73%. This is where it is at the discretion of the Data Scientist and decision maker to choose a model that meets their expectations. In this case, that model is the ADA Boost Classifier with 100 estimators.</p><h3>Conclusion</h3><p><em>Reflection</em></p><p>Immediate thought when asked to reflect on the performance of the classifiers: “Not too bad!” The goal of this project was to investigate if a machine learning model could automate one of the steps engineers take during data investigations. It appears each of the models was able to achieve this goal. That being said, there is absolutely room for improvement in predicting the desired state of a manufacturing machine through data — a perfect segue into my next topic.</p><p><em>Improvement</em></p><p>The reason only nine models were trained was because of lack of access to VM’s. While Google Colab is amazing, the number of models that got train was limited because of time. Moving forward, stronger VM’s will be used to train the models and more time will be allocated to model training — this will likely improve the out of sample precision. Additionally, a deep learning approach using TensorFlow or PyTorch would be an interesting avenue to go down and compare against the ML classifiers used in this study. Lastly, benchmarking again human level performance must be conducted, as it is the key to understanding if this model will improve current workflows or hinder them.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=301690fa096b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3 Surprising Facts About Global Poverty and Life Expectancy]]></title>
            <link>https://kylie-taylor.medium.com/3-surprising-facts-about-global-poverty-and-life-expectancy-39b2799ee058?source=rss-1519845a933d------2</link>
            <guid isPermaLink="false">https://medium.com/p/39b2799ee058</guid>
            <category><![CDATA[gdp-per-capita]]></category>
            <category><![CDATA[government-expenditure]]></category>
            <category><![CDATA[imputation]]></category>
            <category><![CDATA[life-expectancy]]></category>
            <category><![CDATA[poverty]]></category>
            <dc:creator><![CDATA[Kylie Taylor]]></dc:creator>
            <pubDate>Tue, 16 Feb 2021 05:56:15 GMT</pubDate>
            <atom:updated>2021-02-16T22:28:30.028Z</atom:updated>
            <content:encoded><![CDATA[<p>Global income disparities have been a piping hot topic of discussion for… well, nearly as long as incomes have been a thing. This <em>brief</em> analysis takes a data scientist’s perspective on the ever-so-popular dinner party discussion. So, lets d̶i̶v̶e̶ ̶i̶n̶ slowly walk in via the steps!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/0*IHGShKfAHSp2OF0Q.jpg" /><figcaption>Woman with her two children i<em>n the Boragaon area of Guwahati, </em>India. Biju Boro/AFP via Getty Images</figcaption></figure><h3><strong>1. GDP per capita has remained stable for the poorest and richest countries from 2010 to 2015.</strong></h3><p>The twelve poorest countries (in terms of total GDP) have a relatively stable GDP per capita of $938 USD per year. Nearly all these countries are located in Africa, with the exception of Tuvalu, which is located in the middle of the Pacific somewhere between Australia and Hawaii.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_EZRInmc99Yxzb639x6Hpg.png" /><figcaption>Figure 1. GDP per Capita of the 12 poorest countries.</figcaption></figure><p>Alternatively, the twelve richest countries have an average GDP per capita $58,956 USD per year. This is almost 63x the average GDP per capita of the 12 poorest countries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xl1x6WNkRNKAjIux0dq-kQ.png" /><figcaption>Figure 2. GDP per Capita of the 12 richest countries.</figcaption></figure><h3><strong>2. Government expenditure on education has a positive relationship to life expectancy in the poorest countries.</strong></h3><p>Its no surprise that education expenditure would have an influence on the GDP per capita… but life expectancy!?! Yup. Its a fact.</p><p>The correlation between government expenditure on education and life expectancy is <em>significantly</em> larger for the 12 poorest countries than it is for the 12 richest. 69% to be exact.</p><p>This is due to two facts 1) the richest countries already spend much more — 5.6% of their GDP — on education, in comparison to the 3.4% that the poorest countries spend (keep in mind, the 12 richest countries have GDP’s about 1,000 times larger than the 12 poorest countries), and 2) life expectancy is heavily influenced by access to healthcare, and healthcare requires educated workers (such as doctors and nurses)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*XXlMkFT2NMPaCPSAKzarag.png" /><figcaption>Figure 3. Correlations of education expenditure and enrollment on GDP per cap and life expectancy of the 12 poorest countries.</figcaption></figure><p>Additionally, school enrollment and expenditure are negatively correlated to GDP per capita. This is often seen in third world countries, as children typically work to support their families. This means going to school takes away any income they might be earning if they were not in school. Economists calls these “opportunity costs”, you can find more information about this concept <a href="https://www.econlib.org/library/Enc/OpportunityCost.html">here</a>.</p><p>The relationship between government expenditure on education and school enrollment on GDP per capita and life expectancy is much more subtle for the top 12 richest countries. A possible interesting fact to point out is that life expectancy is only 0.5 correlated to GDP per capita. This might suggest that there is more to life expectancy than simply higher incomes and an educated society. Groundbreaking conclusion, I know.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/1*fncpRiUhk_AylC949k25MA.png" /><figcaption>Figure 4. Correlations of education expenditure and enrollment on GDP per cap and life expectancy of the 12 richest countries.</figcaption></figure><h3><strong>3. Global income disparity is as bad as people make it out to be… possibly worse.</strong></h3><p>The following heatmap speaks for itself…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*do5eDmkzILKWWyuaTKGRug.png" /><figcaption>Figure 5. Countries clustered by GDP per capita for years 2010 to 2015.</figcaption></figure><p>To help you digest what this means, most of the world is clustered into a category where the GDP per capita is (substantially) less than $25,000 USD per year.</p><p>The above plot uses the following centroid method to perform hierarchical clustering of GDP per capita for the years 2010 to 2015.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/268/1*ha5lfKGPrzTBNv45aecSkw.png" /><figcaption>Figure 6. Centroid formula.</figcaption></figure><blockquote>“Where c_s and c_t are the centroids of clusters s and t, respectively. When two clusters s and t are combined into a new cluster u, the new centroid is computed over all the original objects in clusters s and t. The distance then becomes the Euclidean distance between the centroid of u and the centroid of a remaining cluster v in the forest. This is sometimes also known as the UPGMC algorithm.”</blockquote><p>Missing values were imputed using a k-nearest-neighbors (KNN) imputer algorithm. The values were filled in with the mean value from 2 nearest neighbors found in the data set.</p><h4>Wrapping it all up</h4><p>There is no denying that there is an unlimited number of factors that influence GDP per capita and life expectancy. While it is easy to be discouraged in the face of so many obstacles, it does not mean that we cannot radically improve global socioeconomic conditions. In fact, solutions may be sitting right in front of us (literally!). Check out how AI can fight poverty <a href="https://borgenproject.org/using-ai-to-fight-poverty/#:~:text=AI%20could%20help%20address%20or,parsing%20satellite%20and%20drone%20imagery.">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39b2799ee058" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>