<?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>Forem: Faith Cherotich </title>
    <description>The latest articles on Forem by Faith Cherotich  (@cherotich).</description>
    <link>https://forem.com/cherotich</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%2F3258064%2Fa16b040c-1354-408f-a990-95df59199ec5.png</url>
      <title>Forem: Faith Cherotich </title>
      <link>https://forem.com/cherotich</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/cherotich"/>
    <language>en</language>
    <item>
      <title>Supervised Learning: How Classification Model Works</title>
      <dc:creator>Faith Cherotich </dc:creator>
      <pubDate>Sun, 24 Aug 2025 20:59:08 +0000</pubDate>
      <link>https://forem.com/cherotich/classification-model-in-supervised-learning-c91</link>
      <guid>https://forem.com/cherotich/classification-model-in-supervised-learning-c91</guid>
      <description>&lt;p&gt;Have you ever wondered how your phone detects spam texts and automatically sends them to the junk folder? This is an example of classification in supervised learning—a branch of machine learning.&lt;br&gt;
In this article, we'll delve into supervised learning, its models, and real-world applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Supervised Learning?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This branch of machine learning concentrates with learning patterns through connecting the relationship between variables and known outcomes and working with labelled datasets. The patterns from said datasets creates a model that can reproduce the same underlying rules with new data (testing data).&lt;/p&gt;

&lt;p&gt;Under Supervised learning are two branches, &lt;strong&gt;classification&lt;/strong&gt; and &lt;strong&gt;regression&lt;/strong&gt;, however, our main focus is &lt;strong&gt;classification&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Classification&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Classification algorithms can be used to create outputs that are restricted to a limited set of values. Data is trained to identify the input and assign classes accordingly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Identifying an email as spam or not.&lt;/li&gt;
&lt;li&gt;Transaction being specified as fraudulent or not&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Types of Classification Tasks&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Binary Classification&lt;/strong&gt;- two possible classes &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-Class&lt;/strong&gt;- more than two classes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-Label&lt;/strong&gt;- multiple classes at the same time. Example: &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Models used for classification&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Logistic Regression&lt;/strong&gt;- typically used for binary classification to predict two discrete classes, for example pregnant or not pregnant.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;K-Nearest Neighbors&lt;/strong&gt;- a supervised learning technique used to classify new data points based on relationship to closest data points.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Decision Trees&lt;/strong&gt;- breaks down and explains how classification is done using neat visual representation, hence the name decision trees. It begins at the root node from whence branches emerge, otherwise known as leaf nodes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Random Forest&lt;/strong&gt;- this is a collection of multiple decision trees.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Real-world applications of Classification&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Education:&lt;/strong&gt; Determining whether a student should be awarded a scholarship&lt;br&gt;
&lt;strong&gt;Banking:&lt;/strong&gt; Determining whether a customer is eligible for a loan.&lt;br&gt;
&lt;strong&gt;Agriculture:&lt;/strong&gt; Predicting the suitable weather for optimum production of certain crops.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Final Thoughts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Classification is more than just a theoretical concept; it's a powerful tool for making data-driven decisions. From optimizing business strategies like product recommendations to enhancing your grasp of machine learning's inner workings, mastering this technique is a fundamental inbuilding intelligent systems.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Predicting win probabilities of premier league teams based on last seasons performance using Python</title>
      <dc:creator>Faith Cherotich </dc:creator>
      <pubDate>Thu, 31 Jul 2025 20:56:08 +0000</pubDate>
      <link>https://forem.com/cherotich/predicting-win-probabilities-of-premier-league-teams-based-on-last-seasons-performance-using-python-73c</link>
      <guid>https://forem.com/cherotich/predicting-win-probabilities-of-premier-league-teams-based-on-last-seasons-performance-using-python-73c</guid>
      <description>&lt;p&gt;In this article, I'll delve into the world of football in an attempt to predict teams' winning chances based on last seasons performance.&lt;/p&gt;

&lt;p&gt;First I'll &lt;strong&gt;retrieve&lt;/strong&gt; last season's standings from &lt;a href="https://www.football-data.org/" rel="noopener noreferrer"&gt;https://www.football-data.org/&lt;/a&gt; API.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import requests

# Retrieving data from the API
standings_url = "https://api.football-data.org/v4/competitions/PL/standings?season=2024" \
""
headers = {
    "X-Auth-Token": "api_key"
}

response = requests.get(standings_url, headers=headers)
standings_data = response.json()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next is to &lt;strong&gt;calculate the estimated probability of winning this season&lt;/strong&gt; using number of games won, and number of games played.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def win_probability(standings_data):
    teams_win_probabilities = []
    table = standings_data["standings"][0]["table"]  

    for row in table:
        team_name = row["team"]["name"]
        wins = row["won"]
        played = row["playedGames"]
        if played &amp;gt; 0:
            win_rate = (wins / played) * 100
            teams_win_probabilities.append({"team": team_name, "playedGames": played, "won": wins, "win_rate": round(win_rate, 2)})
        else:
            print(f"Skipping {row['team']['name']} because playedGames={played}")
    print(f"Total teams processed: {len(teams_win_probabilities)}")
    return teams_win_probabilities
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To return output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;results = win_probability(standings_data)
for index, team in enumerate(results, start=1):
    print(f"{index}. {team['team']}: \nPlayed Games- {team['playedGames']}, Wins- {team['won']}, {team['win_rate']}% win rate")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Sample output of the first 5 teams on 2024/25 EPL table:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Total teams processed: 20
1. Liverpool FC: 
Played Games- 38, Wins- 25, 65.79% win rate
2. Arsenal FC: 
Played Games- 38, Wins- 20, 52.63% win rate
3. Manchester City FC: 
Played Games- 38, Wins- 21, 55.26% win rate
4. Chelsea FC: 
Played Games- 38, Wins- 20, 52.63% win rate
5. Newcastle United FC: 
Played Games- 38, Wins- 20, 52.63% win rate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Final Thoughts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This may not give the exact results as to what team would win this season, however, it shows how likely that outcome is.&lt;br&gt;
It is helpful for football pundits and analysts to gain insights into trends in the world of football.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Measures of central tendency and their significance in the field of data science</title>
      <dc:creator>Faith Cherotich </dc:creator>
      <pubDate>Tue, 22 Jul 2025 20:48:37 +0000</pubDate>
      <link>https://forem.com/cherotich/measures-of-central-tendency-and-their-significance-in-the-field-of-data-science-4a76</link>
      <guid>https://forem.com/cherotich/measures-of-central-tendency-and-their-significance-in-the-field-of-data-science-4a76</guid>
      <description>&lt;p&gt;In this article we are going to explore methods used in measuring central tendency of data, and their importance in the field of data science.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What are measures of central tendency?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;These are numerical values that represent the middle value in a dataset, also known as averages. They are important for summarizing data by finding average values.&lt;br&gt;
They describe to what extent numerical variables tend to group around a specific value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The commonly used measures are:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- The Mean&lt;/strong&gt;&lt;br&gt;
It is also known as average. This can be computed by dividing the sum of values by the number of data values that were summed.&lt;br&gt;
The mean represents one way of finding the most typical value in a set of data values. it uses all values in a sample population, hence outliers can affect its accuracy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- The Median&lt;/strong&gt;&lt;br&gt;
This is the middle value in a sorted set of values. &lt;br&gt;
When the number of data values is even, there is no natural middle value, therefore to determine the mean you can compute the mean of the two middle values.&lt;br&gt;
The median splits the set of ordered values into two parts that have equal number of values. It is a good alternative to use for a dataset that has outliers since it's not affected by extreme values.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- The Mode&lt;/strong&gt;&lt;br&gt;
It is the value that appears frequently in a distribution.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example using Python&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fojg82e9nw6bm6chkeegx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fojg82e9nw6bm6chkeegx.png" alt=" " width="644" height="218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Importance of measures of central tendency in the field of data science&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;• Summarize large datasets making them easier to understand.&lt;br&gt;
• Detect outliers/anomalies to help identify potential errors in the data for accurate assessments.&lt;br&gt;
• Communicate insights from analysis of differences/similarities between different datasets or time periods for better decision making.&lt;br&gt;
• Draw inductive inferences as data samples are used to make inferences about larger populations.&lt;br&gt;
• Make predictions through understanding of averages of expected outcome. For example in real estate, it can be determined which region is most preferred by customers by analyzing trends in sales over a given time period.&lt;br&gt;
• Draw conclusions about the corresponding statistics in the population&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Applications&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;• A clothing store stocking the most common sizes purchased.&lt;br&gt;
• Companies evaluating their average employee salaries.&lt;br&gt;
• Insurance providers evaluating the median age of their customers.&lt;/p&gt;

</description>
      <category>learning</category>
      <category>datascience</category>
      <category>data</category>
    </item>
    <item>
      <title>How Excel is used in Real-World Data Analysis</title>
      <dc:creator>Faith Cherotich </dc:creator>
      <pubDate>Wed, 11 Jun 2025 14:49:55 +0000</pubDate>
      <link>https://forem.com/cherotich/how-excel-is-used-in-real-world-data-analysis-1d8</link>
      <guid>https://forem.com/cherotich/how-excel-is-used-in-real-world-data-analysis-1d8</guid>
      <description>&lt;p&gt;&lt;strong&gt;Overview of excel&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Excel is a widely known data analysis and visualization tool–a valuable asset crucial for professional growth, for its accessibility and usability.&lt;br&gt;
It is useful for data entry, data cleaning, visualization and generation of reports that can be presented in dashboards. The built in formulas aid in performing simple calculations and analysis of given datasets.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Applications of excel the in real world&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basic data analysis&lt;/strong&gt; – inbuilt functions, e.g. MAX, SUM, AVERAGE, are essential in handling arithmetic computations. It allows users to analyze data quickly, and with ease. Examples include computing profitability and liquidity ratios.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Financial reporting&lt;/strong&gt; – Excel allows for presentation of financial data in a clear and concise manner. This can be presented visually using features such as pivot charts to create dashboards and reports necessary for decision making. Examples include sales and expenditure reports.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Expense Tracking&lt;/strong&gt; - Users can customize an Excel spreadsheet to track expenses, could be in groups as fuel, shopping, rent expenses. This makes it easier for budgeting depending on spending patterns.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common excel features/ formulas&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Average&lt;/strong&gt; – Returns the average of number in a range selected. Is divides the total of a range with the number of entries in the selection.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Count&lt;/strong&gt; - Counts how many numbers there are in a given cell. Can be used to check for duplicates.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data validation&lt;/strong&gt; – a feature that restricts data that users can input in a cell ensuring consistency and accuracy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pivot tables and charts&lt;/strong&gt; – Pivot tables present summarized data, while pivot charts provide graphical visualizations of the said data for easier identification of trends and patterns. Both are used when creating dashboards.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Find and replace&lt;/strong&gt; – Find helps the user locate required data in the spreadsheet. While Replace allows one to change original data with new data where necessary.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reflection&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Approximately 402 million terabytes of data is generated every day. Even though Excel may not handle such huge datasets, excel remains to be a wonderful data analysis tool; knowledge in data preparation, analysis and visualization is crucial in drawing actionable insights from the data. Using features such as pivot tables and filters, it becomes easier to sift through large datasets to make summarized reports. Additionally, creating visually appealing dashboards make it easier for comprehension and pattern recognition – all keys for storytelling with data.&lt;br&gt;
Having a background in finance and accounting, Excel is a tool I’ve used before, however, during the past week of learning Excel, I’ve explored more of what it can do beyond statistical analysis I’m accustomed to–even more excited for how it will shape my data analytics journey.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>learning</category>
      <category>datascience</category>
      <category>data</category>
    </item>
  </channel>
</rss>
