|
12345678910111213141516171819202122232425262728293031323334353637383940 |
- {
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# 在测试数据集上比较不同的聚类算法\n",
- "\n",
- "这个例子展示了不同的聚类算法在数据集上的表现,这些数据集虽然有趣但仍然是2D的。除了最后一个数据集以外,每一个数据集的参数都经过调整为了产生更好的效果。一些算法对于参数值比其他算法更加敏感。\n",
- "\n",
- "最后一个数据集是一个\"null\"情况下的聚类:数据是同构的,没有良好的聚类。对于本例,null数据集使用与上面一行中的数据集相同的参数,这表示参数值和数据结构不匹配。\n",
- "\n",
- "这些例子虽然这些例子给出了一些关于算法的直觉,但这种直觉可能不适用于非常高维的数据。"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {},
- "outputs": [
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "/home/bushuhui/virtualenv/dl/lib/python3.6/site-packages/sklearn/cluster/_affinity_propagation.py:152: FutureWarning: 'random_state' has been introduced in 0.23. It will be set to None starting from 0.25 which means that results will differ at every function call. Set 'random_state' to None to silence this warning, or to 0 to keep the behavior of versions <0.23.\n",
- " FutureWarning)\n",
- "/home/bushuhui/virtualenv/dl/lib/python3.6/site-packages/sklearn/cluster/_affinity_propagation.py:152: FutureWarning: 'random_state' has been introduced in 0.23. It will be set to None starting from 0.25 which means that results will differ at every function call. Set 'random_state' to None to silence this warning, or to 0 to keep the behavior of versions <0.23.\n",
- " FutureWarning)\n",
- "/home/bushuhui/virtualenv/dl/lib/python3.6/site-packages/sklearn/cluster/_affinity_propagation.py:152: FutureWarning: 'random_state' has been introduced in 0.23. It will be set to None starting from 0.25 which means that results will differ at every function call. Set 'random_state' to None to silence this warning, or to 0 to keep the behavior of versions <0.23.\n",
- " FutureWarning)\n",
- "/home/bushuhui/virtualenv/dl/lib/python3.6/site-packages/sklearn/cluster/_affinity_propagation.py:152: FutureWarning: 'random_state' has been introduced in 0.23. It will be set to None starting from 0.25 which means that results will differ at every function call. Set 'random_state' to None to silence this warning, or to 0 to keep the behavior of versions <0.23.\n",
- " FutureWarning)\n",
- "/home/bushuhui/virtualenv/dl/lib/python3.6/site-packages/sklearn/cluster/_affinity_propagation.py:152: FutureWarning: 'random_state' has been introduced in 0.23. It will be set to None starting from 0.25 which means that results will differ at every function call. Set 'random_state' to None to silence this warning, or to 0 to keep the behavior of versions <0.23.\n",
- " FutureWarning)\n",
- "/home/bushuhui/virtualenv/dl/lib/python3.6/site-packages/sklearn/cluster/_affinity_propagation.py:152: FutureWarning: 'random_state' has been introduced in 0.23. It will be set to None starting from 0.25 which means that results will differ at every function call. Set 'random_state' to None to silence this warning, or to 0 to keep the behavior of versions <0.23.\n",
- " FutureWarning)\n"
- ]
- },
- {
- "data": {
|