File tree Expand file tree Collapse file tree 4 files changed +7
-9
lines changed
Expand file tree Collapse file tree 4 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 44Clustering with KMedoids and Common-nearest-neighbors
55=====================================================
66.. _k_medoids :
7- .. currentmodule :: sklearn_extra.cluster
87
98K-Medoids
109=========
1110
11+ .. currentmodule :: sklearn_extra.cluster
1212
1313:class: `KMedoids ` is related to the :class: `KMeans <sklearn.cluster.KMeans> ` algorithm. While
1414:class: `KMeans <sklearn.cluster.KMeans> ` tries to minimize the within cluster sum-of-squares,
Original file line number Diff line number Diff line change 33==================================================
44Kernel map approximation for faster kernel methods
55==================================================
6- .. _kernel_approximation :
76
87.. currentmodule :: sklearn_extra.kernel_approximation
98
Original file line number Diff line number Diff line change 44KMedoids Demo
55=============
66
7- KMedoids clustering of data points. The goal is to find medoids than minimize the
8- sum of absolute distance to the closest medoid. A medoid is a point of the dataset.
9- Read more in the :ref:`User Guide
10- <_k_medoids>`.
7+ KMedoids clustering of data points. The goal is to find medoids than minimize
8+ the sum of absolute distance to the closest medoid. A medoid is a point of the
9+ dataset. Read more in the :ref:`User Guide <_k_medoids>`.
1110
1211"""
1312import matplotlib .pyplot as plt
3130cobj = KMedoids (n_clusters = 3 ).fit (X )
3231labels = cobj .labels_
3332
34- ############################################################"""
33+ ##############################################################
3534# Plot results
3635unique_labels = set (labels )
3736colors = [
Original file line number Diff line number Diff line change 11# -*- coding: utf-8 -*-
22"""
3- =============================================================
3+ ==============================================================
44A demo of Robust Classification on Simulated corrupted dataset
5- =============================================================
5+ ==============================================================
66In this example we compare the RobustWeightedClassifier using SGDClassifier
77for classification with the vanilla SGDClassifier with various losses.
88"""
You can’t perform that action at this time.
0 commit comments