K-Means groups nearby records within a feature space and represents each group through a centroid. For customer segmentation, the starting point is behaviour measured over a defined period, not an intuitively labelled list of people. The output describes similarities in selected fields; it does not establish a customer's identity, intention or intrinsic value.

A business can use groups to understand patterns in records and prepare actions evaluated separately. The analysis must name its data, period and purpose. A compact group in a drawing does not, by itself, demonstrate that an offer will be accepted or that a promotion channel will become profitable after it is used.

We use six invented points with two abstract features without commercial units. Calculations and diagrams are original, not business statistics, customer data or WebHat results. Authentic photographs illustrate customer support and infrastructure; the team and systems shown are not WebHat clients, segmented data or an implementation of the demonstration.

Customer support team wearing headsets in an office
Mikhail Nilov

What is K-Means, and what does segmentation without labels mean?

Groups are calculated from the selected representation

Within the map of artificial intelligence types, clustering explores structure in data. K-Means uses a configured number of groups and distances to centres. It does not automatically receive commercial definitions such as “loyal customer” or “will purchase”; these are different claims requiring an appropriate definition and evaluation for the business question.

Mechanism: assignment and update

  1. Representation

    Define fields, observation period and data transformation.

  2. Initialisation

    Choose cluster count and starting centres.

  3. Assignment

    Each point goes to its nearest centre.

  4. Update

    Recalculate centres as means and repeat under the stopping rule.

Original conceptual diagram for the basic variant. Groups arise from selected data and objective, not natural customer identities.

The guide to supervised and unsupervised learning distinguishes known targets from structure exploration. Having no class labels does not mean having no preparation. Selecting accounts, fields and transformations directly influences the groups. The analyst should be able to explain why this information is relevant to the business problem rather than simply available in a database.

Our proposal analyses company accounts rather than personal characteristics of employees or customers. We might compare observed commercial activity within the same time window. New or inactive cases follow explicit rules. Do not automatically assign a negative interpretation merely because an account has few available records or has been observed for less time than another.

Which data should we select for customer segmentation?

The unit of analysis and period come before the algorithm

Establish whether a row represents a company, account, order or interaction. These units are not interchangeable. If the same company appears repeatedly without a rule, it may influence analysis differently from one with a single record. Document consolidation and exceptions before calculating groups, so that record duplication is not mistaken for meaningful commercial activity.

Proposed fields might describe operation count and an aggregate value over a defined period. Specify inclusion of cancellations, returns, incomplete operations and different currencies. A mean without a denominator definition can conceal a record-keeping problem. Missing information and no activity mean different things and should not automatically receive the same numerical representation within the analysis.

A new account has less observation time than an older one. Comparing them requires a purpose-appropriate rule rather than a moral or commercial label improvised after clusters appear. Retain aggregation provenance, time and version. If record-keeping rules change, check their effect before interpreting a difference as a change in customer behaviour or the commercial relationship.

Also define the date up to which information was available. A late-recorded operation may subsequently change aggregates for the same period. The report retains the version calculated at the time and identifies the additional import rather than presenting the difference as a confirmed customer change. This discipline supports comparing analyses and explaining groups without manually reconstructing every export from business records.

How do assignment and centroid updates work?

A centre is a mean in the analysed space, not an actual customer

In scikit-learn's basic explanation of Lloyd's algorithm, begin with initial centres. Assign points to their nearest centre, recalculate each group's means and repeat under the stopping condition. Proximity is Euclidean in this variant, and the objective uses squared distances. Centroids can have coordinates absent from every record. They are not automatically representative customers to contact.

Initialisation, cluster count and stopping are distinct choices. Different starts can produce different solutions, so comparison should not rely on one favourable picture. Repeated initialisation is a control to evaluate rather than automatic proof of a global optimum. Retain the effective configuration and the conditions under which it was calculated, including the data version.

Unlike KNN classification and regression, k here means cluster count rather than the number of neighbours with known targets. K-Means organises points around centres; KNN aggregates targets from nearby examples. Sharing a letter in their names makes neither the methods nor their objectives equivalent for a business application.

What does a calculated six-point example look like?

Fictional coordinates make every mean verifiable

Select two initial centres, (1,1) and (7,7), with equal point weights. The six coordinates below are not taken from a model, real transactions or a normalised export. We invented them to follow distances and updates. Both axes have the same scale, and centroids are marked separately from data points within the original diagram.

Invented points and updated centroids

Abstract unitless axes: x → and y ↑, from 0 to 10.

  1. A/B/C group: A=(1,1), B=(1,3), C=(2,2). Centre=(4/3,2).
  2. D/E/F group: D=(7,7), E=(8,8), F=(9,7). Centre=(8,22/3).
Original diagram. Letters, coordinates and shapes complement colour. Fractional centre positions are drawn proportionally; the data is invented, not actual segments or predictions.

The first assignment groups A/B/C and D/E/F. Calculate each centre coordinate as its group's mean, then check proximity again. Assignment does not change after the update in this example. That property of these six points does not establish a suitable cluster count for an actual commercial database or business segmentation project.

Centroids calculated from the six invented points

  1. A/B/C group

    Mean x = 4/3 ≈ 1.333; mean y = 2.

  2. D/E/F group

    Mean x = 8; mean y = 22/3 ≈ 7.333.

  3. Geometric objective

    Squared-distance sum falls from 12 to 16/3 ≈ 5.333.

  4. Repeated assignment

    With updated centres, these two groups stay unchanged in this example.

Independent calculation on fictional data with equal weights. The objective is not percent correct, revenue or performance achieved by WebHat.

The sum of squared distances to centres is 12 at the selected start and 16/3 after the update. The decrease expresses a geometric objective for the same points and scale. It is not sales growth, a percentage of correctly classified customers or a metric automatically comparable with another dataset or representation.

Why does data scale change segmentation?

Numerical proximity depends on units and transformations

A field expressed through much larger numerical values can dominate a directly calculated distance. Scikit-learn's scaling material explains this effect. Do not treat numerical dominance as commercial priority. Select and evaluate representation according to the useful question, retaining units and transformations in documentation rather than assuming every available field deserves the same unexamined treatment.

For exploratory analysis, describe the exact set and transformation used. For later assignment of new accounts, retain the fitted transformation and the active version's centres. Refitting scale independently for every input changes coordinate meaning. When evaluating on separate data, fit transformations in a way that respects that particular evaluation protocol rather than consulting the test.

Do not automatically combine aggregates from different periods or currencies. Changing a unit can move points without a real behavioural change. Data controls should identify the conversion and its version. Segment explanations name the fields actually used rather than assume every CRM column contributes relevant information or that a larger feature collection necessarily improves interpretation.

How do we choose the number of clusters?

A geometric criterion does not replace the analysis objective

Cluster count is a configuration choice, not a natural identity automatically discovered for every population. Compare options using data criteria and interpretive usefulness. More centres permit finer partitioning of the space; a lower geometric objective alone does not justify a more complicated commercial scheme that is harder for the team to operate or understand.

Silhouette analysis examines cohesion and separation in the selected representation. Scikit-learn documents the indicator on a range from −1 to 1. Use it as one part of review, not evidence of people with certain intentions. A favourable score alone does not establish which offer should be sent or whether an action will have the intended effect.

Retain every group's size and description, including alternatives that are difficult to interpret. If segments exist only to fill a report, revisit the requirement. Explain which analytical decision the final grouping supports and which checks are needed before the output is used operationally, instead of selecting attractive cluster names after viewing the result.

What limitations involve cluster shape and initialisation?

The K-Means objective favours particular geometric arrangements

Primary materials on limitations discuss problems with elongated groups or differing dispersion. This does not mean every dataset must contain equally sized groups before the algorithm can run. Examine the resulting shape and interpretation without imposing the commercial story we would like the data to tell or treating a preferred diagram as the reference truth.

Compare starts and alternatives on the same defined set. A group can receive a different identifier after refitting; its numerical label is not a rank. When comparing versions, examine group correspondence and changing characteristics rather than label equality alone. An account may appear to have entered a “new” segment solely because the labels were renumbered.

Records very different from the rest deserve examination under a data rule: an error, valid rare case or another defined situation. Do not automatically remove them to make a drawing prettier. If the method's geometry does not suit the problem, compare appropriate approaches with the same question and clear criteria rather than change interpretation to conceal the mismatch.

Monitor and keyboard on a workstation beside server racks
Brett Sayles

How do we name segments without inventing conclusions?

Describe observed fields rather than personal intentions

A group name should be supported by analysed variables and period. “Frequent activity during the observed interval” differs from “will definitely purchase”. The first can be connected to a data definition; the second predicts the future. Do not use persuasive naming to turn clustering into an output that was never evaluated for that purpose.

Comparing with decision trees and learned rules helps distinguish objectives. If the aim is to estimate a known target, design and evaluate that task separately. Do not call a cluster a correct class merely because a commercial category seems to fit some of its records or provides a convenient explanation.

Retain relevant distributions rather than means alone. A centroid does not show every difference between accounts within its group. Operators should be able to inspect aggregate criteria without unjustified access to complete files. Review interpretation with people who understand the process, retaining their observations separately from the model calculations and the labels assigned by software.

How do we evaluate the grouping's business usefulness?

Separate geometry, stability and the effect of an action

The proposed evaluation checks coherence within the selected representation and changes under relevant data variations. Examine coverage too: which accounts were included, excluded or had insufficient information. These conditions belong alongside results rather than hidden in a technical note detached from commercial conclusions and any subsequent proposal based on a particular segment.

Four checks, not one segmentation score

  1. Geometry

    Examine distances and separation in the selected representation.

  2. Stability

    Compare initialisations and relevant data changes.

  3. Interpretation

    Describe aggregate fields without invented commercial labels.

  4. Use

    Check whether the proposed action produces a separately measured outcome.

Original evaluation framework. Good geometric separation does not establish individual intent or campaign profitability.

For AI in marketing and outcome measurement, grouping and action are separate stages. A segment-based campaign is evaluated under its own protocol: permitted recipients, message, cost and a defined outcome. A clustering metric is not a substitute for measuring leads, orders or customer relationships after the action takes place.

If future-account assignment is the objective, test that use separately with information available at the relevant time. If the objective is archive exploration, describe that archive without claiming the same prospective result. Protocol selection follows the question; one automatic split cannot resolve every unsupervised analysis or establish that groups will remain useful under later conditions.

How do we introduce segments into a CRM?

In the proposed interface, a group appears with its period, configuration and relevant aggregate characteristics. Retain version history instead of silently rewriting old labels. A manager's commercial interpretation has a separate author and reason from the calculated identifier. Calculations and human decisions can then be reviewed independently rather than combined into one apparently objective field.

From a calculated group to a CRM function

  1. Permitted data

    Select accounts, fields and observation window.

  2. Fixed model

    Retain transformation, centroids and version.

  3. Contextual output

    Display the group and relevant aggregate characteristics.

  4. Review

    The team separately approves a proposed action.

  5. Measurement

    Track the action's effect and changes in data.

Proposed workflow, not a client project. Group membership grants no consent, additional access or permission to change a commercial relationship.

Managing data within an AI application includes permitted fields, access and retention. Group membership is not contact consent or authority to change a contract. The application checks the action's rule separately before sending, saving or changing a commercial relationship, regardless of whether the account was assigned to an attractive segment.

Also define states without an accepted assignment: incompatible input, insufficient information or an unavailable service. A mathematically nearest centre does not automatically establish operational relevance. A late result remains connected to its request and version rather than to the account an operator opened in the meantime, keeping records and proposed actions associated correctly.

How can WebHat integrate useful segmentation?

A custom CRM for companies can organise authorised data, grouping versions and proposal review. Begin with what should be understood or decided, not an obligation to add an algorithm. Explicit rule-based segmentation can provide a useful reference when compared with grouping calculated from the available data and selected representation.

A business dashboard with automated reports separates observed distributions, interpretations and action effects. Retain the period, population and fields so figures remain comparable. The project defines who reviews changes and when recalculation may become the application's active version rather than silently changing the meaning of a report already used by the team.

Prepare the unit of analysis, available fields, period and commercial question for the first discussion. Use demonstrative examples before accessing real records. The pilot examines interpretation and operation on permitted data against clear acceptance criteria, not merely the production of coloured-point graphics and appealing segment names that have no defined operational use.

Frequently asked questions about K-Means customer segmentation

Is K-Means the same algorithm as KNN?

K-Means forms groups around centres; KNN aggregates neighbour targets for a new input. The number k has different roles. Select a method according to task and data, not similar names or the fact that both methods can be illustrated with point diagrams.

Are centroids representative customers in the database?

They are feature-space means and can have coordinates absent from any record. They do not automatically identify people or companies to contact. Interpretation retains units, transformation and the definition of accounts included in the analysis rather than treating the centre as an actual customer profile.

Does the algorithm find the correct segment count by itself?

Cluster count is configured. Compare alternatives using data criteria, stability and usefulness for the objective. Neither a lower geometric objective nor a single separation score independently establishes the commercial scheme appropriate for the business or the actions that should follow it.

Must groups have equal sizes?

Equal case counts are not a general requirement. Shape, dispersion and representation influence results. Check whether the calculated grouping supports analysis without forcing data to match a symmetrical partition in a presentation or treating visually balanced clusters as the only acceptable outcome.

Does a segment establish who will definitely buy?

A cluster describes proximity within analysed fields. Future intent and campaign effects are different questions evaluated separately. An appealing label does not transform clustering into a validated prediction or permission to contact a customer, send an offer or change the commercial relationship.

Can we update CRM segments automatically?

Define a controlled workflow with explicit data, transformations, versions and activation conditions. Recalculation and commercial actions remain separate. Retain history and required checks before a new output changes records or communications rather than allowing every numerical update to trigger operational effects by default.