<?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 Yavuz Selim Sefunc on Medium]]></title>
        <description><![CDATA[Stories by Yavuz Selim Sefunc on Medium]]></description>
        <link>https://medium.com/@yavuzselimsefunc?source=rss-bbf17329b3f5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*44flB7gBlt7HRXA3uwllbw@2x.jpeg</url>
            <title>Stories by Yavuz Selim Sefunc on Medium</title>
            <link>https://medium.com/@yavuzselimsefunc?source=rss-bbf17329b3f5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 04:23:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yavuzselimsefunc/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 Kitchen of Data — A Journey from Raw Data to Intelligence]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://yavuzselimsefunc.medium.com/the-kitchen-of-data-a-journey-from-raw-data-to-intelligence-f9113b195edf?source=rss-bbf17329b3f5------2"><img src="https://cdn-images-1.medium.com/max/2600/0*0LjGKjQGbvWi1uJH" width="3999"></a></p><p class="medium-feed-snippet">In the world of data science, the spotlight almost always falls on the models. But the reality on the ground runs much deeper than that&#x2026;</p><p class="medium-feed-link"><a href="https://yavuzselimsefunc.medium.com/the-kitchen-of-data-a-journey-from-raw-data-to-intelligence-f9113b195edf?source=rss-bbf17329b3f5------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://yavuzselimsefunc.medium.com/the-kitchen-of-data-a-journey-from-raw-data-to-intelligence-f9113b195edf?source=rss-bbf17329b3f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/f9113b195edf</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[feature-engineering]]></category>
            <dc:creator><![CDATA[Yavuz Selim Sefunc]]></dc:creator>
            <pubDate>Thu, 17 Sep 2026 21:38:04 GMT</pubDate>
            <atom:updated>2026-09-17T21:45:23.974Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Product Recommendation Systems in B2B Telco: A Multi-Layered Approach]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://yavuzselimsefunc.medium.com/product-recommendation-systems-in-b2b-telco-a-multi-layered-approach-aca4d49439e0?source=rss-bbf17329b3f5------2"><img src="https://cdn-images-1.medium.com/max/2600/0*jpBgOABNqA2OLMAY" width="4794"></a></p><p class="medium-feed-snippet">For years, sales processes in the B2B telecommunications sector were run on mass, one-size-fits-all approaches.</p><p class="medium-feed-link"><a href="https://yavuzselimsefunc.medium.com/product-recommendation-systems-in-b2b-telco-a-multi-layered-approach-aca4d49439e0?source=rss-bbf17329b3f5------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://yavuzselimsefunc.medium.com/product-recommendation-systems-in-b2b-telco-a-multi-layered-approach-aca4d49439e0?source=rss-bbf17329b3f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/aca4d49439e0</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[recommendation-system]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Yavuz Selim Sefunc]]></dc:creator>
            <pubDate>Wed, 16 Sep 2026 06:00:21 GMT</pubDate>
            <atom:updated>2026-09-17T21:42:29.797Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Exploratory Data Analysis in Sports Analytics (Part-2)]]></title>
            <link>https://medium.com/analytics-vidhya/exploratory-data-analysis-in-sports-analytics-part-2-5ba6aa50cd5?source=rss-bbf17329b3f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ba6aa50cd5</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[exploratory-data-analysis]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Yavuz Selim Sefunc]]></dc:creator>
            <pubDate>Wed, 30 Dec 2020 22:48:50 GMT</pubDate>
            <atom:updated>2021-01-03T07:59:57.657Z</atom:updated>
            <content:encoded><![CDATA[<h4>Making more informed, “better” decisions</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t0y4T45Z5ram85RnYWV0mg.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@travelnomades?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Travel Nomades</a> on <a href="https://unsplash.com/s/photos/soccer?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>In <a href="https://medium.com/analytics-vidhya/sports-analytics-in-python-part-1-12e4907da227">part 1</a>, we did a preprocess of the football dataset. In this part, we perform exploratory data analysis. The dataset contains 79 explanatory variables that include a vast array of bet attributes. The dataset gif is below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*qiFnWYbfOd8iuM43kGZJKQ.gif" /><figcaption>Existing Dataset (1)</figcaption></figure><p>We will analyze Liverpool which was the 2019–2020 Premier League champions. I will do some aggregation on the dataset to present it in a summarized format. Here some of them ;</p><ul><li>Time aggregation / Time Slot aggregation</li><li>Day aggregation</li><li>Month aggregation</li><li>Day of Week / Weekend &amp; Weekend aggregation</li></ul><p><strong>1- Plotting Part</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3cdc0aefc3c143d41ae726904a840308/href">https://medium.com/media/3cdc0aefc3c143d41ae726904a840308/href</a></iframe><p>I am using Plotly with Python. The code above illustrates how line plots can be made. I will compare the 2.5 under/over goals strategy for all aggregations.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fdd83425f29493ba5f2d25cb5b384e58/href">https://medium.com/media/fdd83425f29493ba5f2d25cb5b384e58/href</a></iframe><p><strong>2- Time / Time Slot aggregation</strong></p><p>The first aggregation is the “Time/Time slot” features. It is noticeable that performance during morning or night affects the football match. The first plot shows which kick-off time 15:00 or 20:15 are more likely to 2.5 above the final result. I do categorize times which are morning, afternoon, and night. The second plot is given more intuition about how kickoff time affects the match goal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/377/1*Kh60mkdfULSjHBSwE3Rlzw.png" /><figcaption>Time aggregation result (4)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qgddC_jzdaKewo-toPnsbg.png" /><figcaption>Time Plot (5)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O09fZtqPZCw7VYbuZHR8jw.png" /><figcaption>Time Slot Plot (6)</figcaption></figure><p><strong>3- Day aggregation</strong></p><p>The second aggregation is the “Day” attribute. It is clear from the graph that the end of the month is likely to be 2.5 above goals. Overall, other days are kind of mirror symmetric.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZLVSWxoJl1tqilXnKbNlPw.png" /><figcaption>Day Plot (7)</figcaption></figure><p><strong>5- Month aggregation</strong></p><p>The third aggregation is a “Month” column. The figure shows a line graph that the winter term is more likely to 2.5 under the final. In contrast to the figures for the other bet types, the summer term matches are more goals.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0CTpJ-0xNpV3NNwbH2MQAw.png" /><figcaption>Month Plot (8)</figcaption></figure><p><strong>6- Day of Week / Weekend &amp; Weekend aggregation</strong></p><p>The final aggregation is “Day of Week / Weekend &amp; Weekend” features. The first day of the week figure indicates that Wednesday and Saturday are more probable to be 2.5 goals over. Other days, the pattern is almost similar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iRG44gw1PjY-QlJ3xJg0rg.png" /><figcaption>Day of Week Plot (9)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mJwqAI6O0W2uENox4MwIUQ.png" /><figcaption>Weekday / Weekend Plot (10)</figcaption></figure><p><strong>Summary</strong></p><p>Eventually, we did some exploratory data analysis on the football dataset to discover patterns and trends in the specific bet features. All code in my <a href="https://github.com/yssefunc/sport_analytics">Github </a>account. Thank you for reading. Please let me know if you have any feedback. <strong>Part 1: Follow the link below.</strong></p><p><a href="https://medium.com/analytics-vidhya/sports-analytics-in-python-part-1-12e4907da227">Sports  Analytics Framework in Python (Part-1)</a></p><p><strong>G. Appendix</strong></p><p><strong>G.1 References</strong></p><ul><li><a href="https://pubmed.ncbi.nlm.nih.gov/20400751/">Effect of 2 soccer matches in a week on physical performance and injury rate - PubMed</a></li><li><a href="https://www.scirp.org/journal/PaperInformation.aspx?PaperID=31128">Time of Day Effect on Soccer-Specific Field Tests in Tunisian Boy Players</a></li><li><a href="https://www.bbc.co.uk/sport/football/35146716">Do European ties affect league form?</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ba6aa50cd5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/exploratory-data-analysis-in-sports-analytics-part-2-5ba6aa50cd5">Exploratory Data Analysis in Sports Analytics (Part-2)</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[Sports  Analytics Framework in Python (Part-1)]]></title>
            <link>https://medium.com/analytics-vidhya/sports-analytics-in-python-part-1-12e4907da227?source=rss-bbf17329b3f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/12e4907da227</guid>
            <category><![CDATA[sports-betting]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Yavuz Selim Sefunc]]></dc:creator>
            <pubDate>Tue, 29 Dec 2020 22:36:33 GMT</pubDate>
            <atom:updated>2021-01-03T13:11:47.322Z</atom:updated>
            <content:encoded><![CDATA[<h3>Sports Analytics Framework in Python (Part-1)</h3><h4>A data-driven system to make smarter bets</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4jsZ5wM_KfT0bfsvyoR1XA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@jesusance?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Thomas Serer</a> on <a href="https://unsplash.com/s/photos/soccer?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Football is the most popular sport worldwide. It is a global game that connects almost every single person on the planet. It has been a part of my life since I was a child. I’ve watched almost every match so far.</p><p>Over the last couple of months, I have been working on a project called betting analytics on sports (football) matches. I want to implement a simple betting framework in Python. It has two parts which are data-preprocessing and exploratory data analysis. (<a href="https://medium.com/analytics-vidhya/exploratory-data-analysis-in-sports-analytics-part-2-5ba6aa50cd5">Part- 2</a>) In this part, I want to go through how to preprocess the football data turn into action.</p><h4><strong>What is the Sport (Betting) Analytics and use cases?</strong></h4><p>Sports analytics is actually a broad field and there are a lot of different types of roles that a sports analytics professional can have. I want to touch between data analysis and betting analytics.</p><h4>Finding a dataset</h4><p>It can be quite hard to find a specific football matches dataset but, I found that there is a website that provides fresh and historical football results which include 27 season results and 20 season match stats “<a href="http://football-data.co.uk/data.php">http://football-data.co.uk/data.php</a>”. All word leagues are available.</p><p>The datasets have 22 variables. Only the English premier league has a referee column. The data dictionary has “<a href="http://football-data.co.uk/notes.txt">http://football-data.co.uk/notes.txt</a>.”. Some variable dictionary table are below;</p><ul><li>FTHG = Full-Time Home Team Goals</li><li>FTAG = Full-Time Away Team Goals</li><li>FTR = Full-Time Result (H=Home Win, D=Draw, A=Away Win)</li><li>HS = Home Team Shots</li><li>HST = Home Team Shots on Target</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*28y2SoNFyt79a2bNrbwDUw.png" /><figcaption>Example dataset from Premier League (1)</figcaption></figure><p>The most popular type of bets on football, the aim of which is to predict the final result of the match, either the win of the home team (1), a draw (X), or the win for the guests (2). But, now you have lots of options to play. I made a popular listed below. For example, An over/under 2.5 goals bet is placed on the 2.5 goals market. This is where you select one of two things to happen, under 2.5 goals means two goals or less, over 2.5 goals means three goals or more.</p><h4>Coding part</h4><p>I can show some examples of how to code bet options such as making statistical under/over 2.5 goals half or Final, mutual goals, MS_1_under_1_5, and change to the numeric column for each team strategy.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/039994f9be8b3ff7c9ba1dc96fda9f47/href">https://medium.com/media/039994f9be8b3ff7c9ba1dc96fda9f47/href</a></iframe><p>You can apply the same format coding. 59 variables are creating. After the preprocess dataset, the below gif is creating.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*qiFnWYbfOd8iuM43kGZJKQ.gif" /><figcaption>dataset gif (3)</figcaption></figure><h4>Team Analysis Part</h4><p>After the data wrangling completed, creating a function called the name is “probability”. It is a function that creates an information card for each team. These functions show the percentage of the win-lose draw and other bet options in detail. You can find a percentage of types of bets with a sorted style.</p><p>I<a href="https://ipywidgets.readthedocs.io/en/latest/">pywidgets </a>are interactive HTML widgets for Jupyter notebooks which easy access to information. Users gain control of their data and can visualize changes in the data. I have a slider and dropdown menu with a team list you can manage easily.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/08cc03e1771522ccdc927cc2b7a0e276/href">https://medium.com/media/08cc03e1771522ccdc927cc2b7a0e276/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SBVY51O5AxkcmhcVkt5xzA.png" /><figcaption>Sample dashboard (5)</figcaption></figure><p>When you run the code, you will see ipywidgets at end of the code;</p><ul><li>The first option is that 1(home) 2(away) 3(all matches) analysis.</li><li>Choose your first team analyze</li><li>Choose your second team analyze</li><li>Finally, you see both team results to analyze deciding which one best option is bet. The gif below explains how the system works.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*bFYVPDutgOSrSKcIbVtTDg.gif" /><figcaption>You will see the sample dashboard like this. (Note: You can the split cells notebook extension to split vertically to prevent extra white space on the right-hand side of your Jupyter Notebooks which help <a href="https://jupyter-contrib-nbextensions.readthedocs.io/en/latest/install.html">nbextensions</a>) (6)</figcaption></figure><p><strong>Summary</strong></p><p>In this article, we went through how to implement data-driven betting analytics in Python. All code in my <a href="https://github.com/yssefunc/sport_analytics">Github </a>account. Thank you for reading. Please let me know if you have any feedback.</p><p>For those interested, continue reading part 2 in this series following the link above where I dive into exploratory data analysis by using data visualizations to find out variables that analyze football data.</p><p><strong>Part 2: Follow the link below.</strong></p><p><a href="https://medium.com/analytics-vidhya/exploratory-data-analysis-in-sports-analytics-part-2-5ba6aa50cd5">Exploratory Data Analysis in Sports Analytics (Part-2)</a></p><p><strong>G. Appendix</strong></p><p><strong>G.1 References</strong></p><ul><li><a href="http://football-data.co.uk/data.php">Football Results, Statistics &amp; Soccer Betting Odds Data</a></li><li><a href="https://www.optasports.com/services/analytics/">Analytics</a></li><li><a href="https://www.analyticsvidhya.com/blog/2020/10/predicting-the-scoreline-of-a-football-match-using-poisson-distribution/">Bet Wisely: Predicting the Scoreline of a Football Match using Poisson Distribution</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12e4907da227" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/sports-analytics-in-python-part-1-12e4907da227">Sports  Analytics Framework in Python (Part-1)</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[9 Common Data Science Terms “∨” Jargons]]></title>
            <link>https://medium.com/analytics-vidhya/9-common-data-science-terms-jargons-90212ea15d4e?source=rss-bbf17329b3f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/90212ea15d4e</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[science]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Yavuz Selim Sefunc]]></dc:creator>
            <pubDate>Tue, 18 Feb 2020 14:19:59 GMT</pubDate>
            <atom:updated>2020-12-31T18:29:27.310Z</atom:updated>
            <content:encoded><![CDATA[<h4>Glossary of common Data Science terms</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6dPi-owAaKSS1_4a" /><figcaption>Photo by <a href="https://unsplash.com/@franki?utm_source=medium&amp;utm_medium=referral">Franki Chamaki</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Data Science field is such a rapidly expanding growing space because data is an asset that empowers businesses to make better decisions. For every field, Data Science has its own jargon which means that only those in a field understand. In this article, I want to highlight the 9 common Data Science jargon or term that we encounter frequently in the real-life.</p><h3>Data-driven Approach</h3><p>The first common term is Data-driven which is a significant approach that progresses by data without intuition or domain or personal expertise. If you are working in a consultant firm, you are engaging in a lot of different industries and clients. Most of the time contacting the domain expertise people is hard, thus, data-driven approaches gain importance in this situation. The note that when you type “data-driven” in a Linkedin jobs search, you see over 120,000 results Worldwide.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fzdc2v-D7Rmg%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dzdc2v-D7Rmg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fzdc2v-D7Rmg%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c8af3bd81c472ced622c849c3e7b3bbd/href">https://medium.com/media/c8af3bd81c472ced622c849c3e7b3bbd/href</a></iframe><h3>Domain Expertise</h3><p>The second term is domain expertise or domain knowledge which is expertise people in a particular field. Mostly, they are an important person to assist data scientists to make data understandable. A data-driven decision may time consume in but domain expertise people help the data scientists build better accurate models result.</p><h3>Incrementally Improved</h3><p>Incremental improvement<strong> </strong>is a process to achieve a significant cumulative impact through continuous improvement. One great example can be seen in Google’s translate program. The program uses advanced AI techniques. It was launched in 2006. In the first years of the program, it was not successful. But, in recent years, it is really good compared to the older version of the program. Another example is anti-fraud models which is another good example of incrementally improve models.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*XBmbJvQ_GfTas-GsoNAvUw.gif" /><figcaption>Current accuracy results from Google Translate. Retrieved from: <a href="https://ai.googleblog.com/2016/09/a-neural-network-for-machine.html">https://ai.googleblog.com/2016/09/a-neural-network-for-machine.html</a></figcaption></figure><h3>Explainability (White Box &amp; Black Box)</h3><p>Explainability is another important term in the data science world because model explainability is one of the most problems in machine learning which is critical when you make a model. Traditional methods are simple and easy to explain which is a white box such as Linear Regression, Logistic Regression, and Decision Tree. If you are working on Advance Machine or Deep Learning models which is the Black Box model that hard to explain.</p><p><strong>Extra Info:</strong> SHAP, Lime, and ELI5 are popular frameworks for model explainability. help boost model interpretability.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F0yXtdkIL3Xk%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D0yXtdkIL3Xk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F0yXtdkIL3Xk%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e355ebd9e405385c7b1ced72026928d0/href">https://medium.com/media/e355ebd9e405385c7b1ced72026928d0/href</a></iframe><h3>CPU — GPU — TPU</h3><p>When you work with massive data and training deep learning models need computing power. Therefore, working with the GPU or TPU play an important role to make strong model performance.</p><p><strong>CPU (Central Processing Unit) “</strong>is known as the brain for every ingrained system.” (<a href="https://www.geeksforgeeks.org/">geeksforgeeks.org</a>)</p><p><strong>GPU (Graphics Processing Unit) “ </strong>is used to provide images in computer games. GPU is faster than CPU’s speed and its emphasis on high throughput.”(<a href="https://www.geeksforgeeks.org/">geeksforgeeks.org</a>)</p><p><strong>TPU (Tensor Processing Units) “</strong>is Google’s custom-developed application-specific integrated circuits (ASICs) used to accelerate machine learning workloads. TPUs are designed from the ground up with the benefit of Google’s deep experience and leadership in machine learning.” (cloud.google.com/tpu). Kaggle Notebooks have TPU power now. <a href="https://www.kaggle.com/product-feedback/129828">Detail</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5yApAK_rXWIzHG7L-Z0mKA.png" /><figcaption>IBM S822LC with Nvidia Pascal GPU (<a href="https://www.redbooks.ibm.com/redpapers/pdfs/redp5405.pdf">Detail Link</a>). We <em>used </em>IBM GPU as a training deep learning models in one of the <em>projects.</em></figcaption></figure><h3>Scale</h3><p>Scaling is a word, commonly used in data science, which means “set of numbers, amounts, etc., used to measure or compare the level of something” (Cambridge Dictionary). Feature scaling is a statistical method used to normalize the range of independent variables or features of data. In one of the current projects we use Dask which parallelizes machine learning algorithms. The aim of the Dask scales Python.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F6ixaCnR9ur0%3Fstart%3D1746%26feature%3Doembed%26start%3D1746&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D6ixaCnR9ur0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F6ixaCnR9ur0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/eea2987b9ed1b95ed0668673d0c6a19b/href">https://medium.com/media/eea2987b9ed1b95ed0668673d0c6a19b/href</a></iframe><h3>Deployment</h3><p>Deployment is the method by which you integrate a machine learning model into an existing production environment in order to start using it to make practical business decisions based on data. There is a growing demand in this area. Numerous deployment tools have recently emerged such as Airflow, Kubeflow, and Mlfow are popular open-source deployment tools for ML models.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FcHATHSB_450%3Fstart%3D1307%26feature%3Doembed%26start%3D1307&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DcHATHSB_450&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FcHATHSB_450%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/5ff1c6a0032c4cf9c9077073a4e2934e/href">https://medium.com/media/5ff1c6a0032c4cf9c9077073a4e2934e/href</a></iframe><h3>Pipeline(s) — Workflow</h3><p>Pipeline or Workflow in data science are sequences of cleaning, modeling and interpreting steps to make understandable for everyone. With the help of the pipeline(s), you can reduce overhead in production and improve flexibility. The PyData video is below to explain end to end machine learning pipelines.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FDGeVRD63xZw%3Fstart%3D4%26feature%3Doembed%26start%3D4&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DDGeVRD63xZw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FDGeVRD63xZw%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/7290bc06d257b746b890923fdecc6a27/href">https://medium.com/media/7290bc06d257b746b890923fdecc6a27/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*_whkfbqHtz1AnhpbBTJiQw.png" /><figcaption>High-level pipeline example. Retrieved from: <a href="https://airflow.apache.org/docs/1.10.2/concepts.html?highlight=trigger">https://airflow.apache.org/docs/1.10.2/concepts.html?highlight=trigger</a></figcaption></figure><h3>Optimization</h3><p>Lastly, optimization is widely used in the data science world. The definition of optimization is making the best of anything. Optimization is at the heart of almost all machine learning and statistical techniques used in data science. Machine or Deep learning models have several parameters that you have to optimize. For example, hyperparameter optimization or tuning is a technique that finds a set of optimal hyperparameters for a learning algorithm to enhance model accuracy.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FIqQT8se9ofQ%3Fstart%3D1201%26feature%3Doembed%26start%3D1201&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DIqQT8se9ofQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FIqQT8se9ofQ%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/faf44f9874b5323b37702e3a891288e4/href">https://medium.com/media/faf44f9874b5323b37702e3a891288e4/href</a></iframe><h3>Summary</h3><p>In this article, I try to explain 9 common data science jargon that you need to know. Feel free to give feedback or ask me questions if something is not clear. I hope you enjoy reading it.</p><p>My first article was Creating Customer Scoring Feature for Anomaly detection Algorithms using Gaussian Mixture Model. <a href="https://medium.com/analytics-vidhya/creating-customer-scoring-feature-for-anomaly-detection-algorithms-using-gaussian-mixture-model-be00e0874c8b">Link</a></p><h3>G. Appendix</h3><h3>G.1. References</h3><ul><li><a href="https://ai.googleblog.com/2016/09/a-neural-network-for-machine.html">A Neural Network for Machine Translation, at Production Scale</a></li><li><a href="https://www.geeksforgeeks.org/difference-between-cpu-and-gpu/">Difference between CPU and GPU - GeeksforGeeks</a></li><li><a href="https://cloud.google.com/tpu/docs/tpus">Cloud Tensor Processing Units (TPUs) | Google Cloud</a></li><li><a href="https://dictionary.cambridge.org/dictionary/english/scale">SCALE | meaning in the Cambridge English Dictionary</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90212ea15d4e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/9-common-data-science-terms-jargons-90212ea15d4e">9 Common Data Science Terms “∨” Jargons</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[Creating Customer Scoring Feature for Anomaly detection Algorithms using Gaussian Mixture Model]]></title>
            <link>https://medium.com/analytics-vidhya/creating-customer-scoring-feature-for-anomaly-detection-algorithms-using-gaussian-mixture-model-be00e0874c8b?source=rss-bbf17329b3f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/be00e0874c8b</guid>
            <category><![CDATA[gaussian-mixture-model]]></category>
            <category><![CDATA[feature-engineering]]></category>
            <category><![CDATA[anomaly-detection]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Yavuz Selim Sefunc]]></dc:creator>
            <pubDate>Fri, 17 Jan 2020 06:31:26 GMT</pubDate>
            <atom:updated>2021-01-25T22:10:51.776Z</atom:updated>
            <content:encoded><![CDATA[<h3>Creating Customer Scoring Feature for Anomaly Detection Algorithms using Gaussian Mixture Model</h3><h4>Feature Engineering for anomaly detection models</h4><figure><img alt="Definition of prospect: an apparent probability of advancement, success, profit, etc" src="https://cdn-images-1.medium.com/max/1024/1*cphQ01TKD7rP-yN9DDjMdw.jpeg" /><figcaption>Definition of prospect: an apparent <strong>probability </strong>of advancement, success, profit, etc</figcaption></figure><p>My aim in this article is to give some intuition about how to create an advanced feature(s) in customer transaction data to predict anomaly or fraud in credit cards.</p><p><strong>Fraud and anomaly detection</strong></p><p>The machine learning approach to fraud detection has gained popularity in recent years because instead of rule-based methods, self-learning AI models that continually learning and capable of detecting outlier and anomaly behaviors. In the rule-based systems, the algorithms are written by fraud analysts and they are based on a strict threshold.</p><p><strong>Supervised vs. Unsupervised Approach</strong></p><p>Even though most of the sources said that supervised data common in the industry, in reality, labeled data is hard to find. Even if you find it, unbalancing and bias may be a problem for especially fraud data where the majority samples (non-fraud samples). For this reason, unsupervised models increase importance. However, unsupervised learning is harder as compared to supervised learning tasks.</p><p><strong>Unsupervised Methods for Anomaly &amp; Fraud detection</strong></p><blockquote><em>“The goal in such unsupervised learning problems may be to discover groups of similar examples within the data, where it is called clustering, or to determine how the data is distributed in space, known as density estimation” (</em>Page 3, <a href="https://amzn.to/2O2WWnj">Pattern Recognition and Machine Learning</a>, 2006.<em>).</em></blockquote><p>Unsupervised Anomaly detection methods:</p><ul><li>K-means</li><li>Gaussian Mixture Model</li><li>DBSCAN</li><li>OPTICS</li><li>Isolation Forest (Anomaly Detection algorithms)</li><li>LOF (Anomaly Detection algorithms)</li><li>One Class SVM(Anomaly Detection algorithms)</li><li>Deep Learning Methods</li></ul><p>The scikit-learn page is a good explaining of different clustering algorithms on their page. <a href="https://scikit-learn.org/stable/auto_examples/cluster/plot_cluster_comparison.html">Link</a></p><p><strong>My project in detail</strong></p><p>One of my current projects is trying to detect an anomaly or fraudulent behavior in customer credit card transaction data. Data has limited features with no label. All I have is DateTime, customer id, amount columns. Two important steps are important here which are domain knowledge and advance feature engineering but, if you are working in a consulting company, it is hard to contact the analyst team, thus, feature engineering or data-driven approaches gain importance in this situation.</p><p>What are the important parameters Identity, Amount, Location, Frequency? I have an Amount column. I want to create customer-based data, thus, I need to create effective customer segmentation which is RFM (Recency, Frequency, Amount). With the help of this, we try to categorize customers.</p><p><strong>The dataset</strong></p><p>The UCI Machine Learning Repository has made the dataset containing actual transactions from 2010 and 2011. The link is here: <a href="https://archive.ics.uci.edu/ml/datasets/online+retail">https://archive.ics.uci.edu/ml/datasets/Online+Retail+II</a></p><p><strong>Attribute(Feature) Information</strong></p><p>InvoiceNo: Invoice number. <strong>Nominal</strong>. <br>StockCode: Product (item) code. <strong>Nominal</strong>.<br>Description: Product (item) name. <strong>Nominal</strong>.<br>Quantity: The quantities of each product (item) per transaction. <strong>Numeric</strong>.<br>InvoiceDate: Invoice date and time. <strong>Numeric</strong>.<br>UnitPrice: Unit price. <strong>Numeric</strong>. <br>CustomerID: Customer number. <strong>Nominal</strong>. <br>Country: Country name. <strong>Nominal</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WY8LBLzFYzMshApZ-FEn7Q.jpeg" /><figcaption>Figure 1: the dataset</figcaption></figure><p><strong>Clustering Method</strong></p><p>After the RFM analysis, we need to label or categorize data. Clustering methods comes first. K-means and GMM methods are important unsupervised clustering algorithms that can be used to cluster unlabeled data.</p><p>But, for this project, I use GMM because it has some advantages over the K-means. One advantage is that with the help of the predict_proba function, it has returned the probabilities that a data point belongs to each of the K clusters. Thus, every customer has a score in which we create the feature.</p><p><strong>Basic of Gaussian Mixture Model</strong></p><p>I want to give some detailed information about the Gaussian Mixture Model. It is a probability distribution model. Clusters modeled are Gaussians. It is a “soft-clustering” which means that “instead of putting each data point into a separate cluster, a probability or likelihood of that data point to be in those clusters is assigned”(<a href="https://www.analyticsvidhya.com/blog/2016/11/an-introduction-to-clustering-and-different-methods-of-clustering/">Link</a>)</p><p>The parameters to fit data:</p><ul><li>Mean</li><li>Covariance</li><li>Mixing coefficient</li></ul><p>What Mathematics behind it?</p><figure><img alt="Figure 1 : Picture received:" src="https://cdn-images-1.medium.com/max/1024/1*qftj_ZPGHE8_BwUsDbAypQ.png" /><figcaption>Figure 2: Picture Received: <a href="https://www.youtube.com/watch?v=ZBLyXgjBx3Q">Link</a></figcaption></figure><p>Each component generates data from a Gaussian with a mean and covariance matrix. To learn such parameters, GMMs use the expectation-maximization (EM) algorithm to optimize the maximum likelihood which is assigning data to clusters with some probability. We can call the predict_proba function to return the probabilities that a data point belongs to each of the K clusters.</p><p>GMM has ten parameters. n_components, covariance_type are highly significant parameters for a better performance model. To determine how many Gaussians, we can use one of several means to evaluate how well it fits the data. For example, there is the Akaike Information Criterion (AIC), Bayesian Information Criterion (BIC), elbow, and silhouette score which are useful methods (<a href="https://scikit-learn.org/stable/auto_examples/mixture/plot_gmm_selection.html">Detail Link</a>). The GMM has four covariance types which are ‘spherical’, ‘tied’, ‘diag’, ‘full’. What are the differences are here: <a href="https://www.slideshare.net/PengjingZhang/em-and-gmm">Link</a>. Finally, the GMM algorithm’s performance speed is fast. I worked with over six million data rows.</p><p>Before diving into code, I want to show my pipeline that creates a feature.</p><figure><img alt="Figure 2" src="https://cdn-images-1.medium.com/max/925/1*RJwAUgyLFaF1UdJVP6_l2w.gif" /><figcaption>Figure 3: Sample pipeline for customer scoring</figcaption></figure><p><strong>Coding Part (Github </strong><a href="https://github.com/yssefunc/gaussian_mixture_model_scoring"><strong>Link </strong></a><strong>for all code)</strong></p><p>I filter customer’s frequency if they have more than five transactions. The detailed code is below. For this data, our team decides more than five transactions history are suitable for RFM. But, this decision may change from business to business. Customer who has between one (newcomer) and four transactions should categorize separately.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/af07d3e50e29f8ba4c972ef4eb8a339b/href">https://medium.com/media/af07d3e50e29f8ba4c972ef4eb8a339b/href</a></iframe><p>After I filter customer frequency, I want to make a Recency Frequency Monetary analysis for each customer at the same time, you can add mean, min, max, and std. dev which depends on you.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/03a015f036687e1faac4cedd58f36770/href">https://medium.com/media/03a015f036687e1faac4cedd58f36770/href</a></iframe><p><strong>Don’t forget</strong></p><p>Recency, Frequency, and Monetary are ready. I also add mean, min, max, and std. But, they are optional. My monetary value represents the median value of a given customer’s purchases instead of the mean value, because in terms of my statistical analysis.</p><p>I will train my GMM model with only RFM parts. Still, the process has not finished yet. Distribution Check and Outlier Cleaning are important requirements for each feature because clustering algorithms are sensitive to outliers and skewed data. Lastly, after deciding the n_components and covariance type, data is ready for the Gaussian Mixture Model algorithm.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8e6055257846c3316aa2460624c4a0af/href">https://medium.com/media/8e6055257846c3316aa2460624c4a0af/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*BiFYoy6ouesAALeTfqew8A.jpeg" /><figcaption>Figure 4: 3d plot for rfm analysis</figcaption></figure><p>I show two figures which are normal and upside view. The recency and Frequency part is almost well clustered but monetary data was skewed and had outliers thus, it leads to some overlapping.</p><p>This code block adding the score for each label. By the way, predict_proba score return like this,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*RHm9IAmT1yCX_a9id4yKbw.png" /><figcaption>Figure 5: GMM models results</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/39f763bb665e0239cd0dfd28be8ca581/href">https://medium.com/media/39f763bb665e0239cd0dfd28be8ca581/href</a></iframe><p>After adding the score for each label, I want to normalize the score between zero and one.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b71ecfba4fab0372d51349457996c700/href">https://medium.com/media/b71ecfba4fab0372d51349457996c700/href</a></iframe><p>Finally, each customer score is ready for anomaly detection methods. I categorize customer scores as Excellent, Fair, and Outlier. The visualization is below. All code in my Github account. <a href="https://github.com/yssefunc/gaussian_mixture_model_scoring">Link</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*28kr92G6UPRzA4XjLOhBGw.jpeg" /><figcaption>Figure 6: distribution of customer scoring</figcaption></figure><p><strong>Summary</strong></p><p>In this article, we went through how to create a feature from credit card transaction data. We looked at RFM analysis, customer segmentation. Finally, we assigned a score for each customer using the Gaussian Mixture algorithm. Feel free to give feedback or ask me questions if something is not clear. I hope you enjoy reading it.</p><h3>G. Appendix</h3><h3>G.1. References</h3><ul><li><a href="https://intellipaat.com/blog/fraud-detection-machine-learning-algorithms/">Fraud Detection Algorithms | Fraud Detection using Machine Learning</a></li><li><a href="https://towardsdatascience.com/gaussian-mixture-models-d13a5e915c8e">Gaussian Mixture Models Clustering Algorithm Explained</a></li><li><a href="https://towardsdatascience.com/how-to-code-gaussian-mixture-models-from-scratch-in-python-9e7975df5252">How to code Gaussian Mixture Models from scratch in Python</a></li><li><a href="https://github.com/yssefunc">yssefunc - Overview</a></li></ul><p><a href="http://www.mit.edu/~9.54/fall14/slides/Class13.pdf"><em>http://www.mit.edu/~9.54/fall14/slides/Class13.pdf</em></a></p><p><a href="https://www.slideshare.net/petitegeek/expectation-maximization-and-gaussian-mixture-models"><em>https://www.slideshare.net/petitegeek/expectation-maximization-and-gaussian-mixture-models</em></a></p><p><a href="https://www.youtube.com/watch?v=ZBLyXgjBx3Q">https://www.youtube.com/watch?v=ZBLyXgjBx3Q</a></p><p><a href="https://github.com/aviolante/sas-python-work/blob/master/machine_learning/scorecard_post/credit_scorecard_demo_public.ipynb">https://github.com/aviolante/sas-python-work/blob/master/machine_learning/scorecard_post/credit_scorecard_demo_public.ipynb</a></p><p><a href="https://scikit-learn.org/stable/auto_examples/mixture/plot_gmm_selection.html#sphx-glr-auto-examples-mixture-plot-gmm-selection-py">https://scikit-learn.org/stable/auto_examples/mixture/plot_gmm_selection.html#sphx-glr-auto-examples-mixture-plot-gmm-selection-py</a></p><p><a href="https://github.com/aviolante/sas-python-work/blob/master/machine_learning/scorecard_post/credit_scorecard_demo_public.ipynb">https://github.com/aviolante/sas-python-work/blob/master/machine_learning/scorecard_post/credit_scorecard_demo_public.ipynb</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be00e0874c8b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/creating-customer-scoring-feature-for-anomaly-detection-algorithms-using-gaussian-mixture-model-be00e0874c8b">Creating Customer Scoring Feature for Anomaly detection Algorithms using Gaussian Mixture Model</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>
    </channel>
</rss>