# nicodv/kmodes

Python implementations of the k-modes and k-prototypes clustering algorithms, for clustering categorical data

Repository: https://github.com/nicodv/kmodes
Canonical: https://ross.abutalabs.com/products/kmodes
Language: Python
License: MIT
License Family: permissive
Topics: python, clustering-algorithm, k-modes, k-prototypes, scikit-learn
Last push: 2024-06-19T19:59:13+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4780, "days_push": 805, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1286, forks 412 (observed 2026-08-28T04:04:14.859791+00:00)

## What it is
A Python library implementing the k-modes and k-prototypes clustering algorithms for categorical and mixed numerical/categorical data. It follows the scikit-learn API and relies on numpy for performance.

## Use cases
- cluster categorical survey responses
- group customers by categorical attributes
- cluster mixed numeric and categorical data
- segment data without one-hot encoding
- apply k-modes clustering in a scikit-learn pipeline

## When to choose
- your dataset is mostly or entirely categorical features
- you want a scikit-learn-compatible clustering API
- you need k-prototypes for mixed data types

## When to avoid
- your data is purely numerical and k-means suffices
- you need very large-scale distributed clustering

## Facets
- artifact type: library
- maturity: stable
- function: machine-learning, data-science
- domain: machine-learning, data-science
- platform: python
- tags: clustering, k-modes, k-prototypes, categorical-data, scikit-learn, unsupervised-learning

## Member repositories
- nicodv/kmodes (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:14.859791+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:56:35.971084+00:00, confidence not recorded.
  - readme: https://github.com/nicodv/kmodes (fetched 2026-08-28T04:04:14.859791+00:00, sha 533578606269)
  - registry_pypi: https://pypi.org/pypi/kmodes/json (fetched 2026-08-29T12:12:17.940131+00:00, sha d509417f8a14)
- Data as of 2026-08-30T08:39:29.467469+00:00.
