Close Menu
    Trending
    • Revisiting Benchmarking of Tabular Reinforcement Learning Methods
    • Is Your AI Whispering Secrets? How Scientists Are Teaching Chatbots to Forget Dangerous Tricks | by Andreas Maier | Jul, 2025
    • Qantas data breach to impact 6 million airline customers
    • He Went From $471K in Debt to Teaching Others How to Succeed
    • An Introduction to Remote Model Context Protocol Servers
    • Blazing-Fast ML Model Serving with FastAPI + Redis (Boost 10x Speed!) | by Sarayavalasaravikiran | AI Simplified in Plain English | Jul, 2025
    • AI Knowledge Bases vs. Traditional Support: Who Wins in 2025?
    • Why Your Finance Team Needs an AI Strategy, Now
    AIBS News
    • Home
    • Artificial Intelligence
    • Machine Learning
    • AI Technology
    • Data Science
    • More
      • Technology
      • Business
    AIBS News
    Home»Machine Learning»Clustering in Machine Learning: A journey through the K-Means Algorithm | by Divakar Singh | Mar, 2025
    Machine Learning

    Clustering in Machine Learning: A journey through the K-Means Algorithm | by Divakar Singh | Mar, 2025

    Team_AIBS NewsBy Team_AIBS NewsMarch 19, 2025No Comments3 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
    Share
    Facebook Twitter LinkedIn Pinterest Email


    Ok-means is a knowledge clustering method for unsupervised machine studying that may separate unlabeled knowledge right into a predetermined variety of disjoint teams of equal variances — clusters — based mostly on their similarities.

    It’s a preferred algorithm because of its ease of use and pace on giant datasets. On this weblog submit, we have a look at its underlying rules, use circumstances, in addition to advantages and limitations.

    Ok-means is an iterative algorithm that splits a dataset into non-overlapping subgroups which can be known as clusters. The variety of clusters created is decided by the worth of okay — a hyperparameter that’s chosen earlier than operating the algorithm.

    First, the algorithm selects okay preliminary factors, the place okay is the worth supplied to the algorithm.

    Every of those serves as an preliminary centroid for a cluster — an actual or imaginary level that represents a cluster’s middle. Then one another level within the dataset is assigned to the centroid that’s closest to it by distance.

    After that, we recalculate the places of the centroids. The coordinate of the centroid is the imply worth of all factors of the cluster. You need to use totally different imply capabilities for this, however a generally used one is the arithmetic imply (the sum of all factors, divided by the variety of factors).

    As soon as we have now recalculated the centroid places, we are able to readjust the factors to the clusters based mostly on distance to the brand new places.

    The recalculation of centroids is repeated till a stopping situation has been happy.

    Some frequent stopping circumstances for k-means clustering are:

    • The centroids don’t change location anymore.
    • The info factors don’t change clusters anymore.
    • Lastly, we are able to additionally terminate coaching after a set variety of iterations.

    To sum up, the method consists of the next steps:

    1. Present the variety of clusters (okay) the algorithm should generate.
    2. Randomly choose okay knowledge factors and assign every as a centroid of a cluster.
    3. Classify knowledge based mostly on these centroids.
    4. Compute the centroids of the ensuing clusters.
    5. Repeat the steps 3 and 4 till you attain a stopping situation.

    The tip results of the algorithm depends upon the variety of сlusters (okay) that’s chosen earlier than operating the algorithm. Nevertheless, choosing the proper okay could be laborious, with choices various based mostly on the dataset and the person’s desired clustering decision.

    The smaller the clusters, the extra homogeneous knowledge there may be in every cluster. Growing the okay worth results in a lowered error price within the ensuing clustering. Nevertheless, an enormous okay also can result in extra calculation and mannequin complexity. So we have to strike a steadiness between too many clusters and too few.

    The most well-liked heuristic for that is the elbow method.

    Beneath you possibly can see a graphical illustration of the elbow technique. We calculate the variance explained by totally different okay values whereas on the lookout for an “elbow” — a price after which greater okay values don’t affect the outcomes considerably. This would be the greatest okay worth to make use of.

    Mostly, Inside Cluster Sum of Squares (WCSS) is used because the metric for defined variance within the elbow technique. It calculates the sum of squares of distance from every centroid to every level in that centroid’s cluster.

    So, that was the gist of clustering and the way clustering could be executed by means of the Ok-means algorithm. I hope I used to be capable of provide you with a basic introduction of one of many easiest unsupervised studying strategies. Thanks to your time. Hope you loved this text. 😁



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleReddit Becomes a Lifeline for Federal Workers Scared of Losing Their Jobs
    Next Article Powering the food industry with AI
    Team_AIBS News
    • Website

    Related Posts

    Machine Learning

    Is Your AI Whispering Secrets? How Scientists Are Teaching Chatbots to Forget Dangerous Tricks | by Andreas Maier | Jul, 2025

    July 2, 2025
    Machine Learning

    Blazing-Fast ML Model Serving with FastAPI + Redis (Boost 10x Speed!) | by Sarayavalasaravikiran | AI Simplified in Plain English | Jul, 2025

    July 2, 2025
    Machine Learning

    From Training to Drift Monitoring: End-to-End Fraud Detection in Python | by Aakash Chavan Ravindranath, Ph.D | Jul, 2025

    July 1, 2025
    Add A Comment
    Leave A Reply Cancel Reply

    Top Posts

    Revisiting Benchmarking of Tabular Reinforcement Learning Methods

    July 2, 2025

    I Tried Buying a Car Through Amazon: Here Are the Pros, Cons

    December 10, 2024

    Amazon and eBay to pay ‘fair share’ for e-waste recycling

    December 10, 2024

    Artificial Intelligence Concerns & Predictions For 2025

    December 10, 2024

    Barbara Corcoran: Entrepreneurs Must ‘Embrace Change’

    December 10, 2024
    Categories
    • AI Technology
    • Artificial Intelligence
    • Business
    • Data Science
    • Machine Learning
    • Technology
    Most Popular

    ViT from scratch. Foreword | by Tyler Yu | May, 2025

    May 9, 2025

    Why Are Convolutional Neural Networks Great For Images?

    May 1, 2025

    A real-life flying car takes to the skies

    February 23, 2025
    Our Picks

    Revisiting Benchmarking of Tabular Reinforcement Learning Methods

    July 2, 2025

    Is Your AI Whispering Secrets? How Scientists Are Teaching Chatbots to Forget Dangerous Tricks | by Andreas Maier | Jul, 2025

    July 2, 2025

    Qantas data breach to impact 6 million airline customers

    July 2, 2025
    Categories
    • AI Technology
    • Artificial Intelligence
    • Business
    • Data Science
    • Machine Learning
    • Technology
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
    • About us
    • Contact us
    Copyright © 2024 Aibsnews.comAll Rights Reserved.

    Type above and press Enter to search. Press Esc to cancel.