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 4
4
Clustering with KMedoids and Common-nearest-neighbors
5
5
=====================================================
6
6
.. _k_medoids :
7
- .. currentmodule :: sklearn_extra.cluster
8
7
9
8
K-Medoids
10
9
=========
11
10
11
+ .. currentmodule :: sklearn_extra.cluster
12
12
13
13
:class: `KMedoids ` is related to the :class: `KMeans <sklearn.cluster.KMeans> ` algorithm. While
14
14
:class: `KMeans <sklearn.cluster.KMeans> ` tries to minimize the within cluster sum-of-squares,
Original file line number Diff line number Diff line change 3
3
==================================================
4
4
Kernel map approximation for faster kernel methods
5
5
==================================================
6
- .. _kernel_approximation :
7
6
8
7
.. currentmodule :: sklearn_extra.kernel_approximation
9
8
Original file line number Diff line number Diff line change 4
4
KMedoids Demo
5
5
=============
6
6
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>`.
11
10
12
11
"""
13
12
import matplotlib .pyplot as plt
31
30
cobj = KMedoids (n_clusters = 3 ).fit (X )
32
31
labels = cobj .labels_
33
32
34
- ############################################################"""
33
+ ##############################################################
35
34
# Plot results
36
35
unique_labels = set (labels )
37
36
colors = [
Original file line number Diff line number Diff line change 1
1
# -*- coding: utf-8 -*-
2
2
"""
3
- =============================================================
3
+ ==============================================================
4
4
A demo of Robust Classification on Simulated corrupted dataset
5
- =============================================================
5
+ ==============================================================
6
6
In this example we compare the RobustWeightedClassifier using SGDClassifier
7
7
for classification with the vanilla SGDClassifier with various losses.
8
8
"""
You can’t perform that action at this time.
0 commit comments