Skip to content

Instantly share code, notes, and snippets.

View neelakanta's full-sized avatar

Mahesh Neelakanta neelakanta

View GitHub Profile
@neelakanta
neelakanta / kernel_kmeans.py
Last active September 29, 2025 16:02 — forked from mblondel/kernel_kmeans.py
Kernel K-means.
"""Kernel K-means"""
# Author: Mathieu Blondel <mathieu@mblondel.org>
# License: BSD 3 clause
import numpy as np
from sklearn.base import BaseEstimator, ClusterMixin
from sklearn.metrics.pairwise import pairwise_kernels
from sklearn.utils import check_random_state