<?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: Steve</title>
    <description>The latest articles on DEV Community by Steve (@stevemureithi).</description>
    <link>https://dev.to/stevemureithi</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%2F3257889%2Fe06de885-7c41-43c4-a45f-d24971b48a5f.png</url>
      <title>DEV Community: Steve</title>
      <link>https://dev.to/stevemureithi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/stevemureithi"/>
    <language>en</language>
    <item>
      <title>Supervised Learning and Classification in Machine Learning: My Perspective</title>
      <dc:creator>Steve</dc:creator>
      <pubDate>Sun, 24 Aug 2025 20:59:11 +0000</pubDate>
      <link>https://dev.to/stevemureithi/supervised-learning-in-machine-learning-a-beginners-perspective-on-classification-5fnh</link>
      <guid>https://dev.to/stevemureithi/supervised-learning-in-machine-learning-a-beginners-perspective-on-classification-5fnh</guid>
      <description>&lt;p&gt;Understanding the concepts underpinning machine learning is critical as technological advances provide access to tools professionals can deploy to facilitate decision-making.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is Supervised Learning?
&lt;/h1&gt;

&lt;p&gt;Simply put, supervised learning involves teaching a model using labeled data for later use in predicting the labels for new data.&lt;br&gt;
Labeled data comprises raw data with added features or informative labels that provide information that is the basis for training an ML model. The labels provide context for the model to learn the underlying patterns to help it correctly predict a certain output based on new data fed into the model. This process is known as &lt;strong&gt;model training&lt;/strong&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Understanding Classification in Supervised Learning
&lt;/h1&gt;

&lt;p&gt;Supervised learning comprises two broad techniques: &lt;strong&gt;Classification&lt;/strong&gt; and &lt;strong&gt;Regression&lt;/strong&gt;.&lt;br&gt;
&lt;strong&gt;Classification&lt;/strong&gt; deals with data assigned to specific categories or classes, unlike regression, which deal with numerical data to make predictions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Types of Classification with Examples
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Binary classification&lt;/strong&gt;- Sorts data into two categories or classes. For instance, email spam filtering ("Spam" or "Not Spam").&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multiclass classification&lt;/strong&gt; - Sorts data into more than two classes or categories. For example, an image recognition model classifying images using labels such as bus, car, and motorcycle.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multilabel classification&lt;/strong&gt; - Sorts data into multiple labels. For instance, content recommendation algorithms that classify a song title into multiple genres.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The most popular classification algorithms include &lt;strong&gt;logistic regression&lt;/strong&gt;, &lt;strong&gt;decision tree&lt;/strong&gt;, &lt;strong&gt;random forest&lt;/strong&gt;, and &lt;strong&gt;K-nearest neighbors (KNN)&lt;/strong&gt;. Each model suits certain scenarios and data to provide useful predictions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Notes on Effectively Applying Supervised Learning &amp;amp; My Perspective on Classification
&lt;/h2&gt;

&lt;p&gt;Providing the labeled input data provides a reference point for the model to associate the data with a certain predicted output. Therefore, the model's prediction acuity is as good as the data one feeds into it. A model trained using incomplete, biased, or incorrectly labeled data will yield unreliable results. Such a model cannot achieve the same degree of prediction accuracy as one relying on clean data. Data cleaning and preprocessing can help detect anomalies before model training to optimize the model and improve reliability.&lt;/p&gt;

&lt;p&gt;Learning about classification and its use cases in real-world applications of supervised learning has been enlightening. However, encountering near-perfect datasets to apply classification was a major challenge, given that overfitting contributes to biased conclusions when predictions of overly perfect data are used in decision-making. Practicing applying metrics such as accuracy, precision, recall, F1 score, and the confusion matrix will be crucial going forward.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Predicting Champions League Winner Using Python</title>
      <dc:creator>Steve</dc:creator>
      <pubDate>Thu, 31 Jul 2025 20:53:46 +0000</pubDate>
      <link>https://dev.to/stevemureithi/predicting-champions-league-winner-using-python-3h1e</link>
      <guid>https://dev.to/stevemureithi/predicting-champions-league-winner-using-python-3h1e</guid>
      <description>&lt;h3&gt;
  
  
  Project Background
&lt;/h3&gt;




&lt;p&gt;Venturing into Data Science this past few weeks has exposed me to various tools and concepts that can transform how we think about data, process it, and utilize insights to make decisions or form conclusions about a specific variable or element. Seeing how application programming interface (API) work was enlightening on the tools available for retrieving and making sense of data.&lt;/p&gt;

&lt;p&gt;The week's task was to extract data from &lt;a href="https://www.football-data.org/" rel="noopener noreferrer"&gt;https://www.football-data.org/&lt;/a&gt; to determine the probabilities of each team in the Premier League winning the cup. The API nested in the site is a goldmine for football enthusiasts (I don't consider myself one) looking to scrape data and analyze matches and teams for various competitions across the major football leagues.&lt;/p&gt;




&lt;h3&gt;
  
  
  Libraries Imported
&lt;/h3&gt;

&lt;p&gt;Tools utilized during this exercises included:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Python&lt;/li&gt;
&lt;li&gt;Libraries&lt;/li&gt;
&lt;li&gt;pandas (data manipulation)&lt;/li&gt;
&lt;li&gt;requests (for API calls) &lt;/li&gt;
&lt;li&gt;python-dotenv for secure API key handling)&lt;/li&gt;
&lt;li&gt;matplotlib and seaborn (visualizations) and &lt;/li&gt;
&lt;li&gt;scipy.stats (handling probability distributions)&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Data Extraction Process
&lt;/h3&gt;

&lt;p&gt;The code kicked off with setting up the libraries&lt;br&gt;
&lt;code&gt;import requests&lt;br&gt;
import os&lt;br&gt;
from dotenv import load_dotenv&lt;br&gt;
import pandas as pd&lt;br&gt;
import matplotlib.pyplot as plt&lt;br&gt;
import seaborn as sns&lt;br&gt;
import scipy.stats as stats&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Connecting to the /v4/competitions/PL/standings?season=2024 endpoint using the API key&lt;br&gt;
Fetch data from API&lt;br&gt;
response = requests.get(url, headers=headers)&lt;/p&gt;

&lt;h2&gt;
  
  
  data = response.json()
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Probability Formula
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;def calculate_win_probability_poisson(wins, played, remaining):&lt;br&gt;
    if played == 0:&lt;br&gt;
             win_rate = 0.3&lt;br&gt;
    else:&lt;br&gt;
        win_rate = wins / (played + 1e-6) &lt;br&gt;
    expected_wins = win_rate * remaining + wins&lt;br&gt;
        prob = 1 - stats.poisson.cdf(24, expected_wins)&lt;/code&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%2Fdwn8jquis9h518k9yhv9.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%2Fdwn8jquis9h518k9yhv9.png" alt=" " width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  A Note on API Keys
&lt;/h3&gt;

&lt;p&gt;A crucial insight gained from the exercise was the importance of using .env files to store API keys securely. These files are loaded via python-dotenv to enhance security by keeping sensitive data out of the public domain, where files are shared in public repositories.&lt;/p&gt;

</description>
      <category>python</category>
      <category>datascience</category>
      <category>statistics</category>
    </item>
    <item>
      <title>Application of Measures of Central Tendency in Data Science</title>
      <dc:creator>Steve</dc:creator>
      <pubDate>Tue, 22 Jul 2025 21:02:28 +0000</pubDate>
      <link>https://dev.to/stevemureithi/application-of-measures-of-central-tendency-in-data-science-2b10</link>
      <guid>https://dev.to/stevemureithi/application-of-measures-of-central-tendency-in-data-science-2b10</guid>
      <description>&lt;p&gt;The three common measures of central tendency are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Mean&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Mode&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Median&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;1. Mean&lt;/strong&gt;&lt;br&gt;
The mean of a dataset is the average- derived by summing all values then dividing by the number of values.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Case in Data Science:&lt;/strong&gt;&lt;br&gt;
The mean can be used to find indicators such as average consumer spending, average products sold, average cost of products, to inform sales and marketing decisions.&lt;br&gt;
Note: Outliers affect the mean of a dataset, thus one should check their data for the same to identify the potential of obtaining skewed data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Mode&lt;/strong&gt;&lt;br&gt;
The mode is the most frequently occurring value(s) in a dataset.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Case in Data Science:&lt;/strong&gt;&lt;br&gt;
The mode reveals patterns in data that a data scientist or analyst can use to make conclusions about certain element. For instance, the mode in a dataset of sales would reveal the most sold product a business and aid business intelligence analysts in identifying the contribution of the product to their turnover.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Median&lt;/strong&gt;&lt;br&gt;
This is the middle value of a dataset when the data is ordered, typically in ascending order.&lt;br&gt;
&lt;strong&gt;Use Case in Data Science:&lt;/strong&gt;&lt;br&gt;
The median can help in evaluating elements such as household income and educational attainment during household surveys. This helps retrieve a representative figure that policy makers can base their planning and development decisions.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Exploring Microsoft Excel's Features</title>
      <dc:creator>Steve</dc:creator>
      <pubDate>Wed, 11 Jun 2025 12:57:38 +0000</pubDate>
      <link>https://dev.to/stevemureithi/exploring-microsoft-excels-features-10fd</link>
      <guid>https://dev.to/stevemureithi/exploring-microsoft-excels-features-10fd</guid>
      <description>&lt;p&gt;We have all heard of the versatility of Microsoft Excel, whether from colleagues, friends, or acquaintances using this invaluable tool to make sense of raw data. But what exactly does Microsoft Excel do? &lt;br&gt;
Microsoft Excel is a powerful tool that enables users to organize, analyze, and visualize data to meet the needs of the user and the target audience for insights from data. From simple calculations like addition, subtraction, and multiplication using small data, creating pivot tables, to complex financial modelling, Excel can help one unpack insights from data.&lt;/p&gt;

&lt;p&gt;Excel offers real-world utility to professionals from diverse fields. Management can base their business decisions on Excel output data after analyzing sales trends, demand forecasts, and inventory levels for effective resource planning and utilization.&lt;br&gt;
Excel helps accounting and finance professionals do financial reporting by preparing and unpacking financial statements and budgets. They can use the tool to make calculations, develop reports for top management and shareholders.&lt;br&gt;
Excel is also useful to marketers for tracking key metrics at the core of marketing strategies. Customer engagement, ratings and satisfaction scores for different products are examples of elements marketers can analyze using Excel.&lt;/p&gt;

&lt;p&gt;Since beginning to learn Excel as a beginner, I have picked up on different features that are important when handling data. I will examine the three that have stuck out for me so far. These are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Conditional Formatting: 
Conditional formatting reveals and highlights important values based on the users’ needs. These include values across a certain range, the top most and bottom values ina dataset and highlighting duplicate values.&lt;/li&gt;
&lt;li&gt; VLOOKUP: 
This function helps one retrieve data by allowing you to search for a certain value in a table and returns the value in the desired column in the same row.&lt;/li&gt;
&lt;li&gt; IF Function: 
This function enables one to extract only the desired data with conditions or criteria the data user has set. One must assign the value Excel returns if a condition is true and another value if it’s false.
Using Excel has enabled me to unpack different insights from data based on what I want to achieve. Using Excel may be daunting at first, but I understood how each function or feature works and tied it to my data analysis needs and expectations.&lt;/li&gt;
&lt;/ol&gt;

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