<?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 Cheptoo</title>
    <description>The latest articles on Forem by Faith Cheptoo (@faith_cheptoo_799c7f28353).</description>
    <link>https://forem.com/faith_cheptoo_799c7f28353</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%2F3246934%2F40fbfc6c-2021-4482-925f-7df7353272d6.png</url>
      <title>Forem: Faith Cheptoo</title>
      <link>https://forem.com/faith_cheptoo_799c7f28353</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/faith_cheptoo_799c7f28353"/>
    <language>en</language>
    <item>
      <title>Unsupervised Learning: Clustering</title>
      <dc:creator>Faith Cheptoo</dc:creator>
      <pubDate>Sun, 14 Sep 2025 19:34:27 +0000</pubDate>
      <link>https://forem.com/faith_cheptoo_799c7f28353/unsupervised-learning-clustering-17af</link>
      <guid>https://forem.com/faith_cheptoo_799c7f28353/unsupervised-learning-clustering-17af</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Discovering hidden patterns&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Ever wondered how Spotify suggests playlists you didn't even know you would like? Or how online stores group similar products for you? That is where unsupervised learning comes in, and specifically, clustering.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What is Unsupervised Learning?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Unlike supervised learning, where a model is trained with labeled data, unsupervised learning works without labels. It analyses the data and tries to find patterns or structures on its own. Think of it like walking into a library for the first time. You notice some books are on the same shelf because of their topic, even if no one tells you.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;How Clustering Works&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Clustering is a method for grouping data points that are similar to one another.&lt;br&gt;
It is like having a basket of fruits: apples, oranges, and bananas. Without being told the categories, you might sort them by color or size. Clustering algorithms perform a similar function with data, automatically identifying groups that share common characteristics.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Popular Clustering Models&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Some common clustering techniques include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;K-Means: Divides data into a set number of clusters. Simple but effective.&lt;/li&gt;
&lt;li&gt;DBSCAN (Density-based spatial clustering of applications with noise): Detects clusters of any shape and identifies outliers. Great for messy data.&lt;/li&gt;
&lt;li&gt;Hierarchical Clustering: Builds a tree of clusters, which can be useful for understanding relationships.&lt;/li&gt;
&lt;/ul&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%2Fffyb99zdj4t58hhthazg.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%2Fffyb99zdj4t58hhthazg.png" alt="K-Means" width="800" height="309"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I first tried clustering on a dataset of students using an AI assistant and realized the choice of clusters mattered a lot. At first, the groups didn’t make sense, but after tuning parameters and visualizing the data, I uncovered meaningful patterns. Some students clustered together because they interacted heavily with prompts, while others barely used the system. Finally, I discovered patterns that were not obvious at first glance.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Why Clustering Matters&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Clustering can reveal hidden insights, guide decision-making, and even improve user experiences. Whether it’s grouping customers, students, or products, the ability to find structure in unlabeled data is incredibly powerful.&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>datascience</category>
      <category>ai</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Where to Trade off Type 1 and Type 2 Errors</title>
      <dc:creator>Faith Cheptoo</dc:creator>
      <pubDate>Sun, 31 Aug 2025 04:44:21 +0000</pubDate>
      <link>https://forem.com/faith_cheptoo_799c7f28353/where-to-trade-off-type-1-and-type-2-errors-f6j</link>
      <guid>https://forem.com/faith_cheptoo_799c7f28353/where-to-trade-off-type-1-and-type-2-errors-f6j</guid>
      <description>&lt;p&gt;&lt;strong&gt;A Medical Use Case&lt;/strong&gt;&lt;br&gt;
In medicine, decisions often involve uncertainty. Whether diagnosing a disease, interpreting test results, or determining a course of treatment, healthcare professionals must balance the risks of false positives and false negatives. Understanding this trade-off is crucial because it directly affects patient health, healthcare costs, and trust in the medical system.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;False Positives vs. False Negatives definitions&lt;/strong&gt;&lt;br&gt;
False Positive (Type I Error) – The test indicates a patient has the condition when they do not.&lt;br&gt;
False Negative (Type II Error) – The test indicates a patient does not have the condition when they do.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Medical Scenario:  Organ Compatibility Testing&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Type I Error (False Positive)&lt;/strong&gt;&lt;br&gt;
Concluding that the donor and recipient are compatible when they are not.&lt;br&gt;
Impact in transplantation: The organ is transplanted into a recipient who cannot properly accept it, leading to rejection, organ failure, or even death. This also wastes a precious donor organ.&lt;br&gt;
&lt;strong&gt;Type II Error (False Negative)&lt;/strong&gt;&lt;br&gt;
Concluding that the donor and recipient are not compatible when they are.&lt;br&gt;
Impact in transplantation: A perfectly good organ is rejected for use. The recipient remains on the waiting list, potentially losing their chance at life-saving surgery.&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%2Fmfjxhd79sz72w6969r6g.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%2Fmfjxhd79sz72w6969r6g.png" alt="Graph" width="800" height="546"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;A Critical Balancing Act&lt;/strong&gt;&lt;br&gt;
When an organ becomes available, time is short. Compatibility testing must be both fast and accurate. Doctors must balance two competing risks:&lt;br&gt;
• Transplant failure due to a false positive match.&lt;br&gt;
• Missed opportunity due to a false negative match.&lt;br&gt;
Because transplant failure is catastrophic for the patient and wastes an irreplaceable organ, minimizing Type I errors often takes priority. This means that testing criteria are strict; only highly certain matches proceed to surgery.&lt;br&gt;
However, if the criteria are too strict, more potential matches are wrongly rejected, increasing Type II errors and leaving more patients without transplants.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Strategies for Managing the Trade-off&lt;/strong&gt;&lt;br&gt;
Medical teams reduce both errors through:&lt;br&gt;
• Multiple layers of testing (blood typing, tissue typing, cross-matching) to confirm compatibility.&lt;br&gt;
• Rapid confirmatory testing to minimize false rejections.&lt;br&gt;
• Organ-sharing networks to reallocate rejected organs quickly to other patients.&lt;br&gt;
• Continuous refinement of matching algorithms using genetic and immunological data.&lt;br&gt;
&lt;strong&gt;When the Trade-off Shifts&lt;/strong&gt;&lt;br&gt;
The priority between avoiding Type I vs. Type II errors can change:&lt;br&gt;
• High-demand, rare donor situations: Avoiding Type I errors is crucial; losing one organ to a false positive could be devastating.&lt;br&gt;
• Abundant supply or high urgency cases: Thresholds may be slightly relaxed to reduce Type II errors and get more patients transplanted faster.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
In organ transplantation, the decisions are truly life-or-death. It might seem like the goal should simply be to “avoid all mistakes,” but in reality, every compatibility decision comes with trade-offs. By understanding what false positives and false negatives mean, transplant teams can set their testing standards in a way that both saves the most lives and protects the precious organs available&lt;/p&gt;

</description>
      <category>programming</category>
      <category>beginners</category>
      <category>learning</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Calculating the Win Probabilities of Premier League Teams(2024)</title>
      <dc:creator>Faith Cheptoo</dc:creator>
      <pubDate>Thu, 31 Jul 2025 08:28:20 +0000</pubDate>
      <link>https://forem.com/faith_cheptoo_799c7f28353/calculating-the-win-probabilities-of-premier-league-teams2024-ega</link>
      <guid>https://forem.com/faith_cheptoo_799c7f28353/calculating-the-win-probabilities-of-premier-league-teams2024-ega</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;em&gt;By Cheptoo Faith&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This analysis estimated the win probabilities of the Premier League teams using actual match data obtained from football-data.org. The article breaks down the step-by-step process of how the probabilities were obtained.&lt;br&gt;
&lt;u&gt;&lt;strong&gt;Step 1: Gathering the Match Data&lt;/strong&gt;&lt;/u&gt;&lt;br&gt;
This began by collecting real-time and historical data from the Football-Data.org API (&lt;a href="https://api.football-data.org/v4/competitions/PL/matches?season=2024" rel="noopener noreferrer"&gt;https://api.football-data.org/v4/competitions/PL/matches?season=2024&lt;/a&gt;), which provides detailed stats for every Premier League match. Using Python and the requests library, I sent a request to the API and retrieved data, including match status, team names, and final scores. This gave me the raw data needed for analysis.&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%2Fkj1s8uko3pha10zf3zm3.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%2Fkj1s8uko3pha10zf3zm3.png" alt="Step 1 Python code" width="800" height="162"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Step 2: Structuring the Data&lt;/strong&gt;&lt;/u&gt;&lt;br&gt;
After retrieving the match data, I used the pandas library to organize it into a structured DataFrame. I extracted key details from each match, including status, home and away teams, and final scores. These were stored in a list of dictionaries and then converted into a DataFrame for easier analysis and manipulation.&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%2Fw88kcj38uxsppve01f6x.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%2Fw88kcj38uxsppve01f6x.png" alt="Step 2 Python code" width="514" height="297"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Step 3: Calculating Win Probabilities&lt;/strong&gt;&lt;/u&gt;&lt;br&gt;
In this step, I calculated the win probability for each Premier League team based on the 2024 match data. For every team, I counted the number of matches they won both at home and away, then divided the total number of wins by the total number of games they played. The results were stored in a dictionary and converted into a DataFrame, sorted from the highest to the lowest win probability.&lt;br&gt;
&lt;strong&gt;Win Probability Formula&lt;/strong&gt;&lt;br&gt;
Win Probability = (Total Wins/Total Games Played)&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%2Fclae2k086his68qu8lo8.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%2Fclae2k086his68qu8lo8.png" alt="Step 3" width="800" height="546"&gt;&lt;/a&gt;​&lt;/p&gt;

</description>
      <category>python</category>
    </item>
    <item>
      <title>How Excel is used in Real-World Analysis</title>
      <dc:creator>Faith Cheptoo</dc:creator>
      <pubDate>Wed, 11 Jun 2025 05:02:07 +0000</pubDate>
      <link>https://forem.com/faith_cheptoo_799c7f28353/how-excel-is-used-in-real-world-analysis-pcm</link>
      <guid>https://forem.com/faith_cheptoo_799c7f28353/how-excel-is-used-in-real-world-analysis-pcm</guid>
      <description>&lt;p&gt;&lt;em&gt;By Faith&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WHAT IS EXCEL?&lt;/strong&gt;&lt;br&gt;
Excel is a powerful spreadsheet program developed by Microsoft that plays a huge role in today's data-driven world. It helps in organizing data, formatting information, performing calculations, and generating insights from the data. Excel helps us make sense of numbers and turn raw data into meaningful information that can be used in decision-making.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;USE IN REAL-WORLD DATA ANALYSIS&lt;/strong&gt;&lt;br&gt;
Excel is used in various sectors in the world today, including:&lt;br&gt;
&lt;strong&gt;1. Business Analysis&lt;/strong&gt;&lt;br&gt;
Its uses include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Tracking of sales by comparing monthly trends and forecasting future revenue.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Management of Inventory by managing the stock levels and the product turnover rates.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Financial planning by managing the budget through expense tracking and profit/loss calculation.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Marketing Performance&lt;/strong&gt;&lt;br&gt;
Uses of Excel in marketing performance include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Analysis of Campaign: Marketers track their campaigns that brought in more sales and clicks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Social media Metrics Analysis: Excel is used to analyze the growth in followers, engagement rates, and the reach across social media platforms.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Health care&lt;/strong&gt;&lt;br&gt;
Excel is used in the healthcare systems in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Patient record management: It is used to organize patient information, visit patient history, medication log, and lab results.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Data Cleaning for Research- Health researchers use Excel to clean and prepare data before statistical analysis.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Hospital Operations: Excel is used to track resource usage, such as supplies over time, and analyze patient treatment success rates.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Excel Features/Formulas&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. LOOKUP FUNCTIONS (for example, VLOOKUP AND HLOOKUP)&lt;/strong&gt; &lt;br&gt;
VLOOKUP is used to search for a specific value in a large table and return related data. For example, in a hospital dataset, we could use it to find a patient’s treatment plan by searching their ID.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.LOGICAL FUNCTION (IF Function)&lt;/strong&gt;&lt;br&gt;
The IF formula is really helpful when analyzing performance. For instance, in marketing data, we can create a column that flags whether a product’s discount is “High” or “Low” based on a set percentage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.PIVOT TABLES&lt;/strong&gt;&lt;br&gt;
Pivot tables allow us to summarize large datasets quickly. We can use them to find average sales per region or average ratings by product category, without writing complex formulas.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PERSONAL REFLECTION&lt;/strong&gt;&lt;br&gt;
Before learning Excel, I used to see data as just “a lot of numbers.” Now, I see it as a place of stories and insights, and Excel is the tool that helps in finding them. Whether I’m analyzing healthcare records, marketing performance, or product reviews, Excel has made it possible to organize the mess, spot patterns, and draw real conclusions. It’s made me more confident and curious about working with data.&lt;/p&gt;

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