<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Fatma Mohamed</title>
    <description>The latest articles on DEV Community by Fatma Mohamed (@fatymaah).</description>
    <link>https://dev.to/fatymaah</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3258128%2F9a68ae29-06ab-4d1e-922e-28d3b3c71290.jpeg</url>
      <title>DEV Community: Fatma Mohamed</title>
      <link>https://dev.to/fatymaah</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fatymaah"/>
    <language>en</language>
    <item>
      <title>Classification in Supervised Machine Learning</title>
      <dc:creator>Fatma Mohamed</dc:creator>
      <pubDate>Sun, 24 Aug 2025 16:02:40 +0000</pubDate>
      <link>https://dev.to/fatymaah/classification-in-supervised-machine-learning-1j2c</link>
      <guid>https://dev.to/fatymaah/classification-in-supervised-machine-learning-1j2c</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Machine learning is changing how we make decisions using data. In ML, supervised learning is one of the most widely used techniques. It involves training a model on labeled data, where the correct answer is already known so that it can make predictions on the new data. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Classification&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In Supervised Machine Learning classification is applied where  the goal is to predict categories or classes. Given some input data, a model assigns it to one or more categories.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Classification&lt;/strong&gt; is used to solve problems such as detecting fraud cases in cybersecurity, product recommendation in ecommerce and loan approval in the banking sector. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Types of Classifications&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Binary&lt;/strong&gt; - Only two labels are classified. Example Spam/Not Spam in filtering emails. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multiclass&lt;/strong&gt; - More than two classes and each input belongs to a class. Example classifying animals into cats, dogs and so on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multilabel&lt;/strong&gt; - Each input belongs to multiple classes simultaneously. Example a news article can be classified as Political and Financial at the same time.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Popular Classification Algorithms&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Logistic Regression&lt;/strong&gt; -  classification algorithm used to predict binary outcomes&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Decision Trees&lt;/strong&gt; - Easy to visualize, works with mixed data. It works by asking a series of yes/no questions (splits) to arrive at a decision&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Random Forests&lt;/strong&gt; -  it's a type of bagging ensemble machine learning model built from many Decision Trees.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;K-Nearest Neighbors (KNN)&lt;/strong&gt; - instance-based learning but most commonly, it's used to classify things by asking: &lt;em&gt;"What are the labels of the closest items around this one?"&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Classification Steps
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data Cleaning&lt;/strong&gt; - Clean and prepare data so the model can learn.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Training the Model&lt;/strong&gt; - Feed the training data into a classification algorithm. It looks for patterns and decision boundaries that separate the classes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Prediction&lt;/strong&gt; - The trained model is used to classify new data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Evaluation&lt;/strong&gt; - Evaluate data using metrics such as accuracy, Recall, Precision and F1 score.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;My Take on Classification&lt;/strong&gt;&lt;br&gt;
I was really fascinated to learn that binary is used in classification, The first and most fundamental language of computers is binary and now learning that it is essential in ML makes it interesting.&lt;/p&gt;

&lt;p&gt;In Conclusion &lt;strong&gt;Classification&lt;/strong&gt; is about teaching machines to learn from labeled data so they can make accurate predictions and informed decisions in the real world. &lt;strong&gt;It turns data into decisions.&lt;/strong&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>⚽Calculating Win Probabilities For Premier League Teams Season 2024/2025</title>
      <dc:creator>Fatma Mohamed</dc:creator>
      <pubDate>Thu, 31 Jul 2025 13:43:18 +0000</pubDate>
      <link>https://dev.to/fatymaah/calculating-win-probabilities-for-premier-league-teams-season-20242025-1a62</link>
      <guid>https://dev.to/fatymaah/calculating-win-probabilities-for-premier-league-teams-season-20242025-1a62</guid>
      <description>&lt;p&gt;How likely is it for a football team to win certain number of matches in a season? well, in this article I used Python and Binomial probability theory to estimate how likely each team in the 2024/2025 English Premier League season was to achieve their observed win count.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Goal:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Calculate the number of games each team won&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Calculate the cumulative &lt;strong&gt;Binomial Probability&lt;/strong&gt;:&lt;br&gt;
This measures how consistent or likely the team’s win total is, given their own win rate, using the binomial formula.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Bonus: Calculate the &lt;strong&gt;Empirical Probability&lt;/strong&gt; : It estimates how likely a team is to win a match based on past outcomes.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Tools and Data
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Data source: Premier League standings from the football-data.org API.&lt;/li&gt;
&lt;li&gt;Language: Python&lt;/li&gt;
&lt;li&gt;Libraries used: requests, pandas, math, dotenv (for API key), and matplotlib for visualization.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Steps in the Code
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Load the API Key&lt;br&gt;
We keep our API key in a .env file for security and load it using dotenv.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fetch EPL Standings&lt;br&gt;
The code uses requests to pull the final 2024/25 league table. We extract team names and their total number of wins.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Calculate Win Probabilities&lt;br&gt;
For each team, we:&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Estimate their win rate:&lt;br&gt;
  n = 38&lt;br&gt;
  p = wins / 38&lt;/p&gt;

&lt;p&gt;Use the binomial probability formula to compute the probability   of winning at least that many matches:&lt;br&gt;
&lt;code&gt;sum(binomial_prob(n, k, p) for k in range(wins, 39))&lt;/code&gt;&lt;br&gt;
 This tells us how likely their final win count is given their own win rate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build the Results Table
&lt;/h2&gt;

&lt;p&gt;The final DataFrame includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Team name&lt;/li&gt;
&lt;li&gt;Total wins&lt;/li&gt;
&lt;li&gt;Estimated win rate (in %)&lt;/li&gt;
&lt;li&gt;Binomial win probability (as decimal and percentage)&lt;/li&gt;
&lt;li&gt;All teams are sorted by number of wins (highest to lowest)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Visualize
&lt;/h2&gt;

&lt;p&gt;I used matplotlib, the code plots the top 10 teams and their Estimated win rate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;By applying both binomial probability and empirical (frequentist)  methods, we gain two complementary views of Premier League team performance in the 2024/25 season.  The Win Probability (Binomial) evaluates how likely it is for a team to achieve at least that number of wins—based on its own success rate while, the Estimated Win Rate (%) gives a straightforward measure of how often a team won based on observed data.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How Excel is Used in Real-World Data Analysis</title>
      <dc:creator>Fatma Mohamed</dc:creator>
      <pubDate>Wed, 11 Jun 2025 15:56:12 +0000</pubDate>
      <link>https://dev.to/fatymaah/how-excel-is-used-in-real-world-data-analysis-23ni</link>
      <guid>https://dev.to/fatymaah/how-excel-is-used-in-real-world-data-analysis-23ni</guid>
      <description>&lt;p&gt;Excel is a software developed by Microsoft which allows one to analyze, calculate, organize and visualize data. It is a powerful tool mostly used for its flexibility and wide range features which caters for data analytical needs across industries.&lt;/p&gt;

&lt;p&gt;In real-world Excel is used in companies to make data-driven decisions. Business Analyst use Excel to collect, clean and analyze data to help in monitor performance and identify trends. For instance a store manager can analyze sales data to identify top selling, best selling and sales trends for his store all using Excel.&lt;/p&gt;

&lt;p&gt;In Finance experts use Excel for tasks like budgeting, forecasting and financial reporting. They track revenues, expenses and profit margins be it monthly, quarterly and many more.&lt;/p&gt;

&lt;p&gt;Marketing teams use excel to analyze performance campaigns, customer behavior and Return On Investment(ROI).Excel is used to compile and analyze data such as email marketing performance, social media channels and analytic tools.&lt;/p&gt;

&lt;p&gt;For data cleaning in Excel you are able to clean your data by for example once you have your data in Excel you can group the numbers, in this case reading dates from invoices as dates in excel and prices as currency to help in readability and meaning.&lt;/p&gt;

&lt;p&gt;Excel is also able to perform basic arithmetic calculations the addition, subtraction, divide and multiplication. One can use addition expression to calculate monthly expense of the data.&lt;/p&gt;

&lt;p&gt;Using conditional formatting one can remove duplicates in data to help clean your data by removing duplicates in your unique identifier for example customer phone numbers.&lt;/p&gt;

&lt;p&gt;In conclusion, Excel remains a powerful tool for data analysis. Its blend of simplicity and powerful features makes it an ideal tool for tasks ranging from data cleaning and basic statistics to dashboard creation. Excel continues to be a valuable asset for analysts and decision-makers.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
