<?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 Yinmi Alas on Medium]]></title>
        <description><![CDATA[Stories by Yinmi Alas on Medium]]></description>
        <link>https://medium.com/@javialas?source=rss-71b1b916d92a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*3Z32LSazFvSMk9nxPGYwPw.jpeg</url>
            <title>Stories by Yinmi Alas on Medium</title>
            <link>https://medium.com/@javialas?source=rss-71b1b916d92a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 00:10:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@javialas/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[Early Stage Diabetes Risk Prediction]]></title>
            <link>https://blog.devgenius.io/early-stage-diabetes-risk-prediction-bd42f113a20b?source=rss-71b1b916d92a------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd42f113a20b</guid>
            <dc:creator><![CDATA[Yinmi Alas]]></dc:creator>
            <pubDate>Thu, 27 Aug 2020 02:36:22 GMT</pubDate>
            <atom:updated>2020-08-28T08:25:01.038Z</atom:updated>
            <content:encoded><![CDATA[<p>Using Machine Learning</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/991/1*6IGSwumHkaNA2fZ0OIV4wA.png" /></figure><p>In this post we will predict and perform evaluation Metrics of the Early Stage Diabetes Risk Prediction dataset. The dataset can be found on <a href="https://archive.ics.uci.edu/ml/datasets/Early+stage+diabetes+risk+prediction+dataset.#">UCI Machine learning repository</a>. Diabetes is a chronic, metabolic disease characterized by elevated levels of blood glucose (or blood sugar), which leads over time to serious damage to the heart, blood vessels, eyes, kidneys and nerves.</p><p>About 422 million people worldwide have diabetes, the majority living in low-and middle-income countries, and 1.6 million deaths are directly attributed to diabetes each year. Both the number of cases and the prevalence of diabetes have been steadily increasing over the past few decades.</p><p>The dataset has 17 columns and 520 rows we will use the following classification models with their metrics score:</p><ul><li>Logistic Regression</li><li>Decision Tree</li><li>Random Forest Classifier</li><li>XGBoost Classifier</li></ul><p>Let&#39;s get started!!!</p><h3>Processing the data</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OL4kOKLIBQE6m7wCowjWpA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0QFhPA76JhvkDuS0D6j3bw.png" /></figure><p>I need to split the data twice easy way to get Train/Validate/Test random split</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i4ANUOu-YUpGA2A3auiOYg.png" /></figure><h3>Begin with baselines</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tKS7Vz7DBw-m2P06l9YphA.png" /></figure><p>“Class” is the feature we are going to predict, its has Positive and Negative values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cVRjlsV-K63cW8R3xF0kXg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zVUpW4KovzNNc-bzUlR35A.png" /></figure><p>This is Baseline Accuracy score lets improve the score with a Classification Model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*Arqc3abJeq6XpPwfptHYUQ.png" /></figure><h3>Logistic Regression Model</h3><p>Logistic Regression is one of the most common classification algorithms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QTvZzIB-GBQtKNKT-gc9qA.png" /></figure><p>lets keep trying improving the score with more models</p><p>Validation Accuracy : 0.91%</p><p>Test ROC AUC : 0.98%</p><h3>Confusion Matrix Plot with Logistic Regression Model</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*JOfkcrsT9CVcQd05zR_InQ.png" /></figure><p>This is what a confusion matrix looks like</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/412/1*_V-d4Wmewju2p2WYwwu7Jg.png" /></figure><p>Now, let us understand what TP, TN, FP, FN denote in this matrix:</p><ul><li><strong>True Positives (TP):</strong> These are cases in which we predicted yes (they have the disease), and they do have the disease.</li><li><strong>True Negatives (TN):</strong> We predicted no, and they don’t have the disease.</li><li><strong>False Positives (FP):</strong> We predicted yes, but they don’t actually have the disease. (Also known as a “Type I error.”)</li><li><strong>False Negatives (FN):</strong> We predicted no, but they actually do have the disease. (Also known as a “Type II error.”)</li></ul><h3>Classification Report with Logistic Regression Model</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/1*YXzSF1VDSrZp-8LvU5Pn9Q.png" /></figure><p>Lets see how a Classification Report Works</p><p><strong>Precision:</strong> is defined as the number of true positives (TP) over the number of true positives plus the number of false positives (FP).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*N2MTt0DFxLoHG69X3JlVgg.png" /></figure><p><strong>Recall:</strong> is defined as the number of true positives (TP) over the number of true positives plus the number of false negatives (FN).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/1*yjLTSv_PyaVwYibf4E2_OA.png" /></figure><p><strong>F1-score:</strong> is the harmonic mean of precision and recall.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/282/1*FB7wE4kmoOu6vYBFaZRf4w.png" /></figure><h3>Permutation importances</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*V8qwex4J-1GxhPg2sbqBCA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/299/1*2iwQrsDshwH5O9UphLsKNw.png" /></figure><p><strong>The</strong> <strong>permutation</strong> <strong>feature</strong> <strong>importance:</strong> is defined to be the decrease in a model score when a single feature value is randomly shuffled 1. This procedure breaks the relationship between the feature and the target, thus the drop in the model score is indicative of how much the model depends on the feature.</p><h3>Decision Tree Model</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*efZUWOOKPDh-PObQcdSxSg.png" /></figure><p><strong>Classification</strong> <strong>Accuracy</strong> <strong>Score: </strong>is our starting point. It is the number of correct predictions made divided by the total number of predictions made, multiplied by 100 to turn it into a percentage.</p><p>In this model the Validation Accuracy Score increase: 0.06%</p><p>But Test ROC AUC Score decrease : 0.012</p><h3>Confusion Matrix Plot with Decision Tree Model</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/1*N_eyzDMjUSX3vrbX1XDIHA.png" /></figure><h3>Classification report with Decision Tree Model</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*2KZ9-X66kXvQG8TyyFY0EA.png" /></figure><h3>Visualizing the Desicion Tree Model</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*bceHuhVbz_EVpNoqm0O6mA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I3LahPfsDw2ngQsbW0ds0g.png" /></figure><h3>Visualizing The Feature Importances with Decision Tree Model</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*RI7WV31csKwUD2mfGUC_0w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*MQjZx8t4jJH1sZN_2yTRTQ.png" /></figure><h3>Random Forest Model</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*vdz0Nvl9bmGJRoY0w_s-gA.png" /></figure><p>The <strong>AUC</strong> is the area under the <strong>ROC curve</strong>. This <strong>score</strong> gives us a good idea of how well the model performances.</p><p>AUC ROC is one of the most important evaluation metrics for any classification model’s performance.</p><p>In this case the Accuracy score drop : 0.0087%</p><p>But the ROC AUC score is higher : 0.027%</p><h3>Confusion Matrix Plot with Random Forest Classifier</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*IknSXKzIugtI638vKAUJYg.png" /></figure><h3>Classification report with Random Forest Classifier</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*HRRmr3a0uELagqMQdZPomw.png" /></figure><h3>Partial Dependence Plot, 1 feature isolation Using Random Forest Classifier</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*7lh_GR1F3Qmev1s3aZGs6Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*1EvXcI08Z36jBHfihkcozw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*MDhjf_s_c02bvtg5ggUGCg.png" /></figure><p><strong>The partial dependence plot:</strong> (short <strong>PDP</strong> <strong>plot</strong>) shows the marginal effect one or two features have on the predicted outcome of a machine learning model . A partial dependence <strong>plot</strong> can show whether the relationship between the target and a feature is linear, monotonic or more complex.</p><h3>Partial Dependence Plot, 2 features interaction Using Random Forest Classifier</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*JtKx4bYQXAIV18YVB76z9g.png" /></figure><p>It would look like one gender has a much higher chance of diabetes than the other</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*2AxZtY0OlCacQqVYIHO4pw.png" /></figure><h3>XGBoost Classifier Model</h3><h3>Shapley plot explaning multiples prediction using their index number or the row number using XgBoost</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/1*7osgTKa0bfL8nOXcG3RWjw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ex0Bbi0RiTFbY-pVo4D3wQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*aoqgf5cOYXzy_FVspVIiJw.png" /></figure><p>The records for this plot are 103 patients and it looks like the prediction is negative with 0.43% and the probability to have diabetes is 0.57% .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*il0zCw4swEKyIO10iZSOWw.png" /></figure><p>There is much more to analyze but I will stop here. The code of this post will be available on <a href="https://github.com/YinmiAlas/early-stage-diabetes-prediction">Github</a>. Thank you for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd42f113a20b" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/early-stage-diabetes-risk-prediction-bd42f113a20b">Early Stage Diabetes Risk Prediction</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Analyzing FIFA 19 Dataset]]></title>
            <link>https://blog.devgenius.io/analyzing-fifa-19-dataset-b546a6759e59?source=rss-71b1b916d92a------2</link>
            <guid isPermaLink="false">https://medium.com/p/b546a6759e59</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[plotly]]></category>
            <category><![CDATA[fifa]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Yinmi Alas]]></dc:creator>
            <pubDate>Tue, 23 Jun 2020 02:43:44 GMT</pubDate>
            <atom:updated>2020-06-26T08:06:13.057Z</atom:updated>
            <content:encoded><![CDATA[<p>The Best 10 Players of FIFA 19</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HKzRMldFE3qiHTxgEc-TqA.jpeg" /><figcaption><a href="https://www.easports.com/fifa/ultimate-team/news/2017/fut-online-match-modes">Source</a></figcaption></figure><p>In this post we will perform a data analysis of the FIFA 19 data set. The data set can be found on <a href="https://www.kaggle.com/karangadiya/fifa19">Kaggle</a>. FIFA( Fédération Internationale de Football Association) and FIFA 19 is part of the FIFA series of association football video games is the one of the most popular game in the world, EA said that lifetime sales of the soccer franchise <a href="https://venturebeat.com/2018/09/05/ea-sports-fifa-franchise-surpasses-260-million-copies-sold/">has passed 260 million copies since its first launch in 1993</a>.</p><p>We will analyze FIFA 19 players. The dataset has 89 columns but we will use around 25 columns grabbing the most important ones of the dataset. Using the following topics:</p><ul><li>The Best 10 Players with their abilities.</li><li>The Best 10 Players Value against Release Clause.</li><li>Analyze Avarage Age of the first 100 Players.</li><li>Analyze the Preferred Foot and Weak Foot of the first 100 players.</li><li>Analyze Which Country has the most players in FIFA19.</li><li>Which features of the first 100 players are highly correlated.</li><li>The best 10 players Potential against Wage</li></ul><p>Let’s get started!!</p><h3><strong>The Best 10 Players with their abilities.</strong></h3><p>Each corner of the polygon is one of the players attributes. The further away from the center, the higher the attribute. <strong>The shape is convex</strong>. Convex means that the player is generally balanced over all the attributes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jELAup7HfNcpQpAVJ8g3qQ.jpeg" /></figure><p>A well rounded player like Messi will show a high percentage of the polygon shaded in while a weak player will show little shaded area near the middle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4Lxel3TApVQlFzQoGAcCLQ.jpeg" /></figure><p>This graphs visually shows us how strong a player is across all his player attributes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fc8EgBqWD0XaXiDZPdgFQA.jpeg" /></figure><h3><strong>The Best 10 Players Value against Release Clause.</strong></h3><p>What does paying a release clause mean?</p><p>A manager can sign a player by paying his release clause, which will be higher than the market value of the player, without having to depend on the owner of the player.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7EYinmiAlas%2F3.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7EYinmiAlas%2F3%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/299eed13154295ae8924710b8e24550c/href">https://medium.com/media/299eed13154295ae8924710b8e24550c/href</a></iframe><h4>How are release clauses set?</h4><p>Initially, a player’s release clause is established automatically according to the following rules:</p><ul><li>Players with a Market Value &lt; 1M will have a release clause of 1M</li><li>Players with a Market Value &gt; 1M will have a release clause of 166% of their market value.</li></ul><p>The release clause can never be less than the market value. As such, it will be updated in keeping with the market value. Any user who wants to protect their players can raise the release clause by paying from their budget to a ratio of 1:2. For example, if you want to raise the release clause by 2M, you will have to pay 1M from your budget.</p><h3>Average Age of the first 100 Players.</h3><p>According to the data set of the first 100 FIFA players the average age is 27</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7EYinmiAlas%2F6.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7EYinmiAlas%2F6%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/8c49b8fe3075208defc3048c510a8054/href">https://medium.com/media/8c49b8fe3075208defc3048c510a8054/href</a></iframe><h3>The Preferred Foot and Weak Foot of the first 100 players.</h3><p>we can clearly see that the majority of the players in the game are gifted for their profession, as well as the famous echoes and the best in their environment</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7EYinmiAlas%2F8.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7EYinmiAlas%2F8%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/08d8bd816c5141d666b84a9a8afd304e/href">https://medium.com/media/08d8bd816c5141d666b84a9a8afd304e/href</a></iframe><p>Mean while down here we have the weak foot of the first 100 players who are rated from 1 to 5, each one has their own level of support with respect to their preferred foot, some players their weak foot does not help them at all and others their weak foot is handled perfectly.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7EYinmiAlas%2F10.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7EYinmiAlas%2F10%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/ded0d38e39cc2fc5936bdbaf21c326a8/href">https://medium.com/media/ded0d38e39cc2fc5936bdbaf21c326a8/href</a></iframe><h3>Which Country has the most players in FIFA 19</h3><p>From the entire dataset we get the 5 most common nationalities in FIFA 19. As you can see England is the most frequent nationality with 1,662 records, followed by Germany with 1,198 and Spain with 1,072.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7EYinmiAlas%2F12.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7EYinmiAlas%2F12%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/c681839cfdfd72a918290c72fe07a96a/href">https://medium.com/media/c681839cfdfd72a918290c72fe07a96a/href</a></iframe><h3>Which features of the first 100 players are highly correlated.</h3><p>We will generate a heat map from the numerical columns which will show us how strongly correlated each variable is with the other. We filtered the dataframe so that it only includes numerical values and generate a heat map from the resulting dataframe:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7EYinmiAlas%2F14.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7EYinmiAlas%2F14%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/9efadd425c4b2f7c31790ebcc38631d7/href">https://medium.com/media/9efadd425c4b2f7c31790ebcc38631d7/href</a></iframe><h3>The best 10 players Potential against Wage</h3><p>You can clearly see how some players have less potential than others and earn more and others that their potential is almost at their maximum and earn what they deserve. I made this graph to see if the players earn what they deserve for their high potential.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7EYinmiAlas%2F16.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7EYinmiAlas%2F16%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/5e1eca581d4bb466de7ad8c881d5bbe0/href">https://medium.com/media/5e1eca581d4bb466de7ad8c881d5bbe0/href</a></iframe><p>There is much more to analyze but I will stop here. The code of this post will be available on <a href="https://github.com/YinmiAlas/YinmiAlas.github.io/blob/master/LS_DS__build_week_project.ipynb">Github</a>. Thank you for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b546a6759e59" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/analyzing-fifa-19-dataset-b546a6759e59">Analyzing FIFA 19 Dataset</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>