2022-06-07 17:23:39 +02:00
{
"cells": [
2022-06-17 19:53:34 +02:00
{
"cell_type": "code",
"execution_count": 96,
"id": "e6e27297",
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"import random\n",
"import matplotlib.pyplot as plt\n",
"from sklearn.preprocessing import MinMaxScaler\n",
"from sklearn.metrics import silhouette_score\n",
"from sklearn.decomposition import PCA\n",
"from IPython.display import Image"
]
},
2022-06-07 17:23:39 +02:00
{
"cell_type": "markdown",
"id": "e1e5a2b7",
2022-06-15 22:16:06 +02:00
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
2022-06-07 17:23:39 +02:00
"source": [
2022-06-17 19:53:34 +02:00
"# Analiza skupień metodą k-medoids "
2022-06-07 17:23:39 +02:00
]
},
{
"cell_type": "markdown",
"id": "80d5deaf",
2022-06-15 22:16:06 +02:00
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
2022-06-07 17:23:39 +02:00
"source": [
"### Co to jest klasteryzacja? "
]
},
{
"cell_type": "markdown",
"id": "4040df16",
2022-06-15 22:16:06 +02:00
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
2022-06-07 17:23:39 +02:00
"source": [
2022-06-17 19:53:34 +02:00
" Analiza skupień lub klasteryzacja to zadanie polegające na grupowaniu zbioru obiektów w taki sposób, aby obiekty w tej samej grupie lub klastrze były do siebie bardziej podobne niż obiekty w innych grupach lub klastrach. "
2022-06-07 17:23:39 +02:00
]
},
{
"cell_type": "markdown",
2022-06-17 19:53:34 +02:00
"id": "493a0d16",
"metadata": {},
"source": [
" Idea algorytmu klastrowania:"
]
},
{
"cell_type": "code",
"execution_count": 99,
"id": "e84b8c18",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAApUAAAFTCAYAAABoCPeTAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAClaADAAQAAAABAAABUwAAAACrrMwpAAAHXnRFWHRteGZpbGUAJTNDbXhmaWxlJTIwaG9zdCUzRCUyMmFwcC5kaWFncmFtcy5uZXQlMjIlMjBtb2RpZmllZCUzRCUyMjIwMjItMDYtMTdUMTclM0ExOSUzQTA4Ljg0NFolMjIlMjBhZ2VudCUzRCUyMjUuMCUyMChNYWNpbnRvc2glM0IlMjBJbnRlbCUyME1hYyUyME9TJTIwWCUyMDEwXzE1XzcpJTIwQXBwbGVXZWJLaXQlMkY2MDUuMS4xNSUyMChLSFRNTCUyQyUyMGxpa2UlMjBHZWNrbyklMjBWZXJzaW9uJTJGMTUuNCUyMFNhZmFyaSUyRjYwNS4xLjE1JTIyJTIwZXRhZyUzRCUyMkdLTWZucmFaYnFtcTFvVVBvV3ZJJTIyJTIwdmVyc2lvbiUzRCUyMjIwLjAuMSUyMiUyMHR5cGUlM0QlMjJkZXZpY2UlMjIlM0UlM0NkaWFncmFtJTIwaWQlM0QlMjJXU1V2Q0RDNkVjdTRGcnJHTVJvRSUyMiUyMG5hbWUlM0QlMjJQYWdlLTElMjIlM0U3WnRkajZNMkZJWiUyRlRTNWJnWTBKdWR5azIxMjFxclRTU0szVW04b0I4NkU0T0NMT0pObGZYN044SkJ3WU5UTmlmYlNlM2tSd2pHMTRYc2YyT1FjV2RMTyUyRmZLcjRJZjlESlVJdWlKZGNGdlNYQlNHcklEUyUyRnRlSGFHTUtBTllhc0twTEc1TjhNVDhWWDBScTkxbm9xRW5FY1hLaVZrcm80REkyeEtrc1I2NEdOVjVVNkR5OUxsUnoyZXVDWkdCbWVZaTdIMXIlMkJLUk9lTk5TTExtJTJGMnpLTEs4NjlrUFYwM0pubmNYdDA5eXpIbWl6bmNtJTJCbkZCTjVWU3VqbmFYelpDMXV3NkxrMjlYMThvN1clMkJzRXFWJTJCcE1MZnY1ODIlMkY1QThYNmRaOXR2dWFlZiUyRnVUdiUyRjFMYnl6T1dwZmVEMlp2VzFJeURLNUVNTjBwekZraCUyQlBSYnlnNjF6dnBUSDQ1ckJTcHpJUmRTZWVPVXNMS1RkS3F1cGJaWnB3RWFWMWhhT3UxRTdjbFlSeEpMYXBLV2s2Rk1sSWg5dUQlMkJUMHVNOHlFMmd0ZFhjMGw1NXNncklXYzMyblIyU29odVM2ZWg4M3pkbHhrZlhOOUQxOVVZVG9tWGp1RWc3YVpkZ0RUVHMlMkJ1aGFNNlZiRm9LOTN6QiUyQjMwRlY5cVNQTXFFM3JVa0RtNGUlMkJxYjZadThyNUNhJTJGQyUyRjFmMGtkQVlYQ04wb04yb25zQ2swZkVGcEtNNEdhayUyRlU1TDdSNE92QzRMam1iS1h5b09EOGVtbGsxTFM2MThDUFJtWWlTWUVyMGlHeHBHUGFpUDR0S2k4dHJaZThxZ0wlMkJPMzYwT2Q4UENueGdXdnZmeUNCaFFmeTNpd0gzRUFUSmk1aDVpc0pMNEZCbHg2QjdpRUNCbXlJaVg3aUZtQUxHSGpEaHlEJTJGRnlpSmhnejhVcjl4RXZrUkYzRGJ2RWVBVVloOWlNSCUyRkYyZnl6R1BheU9jWVROJTJCQkUzOHdkajdBSEcyUHMyMzcwbGo4QmRCV1hJak4xYjgwYU1RMlRHeEwwMWo0QjloYyUyQndHVHU0NW9GOWhiJTJGRVp1emdtZ2RDbUQ3Qlp2eElWUE9kaDY4RHNGRjVjNm9paElGdzI2bUtSJTJCS3I3MTFzbUpkNmE3SUNObVE1VzBIY0MlMkZRR2NQTEVUbGNROXlLOUk4YllNVExpWHFpWGdmVUVQV0ZCM0hOOEdjeTdZV2NzaUh1T0x3TkJNdlNVUmZjJTJGc3NJNFRVVVlUJTJCNTFrdVZxNjNrek1hWkR4dWc1QzJyVDhVVmlqSjIwb0RZZFgwdU1RWkFNUFdsQmJiN09ZNGt4VEw1aEp5Mm96ZmQ1TERFR2IwS2dKeTJvVFQ4dmpXSXh6WGdic1lETnhEaUUlMkJ3cnNwQVcxNmVjaE1jWk9XbENiZnA0bHhtQmZnWjYwb0RiOVBFdU1ZZklOTzJsQmJmcDVsaGpERnl5eGt4YmQlMkZjekMlMkJCNXBxVXJ4M1NOc3dmSm5OdUM1bXRoQyUyQkd6TUUwYVE1JTJCTTVwMCUyRjNDTTg1UnlkYlFwNDlQRHlnY3pwd2p3Q2RjNHNickNEUSUyRmxzclBLQlQzbG9vVGJmcnJUbkk2b012MVZjelI1cWJ2TzVVeWN0QzdPczdrWm1xcm5wJTJGNmk0MzNmYzFScG9ZYUhvSWYwaTZ4VCUyQmhDSmRGVnByVDJFQVd4cjZ1SlNoaUxqJTJCMEJmc2lTZVJMYWclMkJUYWpObzZJUHQzWlNYRWsxTTJmUzdDVGpsQ2tJQjFaMTZwJTJGY3JYaEF4VyUyQktaMDl1WGtrM3E4ZmE1S2YzNEx3JTNEJTNEJTNDJTJGZGlhZ3JhbSUzRSUzQyUyRm14ZmlsZSUzRdtwfewAAEAASURBVHgB7Z0HYBzF2YY/9S5LsiTbsmVJ7r0b94JNQgkdAoSE0CFASIBQAvyEkIQaAmlAqEkgIYGAqaEFYxtcwQXcuyVblotkWbZsden+eceskM3puDvt3u3uvQPru9udnfJ8p7l3p31RHhWEgQRIgARIgARIgARIgAQ6QCC6A/fyVhIgARIgARIgARIgARLQBCgq+UUgARIgARIgARIgARLoMAGKyg4jZAIkQAIkQAIkQAIkQAIUlfwOkAAJkAAJkAAJkAAJdJgARWWHETIBEiABEiABEiABEiABikp+B0iABEiABEiABEiABDpMgKKywwiZAAmQAAmQAAmQAAmQAEUlvwMkQAIkQAIkQAIkQAIdJkBR2WGETIAESIAESIAESIAESICikt8BRxCoqamR2tpaR5SVhSQBEiABEvBOoKWlRQ4fPiyNjY3eI/CsowlQVJpkvtLSUomOjm49YmNjZfLkyfKHP/xBrPSEOXToUImPjzepFl8l89///leSkpLk4Ycf/upkGN91795d+vTpE5YS5ObmSmFhYUjzXrVqldx///3y+eefhzRfZkYCJGAOgd///vetvwf4bUhPT5fzzz9fPvroI3MyCCCVyy+/XLfnW7duDeAua6Ki/qmpqXLLLbeYlsF1112nWS9evNi0NL8poYaGBnnggQfk3//+9zdFjajrsRFVWwsrC+GIIzMzU84++2w5cOCA/O9//5MFCxZIRkaGXHzxxZbk3tzcLE1NTaanjXTr6uosSTuYwl566aUCoR6OgCdr8Ahl+PTTT+WOO+6QrKwsGTFiRCizZl4kQAImEEC7gd+EkSNHyqhRowSC7j//+Y+8/fbbUlJSItnZ2Sbk4l8S9fX1uj23soPDv5KI9OjRQ6666iqZOHGiv7d8Yzzj9/cbI5oYAb+Pt99+u8ycOVMuuOACE1N2dlLsqTTZfvn5+fLMM8/oxuPuu+/WqePp6ZNPPpFx48bJQw89JCeddJLgGv6ocK7tMWfOHMFQ7/XXXy9Iq3fv3nLzzTe3ipotW7bIt771LcnLy9NCFV9sb+Hkk0+W8ePHCxqT999/X+dxzz336KhID3n++te/1q/PPvusPr99+3b9+YorrjgqSaTxve99T6ZOnSpvvfWWbijvvfde3XOYkpKi81m4cKG+B2II9fq///s/QRmKiop0XYxyzp8/X/fgdunSRaf3u9/9zq/7Vq5cKWvXrtVxffH55S9/qfNHL9+QIUNkwoQJ8vHHH8tFF12kGzMI/qqqqqPqhw8VFRXy/e9/X3r27CmDBg2Sq6++Wp87NiKeTvFUDNuA4W9+8xv9ajwhz5s3T8aOHSvg0q9fP21voyFHzzXSveGGGzSz7373u/re4uJ
"text/plain": [
"<IPython.core.display.Image object>"
]
},
"execution_count": 99,
"metadata": {},
"output_type": "execute_result"
2022-06-15 22:16:06 +02:00
}
2022-06-17 19:53:34 +02:00
],
2022-06-07 17:23:39 +02:00
"source": [
2022-06-17 19:53:34 +02:00
"Image(\"algorithm.png\")"
2022-06-07 17:23:39 +02:00
]
},
{
"cell_type": "markdown",
2022-06-17 19:53:34 +02:00
"id": "5813bd1a",
"metadata": {},
"source": [
" Sama analiza skupień nie jest jednym konkretnym algorytmem, lecz ogólnym zadaniem do rozwiązania. Można je zrealizować za pomocą różnych algorytmów (algorytm $k-średnich$, algorytm $k-medoid$), które różnią się znacznie w rozumieniu tego, czym jest klaster i jak skutecznie je znaleźć. Popularne pojęcia klastrów obejmują grupy o małych odległościach między elementami klastra. Klastrowanie można zatem sformułować jako wieloprzedmiotowy problem optymalizacyjny. Wybór odpowiedniego algorytmu grupowania i ustawień parametrów zależy od indywidualnego zbioru danych i przeznaczenia wyników. Analiza skupień jako taka nie jest zadaniem automatycznym, lecz iteracyjnym procesem odkrywania wiedzy lub interaktywnej optymalizacji wieloprzedmiotowej, który wymaga prób i błędów. Często konieczne jest modyfikowanie wstępnego przetwarzania danych i parametrów modelu, aż do uzyskania pożądanych właściwości."
]
},
{
"cell_type": "markdown",
"id": "3dc57d21",
2022-06-15 22:16:06 +02:00
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
2022-06-07 17:23:39 +02:00
"source": [
2022-06-17 19:53:34 +02:00
" W naszym projekcie przedstawimy metodę $k-medoid$ i porównamy ją z metodą $k-średnich$."
2022-06-07 17:23:39 +02:00
]
},
{
"cell_type": "markdown",
2022-06-17 19:53:34 +02:00
"id": "2e28109b",
"metadata": {},
"source": [
"### Algorytm k-średnich"
]
},
{
"cell_type": "markdown",
"id": "01b24fd7",
"metadata": {},
"source": [
" W uczeniu maszynowym występują głównie dwa rodzaje algorytmów uczenia. Są to algorytm uczenia nadzorowanego i algorytm uczenia nienadzorowanego. \n",
"Klastrowanie metodą $k-średnich$ jest algorytmem uczenia nienadzorowanego, który grupuje nieoznakowane zbiory danych w różne klastry lub grupy. W algorytmie $k-średnich$ $k$ określa liczbę wstępnie zdefiniowanych klastrów lub grup, które należy utworzyć w danym zbiorze danych. Na przykład jeśli $k = 3$, powstaną trzy klastry, dla $k = 5$ będzie pięć klastrów itd."
]
},
{
"cell_type": "markdown",
"id": "7f4d7284",
"metadata": {},
"source": [
" Algorytm $k-średnich$ pomaga grupować dane w różne klastry w sposób konwencjonalny, umożliwiając samodzielne odkrywanie kategorii grup w nieoznakowanym zbiorze danych bez konieczności uczenia. Algorytm klasteryzacji $k-średnich$ jest algorytmem opartym na centroidach, w którym każdy klaster jest powiązany z centroidem. Głównym celem tego algorytmu jest zminimalizowanie sumy odległości wewnętrznych punktów danych w odpowiadających im klastrach. Algorytm przyjmuje jako dane wejściowe nieuporządkowany zbiór danych i dzieli go na $k$ grup, a następnie powtarza ten proces aż do uzyskania najlepszych klastrów. Wartość $k$ jest zawsze określona z góry."
]
},
{
"cell_type": "markdown",
"id": "22642017",
"metadata": {},
"source": [
" Główne zadanie algorytmu $k-średnich$ jest następujące:\n",
"\n",
"  $1.$ Wybierz liczbę klastrów $k$. \n",
"  $2.$ Wybierz losowo $k$ punktów z zestawu danych jako centroidy. \n",
"  $3.$ Przypisz każdy punkt danych do najbliższego mu centroida. \n",
"  $4.$ Oblicz wariancję i umieść nowy centroid dla każdego klastra. \n",
"  $5.$ Powtórz $krok 3$, czyli ponownie przypisz każdy punkt danych do nowego najbliższego centroidu."
]
},
{
"cell_type": "markdown",
"id": "15d683c2",
"metadata": {},
"source": [
" **Rozwiązanie**: Implementacja algorytmu $k-średnich$ przy użyciu Pythona. Do wykonania algorytmu $k-średnich$ potrzebne jest wstępne przetwarzanie danych. W naszym rozwiązaniu przeprowadziliśmy wstępne przetwarzanie danych w celu zaimplementowania algorytmu. Dodatkowo oceniliśmy jaka jest jakość naszego grupowania. Posłużyliśmy się tzw. sylwetką (ang. silhouette) $s(x_i)$ obliczaną dla każdego obiektu $x_i$. Najpierw dla $x_i$ znajduje się jego średnią odległość $a(x_i)$ od pozostałych obiektów grupy, do której został przydzielony, a następnie wybiera się minimalną wartość $b(x_i)$ spośród obliczonych odległości od $x_i$ do każdej spośród pozostałych grup osobno. Odległość $x_i$ od danej grupy oblicza się jako średnią odległość od $x_i$ do wszystkich elementów tej grupy. Obie wielkości zestawia się we wzorze: "
]
},
{
"cell_type": "markdown",
"id": "e276f546",
"metadata": {},
"source": [
"<h1><center>$s(x_i) = \\frac{b(x_i)-a(x_i)}{max(a(x_i),b(x_i))}$</center></h1>"
]
},
{
"cell_type": "markdown",
"id": "9af1d9d2",
"metadata": {},
"source": [
"otrzymując wartość sylwetki dla danego obiektu $x_i$. Jej zbiór wartości to $[-1, 1]$. Zatem ma ona prostą interpretację: obiekty, dla których wskaźnik jest bliski $1$, zostały trafnie zgrupowane, pozostałe (o wartości ok. $0$ i $ujemnej$) prawdopodobnie trafiły do złych grup."
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "409d4187",
"metadata": {},
"outputs": [],
"source": [
"class TrainModel_means:\n",
" def __init__(self, data, k_value, max_iteration):\n",
" self.data = data\n",
" scaler = MinMaxScaler()\n",
" self.data = scaler.fit_transform(self.data)\n",
" self.k_value = k_value\n",
" self.max_iteration = max_iteration\n",
" self.centroids = []\n",
" self.final_clusters, self.silhouette = self.data_cluster()\n",
"\n",
" def generate_column(self, col, data):\n",
" values = []\n",
" for i in range(len(data)):\n",
" values.append(data[i][col])\n",
" return values\n",
"\n",
" def calculateDistance(self, x, y):\n",
" return np.linalg.norm(x-y)\n",
"\n",
" def get_closest_centroid(self, points, centroids):\n",
" closest_centroids = []\n",
" for i in points:\n",
" distance = []\n",
" for c in centroids:\n",
" dis = self.calculateDistance(i, c)\n",
" distance.append(dis)\n",
" closest_centroids.append(np.argmin(distance))\n",
" return closest_centroids\n",
"\n",
" def calculate_new_centroids(self, clusters, X):\n",
" new_centroids = []\n",
" new_df = pd.concat([pd.DataFrame(X), pd.DataFrame(clusters, columns=['cluster'])], axis=1)\n",
" for c in set(new_df['cluster']):\n",
" current_cluster = new_df[new_df['cluster'] == c][new_df.columns[:-1]]\n",
" cluster_mean = current_cluster.mean(axis=0)\n",
" new_centroids.append(cluster_mean)\n",
" return new_centroids\n",
"\n",
" def get_clustered_data(self, points, centroids):\n",
" closest_centroids = self.get_closest_centroid(points, centroids)\n",
" clustered_data = {}\n",
" for i in range(self.k_value):\n",
" clustered_data[i] = []\n",
" for i in range(len(points)):\n",
" clustered_data[closest_centroids[i]].append(points[i])\n",
" return clustered_data\n",
"\n",
" def get_clusters_label(self, data_points, clusters):\n",
" labels = []\n",
" for i in range(len(data_points)):\n",
" labels.append(0)\n",
" for i in clusters.keys():\n",
" cluster = clusters[i]\n",
" for j in range(len(cluster)):\n",
" for k in range(len(data_points)):\n",
" if (cluster[j] == data_points[k]).all():\n",
" labels[k] = i\n",
" break\n",
" return labels\n",
"\n",
" def data_cluster(self):\n",
" centroid_points = random.sample(range(0, len(self.data)), self.k_value)\n",
" for i in centroid_points:\n",
" self.centroids.append(self.data[i])\n",
" for i in range(self.max_iteration):\n",
" closest_centroids = self.get_closest_centroid(self.data, self.centroids)\n",
" self.centroids = self.calculate_new_centroids(closest_centroids, np.array(self.data))\n",
" final_clusters = self.get_clustered_data(self.data, self.centroids)\n",
" cluster_labels = self.get_clusters_label(self.data, final_clusters)\n",
" silhouette_avg = silhouette_score(self.data, cluster_labels)\n",
" print(\"Sylwetka (ang.silhouette) dla metody k-medoid i dla k =\", self.k_value, round(silhouette_avg,2))\n",
" \n",
" return final_clusters, round(silhouette_avg,2)\n",
" \n",
" def return_values(self):\n",
" return self.centroids, self.final_clusters, self.silhouette"
]
},
{
"cell_type": "code",
"execution_count": 55,
"id": "b42a9194",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Sylwetka (ang.silhouette) dla metody k-medoid i dla k = 3 0.44\n"
]
2022-06-15 22:16:06 +02:00
}
2022-06-17 19:53:34 +02:00
],
"source": [
"# iris\n",
"dataset = pd.read_csv('iris.csv')\n",
"dataset = dataset.iloc[: , 1:-1]\n",
"dataset = dataset.values\n",
"model = TrainModel_means(dataset, 3, 10)\n",
"centroids, final_clusters, silhouette = model.return_values()"
]
},
{
"cell_type": "code",
"execution_count": 60,
"id": "15541704",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Sylwetka (ang.silhouette) dla metody k-medoid i dla k = 4 0.28\n"
]
}
],
"source": [
"# glass\n",
"dataset2= pd.read_csv('glass.csv')\n",
"dataset2 = dataset2.iloc[:,:-1]\n",
"dataset2 = dataset2.values\n",
"model2 = TrainModel_means(dataset2, 4, 10)\n",
"centroids2, final_clusters2, silhouette2 = model2.return_values()"
]
},
{
"cell_type": "code",
"execution_count": 70,
"id": "c29dca2b",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Sylwetka (ang.silhouette) dla metody k-medoid i dla k = 3 0.3\n"
]
}
],
2022-06-07 17:23:39 +02:00
"source": [
2022-06-17 19:53:34 +02:00
"# wine\n",
"dataset3= pd.read_csv('wine.csv')\n",
"dataset3 = dataset3.values\n",
"model3 = TrainModel_means(dataset3, 3, 10)\n",
"centroids3, final_clusters3, silhouette3 = model3.return_values()"
2022-06-07 17:23:39 +02:00
]
},
{
"cell_type": "markdown",
2022-06-17 19:53:34 +02:00
"id": "f7c684c9",
2022-06-15 22:16:06 +02:00
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
2022-06-07 17:23:39 +02:00
"source": [
2022-06-17 19:53:34 +02:00
"### Algorytm k-medoid"
2022-06-07 17:23:39 +02:00
]
},
{
"cell_type": "markdown",
2022-06-17 19:53:34 +02:00
"id": "af45d7c7",
2022-06-15 22:16:06 +02:00
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
2022-06-07 17:23:39 +02:00
"source": [
2022-06-17 19:53:34 +02:00
"$1.$ Inicjalizacja: wybierz $k$ losowych punktów spośród $n$ punktów danych jako medoidy. \n",
"$2.$ Przyporządkuj każdy punkt danych do najbliższego medoidu, używając dowolnych popularnych metod metryki odległości. \n",
"$3.$ Podczas gdy koszt maleje: \n",
"  Dla każdej medoidy $m$, dla każdego punktu danych $o$, który nie jest medoidą: \n",
"    $i.$ Zamień punkty $m$ i $o$, przyporządkuj każdy punkt danych do najbliższej medoidy, ponownie oblicz koszt. \n",
"    $ii.$ Jeśli całkowity koszt jest większy niż w poprzednim kroku, cofnij zamianę."
2022-06-07 17:23:39 +02:00
]
},
{
"cell_type": "markdown",
2022-06-17 19:53:34 +02:00
"id": "d8f6dd1e",
2022-06-15 22:16:06 +02:00
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
2022-06-07 17:23:39 +02:00
"source": [
2022-06-17 19:53:34 +02:00
" **Rozwiązanie**: Implementacja algorytmu k-medoid w Pythonie. Do wykonania algorytmu k-medoidy potrzebne jest wstępne przetworzenie danych. W naszym rozwiązaniu przeprowadziliśmy wstępne przetwarzanie danych w celu zaimplementowania algorytmu k-medoid. "
2022-06-07 17:23:39 +02:00
]
},
{
"cell_type": "code",
2022-06-17 19:53:34 +02:00
"execution_count": 20,
2022-06-07 17:23:39 +02:00
"id": "73cffc81",
2022-06-15 22:16:06 +02:00
"metadata": {
"pycharm": {
"name": "#%%\n"
2022-06-07 17:23:39 +02:00
}
2022-06-15 22:16:06 +02:00
},
"outputs": [],
2022-06-07 17:23:39 +02:00
"source": [
2022-06-17 19:53:34 +02:00
"class TrainModel_medoids:\n",
2022-06-07 17:23:39 +02:00
" def __init__(self, data, k_value):\n",
" self.data = data\n",
" scaler = MinMaxScaler()\n",
" self.data = scaler.fit_transform(self.data)\n",
" self.k_value = k_value\n",
2022-06-17 19:53:34 +02:00
" self.medoids, self.res_cluster, self.cluster_labels, self.silhouette = self.kmedoids(self.data)\n",
2022-06-07 17:23:39 +02:00
"\n",
" def get_random_medoids(self, data):\n",
" points = random.sample(range(0, len(data)), self.k_value)\n",
" medoids = []\n",
2022-06-17 19:53:34 +02:00
" for i in points:\n",
2022-06-07 17:23:39 +02:00
" medoids.append(data[i])\n",
" return medoids\n",
"\n",
" def get_closest_medoids(self, sample_point, medoids):\n",
" min_distance = float('inf')\n",
" closest_medoid = None\n",
" for i in range(len(medoids)):\n",
" distance = self.calculateDistance(sample_point, medoids[i])\n",
" if distance < min_distance:\n",
" min_distance = distance\n",
" closest_medoid = i\n",
" return closest_medoid\n",
"\n",
" def get_clusters(self, data_points, medoids):\n",
" clusters = [[] for _ in range(self.k_value)]\n",
" for i in range(len(data_points)):\n",
" x = self.get_closest_medoids(data_points[i], medoids)\n",
" clusters[x].append(data_points[i])\n",
" return clusters\n",
"\n",
" def calculate_cost(self, data_points, clusters, medoids):\n",
" cost = 0\n",
" for i in range(len(clusters)):\n",
" for j in range(len(clusters[i])):\n",
" cost += self.calculateDistance(medoids[i], clusters[i][j])\n",
" return cost\n",
"\n",
" def get_non_medoids(self, data_points, medoids):\n",
" non_medoids = []\n",
" for sample in data_points:\n",
" flag = False\n",
" for m in medoids:\n",
" if (sample == m).all():\n",
" flag = True\n",
" if flag == False:\n",
" non_medoids.append(sample)\n",
" return non_medoids\n",
"\n",
" def get_clusters_label(self, data_points, clusters):\n",
" labels = []\n",
" for i in range(len(data_points)):\n",
" labels.append(0)\n",
" for i in range(len(clusters)):\n",
" cluster = clusters[i]\n",
" for j in range(len(cluster)):\n",
" for k in range(len(data_points)):\n",
" if (cluster[j] == data_points[k]).all():\n",
" labels[k] = i\n",
" break\n",
" return labels\n",
"\n",
" def kmedoids(self, data):\n",
" medoids = self.get_random_medoids(data)\n",
" clusters = self.get_clusters(data, medoids)\n",
" initial_cost = self.calculate_cost(data, clusters, medoids)\n",
" while True:\n",
" best_medoids = medoids\n",
" lowest_cost = initial_cost\n",
" for i in range(len(medoids)):\n",
" non_medoids = self.get_non_medoids(data, medoids)\n",
" for j in range(len(non_medoids)):\n",
" new_medoids = medoids.copy()\n",
" for k in range(len(new_medoids)):\n",
" if (new_medoids[k] == medoids[i]).all():\n",
" new_medoids[k] = non_medoids[j]\n",
" new_clusters = self.get_clusters(data, new_medoids)\n",
" new_cost = self.calculate_cost(data, new_clusters, new_medoids)\n",
" if new_cost < lowest_cost:\n",
" lowest_cost = new_cost\n",
" best_medoids = new_medoids\n",
" if lowest_cost < initial_cost:\n",
" initial_cost = lowest_cost\n",
" medoids = best_medoids\n",
" else:\n",
" break\n",
" final_clusters = self.get_clusters(data, medoids)\n",
" cluster_labels = self.get_clusters_label(data, final_clusters)\n",
" silhouette_avg = silhouette_score(data, cluster_labels)\n",
2022-06-17 19:53:34 +02:00
"\n",
" print(\"Sylwetka (ang.silhouette) dla metody k-medoid i dla k =\", self.k_value, round(silhouette_avg,2))\n",
"\n",
" res_cluster = []\n",
" for i in range(0, self.k_value):\n",
" res_cluster.append([data[s] for s in range(0, len(data)) if cluster_labels[s] == i])\n",
" return medoids, res_cluster, cluster_labels, round(silhouette_avg,2)\n",
2022-06-07 17:23:39 +02:00
"\n",
" def calculateDistance(self, x, y):\n",
" return np.linalg.norm(x-y)\n",
"\n",
2022-06-17 19:53:34 +02:00
" def return_values(self):\n",
" return self.medoids, self.res_cluster, self.cluster_labels, self.silhouette"
]
},
{
"cell_type": "markdown",
"id": "c5290f06",
"metadata": {},
"source": [
"#### Uruchomienie algorytmu k-medoid dla zbioru danych iris"
]
},
{
"cell_type": "code",
"execution_count": 117,
"id": "4c1f8423",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Sylwetka (ang.silhouette) dla metody k-medoid i dla k = 3 0.48\n"
]
},
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: center;\">\n",
" <th></th>\n",
" <th>Długość kielicha</th>\n",
" <th>Szerokość kielicha</th>\n",
" <th>Długość płatka</th>\n",
" <th>Szerokość płatka</th>\n",
" <th>Wartość medoidu 0</th>\n",
" <th>Wartość medoidu 1</th>\n",
" <th>Wartość medoidu 2</th>\n",
" <th>Medoid</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>0.17</td>\n",
" <td>0.46</td>\n",
" <td>0.08</td>\n",
" <td>0.00</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>0.17</td>\n",
" <td>0.46</td>\n",
" <td>0.08</td>\n",
" <td>0.00</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>0.75</td>\n",
" <td>0.50</td>\n",
" <td>0.63</td>\n",
" <td>0.54</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>0.58</td>\n",
" <td>0.50</td>\n",
" <td>0.59</td>\n",
" <td>0.58</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>0.72</td>\n",
" <td>0.46</td>\n",
" <td>0.66</td>\n",
" <td>0.58</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>0.33</td>\n",
" <td>0.12</td>\n",
" <td>0.51</td>\n",
" <td>0.50</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>0.61</td>\n",
" <td>0.33</td>\n",
" <td>0.61</td>\n",
" <td>0.58</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>0.39</td>\n",
" <td>0.33</td>\n",
" <td>0.59</td>\n",
" <td>0.50</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>0.56</td>\n",
" <td>0.54</td>\n",
" <td>0.63</td>\n",
" <td>0.63</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>0.17</td>\n",
" <td>0.17</td>\n",
" <td>0.39</td>\n",
" <td>0.38</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>0.64</td>\n",
" <td>0.38</td>\n",
" <td>0.61</td>\n",
" <td>0.50</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>0.25</td>\n",
" <td>0.29</td>\n",
" <td>0.49</td>\n",
" <td>0.54</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>0.19</td>\n",
" <td>0.00</td>\n",
" <td>0.42</td>\n",
" <td>0.38</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>0.44</td>\n",
" <td>0.42</td>\n",
" <td>0.54</td>\n",
" <td>0.58</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>0.47</td>\n",
" <td>0.08</td>\n",
" <td>0.51</td>\n",
" <td>0.38</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15</th>\n",
" <td>0.50</td>\n",
" <td>0.38</td>\n",
" <td>0.63</td>\n",
" <td>0.54</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>0.36</td>\n",
" <td>0.38</td>\n",
" <td>0.44</td>\n",
" <td>0.50</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17</th>\n",
" <td>0.67</td>\n",
" <td>0.46</td>\n",
" <td>0.58</td>\n",
" <td>0.54</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18</th>\n",
" <td>0.36</td>\n",
" <td>0.42</td>\n",
" <td>0.59</td>\n",
" <td>0.58</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19</th>\n",
" <td>0.42</td>\n",
" <td>0.29</td>\n",
" <td>0.53</td>\n",
" <td>0.38</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>20</th>\n",
" <td>0.53</td>\n",
" <td>0.08</td>\n",
" <td>0.59</td>\n",
" <td>0.58</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21</th>\n",
" <td>0.36</td>\n",
" <td>0.21</td>\n",
" <td>0.49</td>\n",
" <td>0.42</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>22</th>\n",
" <td>0.44</td>\n",
" <td>0.50</td>\n",
" <td>0.64</td>\n",
" <td>0.71</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>23</th>\n",
" <td>0.50</td>\n",
" <td>0.33</td>\n",
" <td>0.51</td>\n",
" <td>0.50</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>24</th>\n",
" <td>0.56</td>\n",
" <td>0.21</td>\n",
" <td>0.66</td>\n",
" <td>0.58</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25</th>\n",
" <td>0.50</td>\n",
" <td>0.33</td>\n",
" <td>0.63</td>\n",
" <td>0.46</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>26</th>\n",
" <td>0.58</td>\n",
" <td>0.38</td>\n",
" <td>0.56</td>\n",
" <td>0.50</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>27</th>\n",
" <td>0.64</td>\n",
" <td>0.42</td>\n",
" <td>0.58</td>\n",
" <td>0.54</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>28</th>\n",
" <td>0.69</td>\n",
" <td>0.33</td>\n",
" <td>0.64</td>\n",
" <td>0.54</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>29</th>\n",
" <td>0.47</td>\n",
" <td>0.38</td>\n",
" <td>0.59</td>\n",
" <td>0.58</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>30</th>\n",
" <td>0.39</td>\n",
" <td>0.25</td>\n",
" <td>0.42</td>\n",
" <td>0.38</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>31</th>\n",
" <td>0.33</td>\n",
" <td>0.17</td>\n",
" <td>0.47</td>\n",
" <td>0.42</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>32</th>\n",
" <td>0.33</td>\n",
" <td>0.17</td>\n",
" <td>0.46</td>\n",
" <td>0.38</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>33</th>\n",
" <td>0.42</td>\n",
" <td>0.29</td>\n",
" <td>0.49</td>\n",
" <td>0.46</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>34</th>\n",
" <td>0.47</td>\n",
" <td>0.29</td>\n",
" <td>0.69</td>\n",
" <td>0.63</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>35</th>\n",
" <td>0.31</td>\n",
" <td>0.42</td>\n",
" <td>0.59</td>\n",
" <td>0.58</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>36</th>\n",
" <td>0.47</td>\n",
" <td>0.58</td>\n",
" <td>0.59</td>\n",
" <td>0.63</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>37</th>\n",
" <td>0.67</td>\n",
" <td>0.46</td>\n",
" <td>0.63</td>\n",
" <td>0.58</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>38</th>\n",
" <td>0.56</td>\n",
" <td>0.12</td>\n",
" <td>0.58</td>\n",
" <td>0.50</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>39</th>\n",
" <td>0.36</td>\n",
" <td>0.42</td>\n",
" <td>0.53</td>\n",
" <td>0.50</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>40</th>\n",
" <td>0.33</td>\n",
" <td>0.21</td>\n",
" <td>0.51</td>\n",
" <td>0.50</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>41</th>\n",
" <td>0.33</td>\n",
" <td>0.25</td>\n",
" <td>0.58</td>\n",
" <td>0.46</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>42</th>\n",
" <td>0.50</td>\n",
" <td>0.42</td>\n",
" <td>0.61</td>\n",
" <td>0.54</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>43</th>\n",
" <td>0.42</td>\n",
" <td>0.25</td>\n",
" <td>0.51</td>\n",
" <td>0.46</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>44</th>\n",
" <td>0.19</td>\n",
" <td>0.12</td>\n",
" <td>0.39</td>\n",
" <td>0.38</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>45</th>\n",
" <td>0.36</td>\n",
" <td>0.29</td>\n",
" <td>0.54</td>\n",
" <td>0.50</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>46</th>\n",
" <td>0.39</td>\n",
" <td>0.42</td>\n",
" <td>0.54</td>\n",
" <td>0.46</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>47</th>\n",
" <td>0.39</td>\n",
" <td>0.38</td>\n",
" <td>0.54</td>\n",
" <td>0.50</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>48</th>\n",
" <td>0.53</td>\n",
" <td>0.38</td>\n",
" <td>0.56</td>\n",
" <td>0.50</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>49</th>\n",
" <td>0.22</td>\n",
" <td>0.21</td>\n",
" <td>0.34</td>\n",
" <td>0.42</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>50</th>\n",
" <td>0.39</td>\n",
" <td>0.33</td>\n",
" <td>0.53</td>\n",
" <td>0.50</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>51</th>\n",
" <td>0.42</td>\n",
" <td>0.29</td>\n",
" <td>0.69</td>\n",
" <td>0.75</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>52</th>\n",
" <td>0.17</td>\n",
" <td>0.21</td>\n",
" <td>0.59</td>\n",
" <td>0.67</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>53</th>\n",
" <td>0.39</td>\n",
" <td>0.21</td>\n",
" <td>0.68</td>\n",
" <td>0.79</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>54</th>\n",
" <td>0.47</td>\n",
" <td>0.08</td>\n",
" <td>0.68</td>\n",
" <td>0.58</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>55</th>\n",
" <td>0.36</td>\n",
" <td>0.33</td>\n",
" <td>0.66</td>\n",
" <td>0.79</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>56</th>\n",
" <td>0.56</td>\n",
" <td>0.29</td>\n",
" <td>0.66</td>\n",
" <td>0.71</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>57</th>\n",
" <td>0.53</td>\n",
" <td>0.33</td>\n",
" <td>0.64</td>\n",
" <td>0.71</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>58</th>\n",
" <td>0.50</td>\n",
" <td>0.42</td>\n",
" <td>0.66</td>\n",
" <td>0.71</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>59</th>\n",
" <td>0.56</td>\n",
" <td>0.33</td>\n",
" <td>0.69</td>\n",
" <td>0.58</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>60</th>\n",
" <td>0.50</td>\n",
" <td>0.25</td>\n",
" <td>0.78</td>\n",
" <td>0.54</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>61</th>\n",
" <td>0.47</td>\n",
" <td>0.42</td>\n",
" <td>0.64</td>\n",
" <td>0.71</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>62</th>\n",
" <td>0.42</td>\n",
" <td>0.29</td>\n",
" <td>0.69</td>\n",
" <td>0.75</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>63</th>\n",
" <td>0.56</td>\n",
" <td>0.21</td>\n",
" <td>0.68</td>\n",
" <td>0.75</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>64</th>\n",
" <td>0.44</td>\n",
" <td>0.42</td>\n",
" <td>0.69</td>\n",
" <td>0.71</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>65</th>\n",
" <td>0.67</td>\n",
" <td>0.42</td>\n",
" <td>0.68</td>\n",
" <td>0.67</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>66</th>\n",
" <td>0.56</td>\n",
" <td>0.54</td>\n",
" <td>0.85</td>\n",
" <td>1.00</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>67</th>\n",
" <td>0.78</td>\n",
" <td>0.42</td>\n",
" <td>0.83</td>\n",
" <td>0.83</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>68</th>\n",
" <td>0.56</td>\n",
" <td>0.38</td>\n",
" <td>0.78</td>\n",
" <td>0.71</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>69</th>\n",
" <td>0.61</td>\n",
" <td>0.42</td>\n",
" <td>0.81</td>\n",
" <td>0.88</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>70</th>\n",
" <td>0.92</td>\n",
" <td>0.42</td>\n",
" <td>0.95</td>\n",
" <td>0.83</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>71</th>\n",
" <td>0.83</td>\n",
" <td>0.38</td>\n",
" <td>0.90</td>\n",
" <td>0.71</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>72</th>\n",
" <td>0.67</td>\n",
" <td>0.21</td>\n",
" <td>0.81</td>\n",
" <td>0.71</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>73</th>\n",
" <td>0.81</td>\n",
" <td>0.67</td>\n",
" <td>0.86</td>\n",
" <td>1.00</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>74</th>\n",
" <td>0.61</td>\n",
" <td>0.50</td>\n",
" <td>0.69</td>\n",
" <td>0.79</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>75</th>\n",
" <td>0.58</td>\n",
" <td>0.29</td>\n",
" <td>0.73</td>\n",
" <td>0.75</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>76</th>\n",
" <td>0.69</td>\n",
" <td>0.42</td>\n",
" <td>0.76</td>\n",
" <td>0.83</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>77</th>\n",
" <td>0.42</td>\n",
" <td>0.33</td>\n",
" <td>0.69</td>\n",
" <td>0.96</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>78</th>\n",
" <td>0.58</td>\n",
" <td>0.50</td>\n",
" <td>0.73</td>\n",
" <td>0.92</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>79</th>\n",
" <td>0.61</td>\n",
" <td>0.42</td>\n",
" <td>0.76</td>\n",
" <td>0.71</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>80</th>\n",
" <td>0.94</td>\n",
" <td>0.75</td>\n",
" <td>0.97</td>\n",
" <td>0.88</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>81</th>\n",
" <td>0.94</td>\n",
" <td>0.25</td>\n",
" <td>1.00</td>\n",
" <td>0.92</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>82</th>\n",
" <td>0.72</td>\n",
" <td>0.50</td>\n",
" <td>0.80</td>\n",
" <td>0.92</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>83</th>\n",
" <td>0.94</td>\n",
" <td>0.33</td>\n",
" <td>0.97</td>\n",
" <td>0.79</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>84</th>\n",
" <td>0.67</td>\n",
" <td>0.54</td>\n",
" <td>0.80</td>\n",
" <td>0.83</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>85</th>\n",
" <td>0.81</td>\n",
" <td>0.50</td>\n",
" <td>0.85</td>\n",
" <td>0.71</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>86</th>\n",
" <td>0.58</td>\n",
" <td>0.33</td>\n",
" <td>0.78</td>\n",
" <td>0.83</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>87</th>\n",
" <td>0.81</td>\n",
" <td>0.42</td>\n",
" <td>0.81</td>\n",
" <td>0.63</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>88</th>\n",
" <td>0.86</td>\n",
" <td>0.33</td>\n",
" <td>0.86</td>\n",
" <td>0.75</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>89</th>\n",
" <td>1.00</td>\n",
" <td>0.75</td>\n",
" <td>0.92</td>\n",
" <td>0.79</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>90</th>\n",
" <td>0.58</td>\n",
" <td>0.33</td>\n",
" <td>0.78</td>\n",
" <td>0.88</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>91</th>\n",
" <td>0.94</td>\n",
" <td>0.42</td>\n",
" <td>0.86</td>\n",
" <td>0.92</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>92</th>\n",
" <td>0.56</td>\n",
" <td>0.58</td>\n",
" <td>0.78</td>\n",
" <td>0.96</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>93</th>\n",
" <td>0.58</td>\n",
" <td>0.46</td>\n",
" <td>0.76</td>\n",
" <td>0.71</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>94</th>\n",
" <td>0.72</td>\n",
" <td>0.46</td>\n",
" <td>0.75</td>\n",
" <td>0.83</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>95</th>\n",
" <td>0.67</td>\n",
" <td>0.46</td>\n",
" <td>0.78</td>\n",
" <td>0.96</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>96</th>\n",
" <td>0.72</td>\n",
" <td>0.46</td>\n",
" <td>0.69</td>\n",
" <td>0.92</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>97</th>\n",
" <td>0.69</td>\n",
" <td>0.50</td>\n",
" <td>0.83</td>\n",
" <td>0.92</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>98</th>\n",
" <td>0.67</td>\n",
" <td>0.54</td>\n",
" <td>0.80</td>\n",
" <td>1.00</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>99</th>\n",
" <td>0.67</td>\n",
" <td>0.42</td>\n",
" <td>0.71</td>\n",
" <td>0.92</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>100</th>\n",
" <td>0.61</td>\n",
" <td>0.42</td>\n",
" <td>0.71</td>\n",
" <td>0.79</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>101</th>\n",
" <td>0.53</td>\n",
" <td>0.58</td>\n",
" <td>0.75</td>\n",
" <td>0.92</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>102</th>\n",
" <td>0.22</td>\n",
" <td>0.62</td>\n",
" <td>0.07</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>103</th>\n",
" <td>0.17</td>\n",
" <td>0.42</td>\n",
" <td>0.07</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>104</th>\n",
" <td>0.11</td>\n",
" <td>0.50</td>\n",
" <td>0.05</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>105</th>\n",
" <td>0.08</td>\n",
" <td>0.46</td>\n",
" <td>0.08</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>106</th>\n",
" <td>0.19</td>\n",
" <td>0.67</td>\n",
" <td>0.07</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>107</th>\n",
" <td>0.31</td>\n",
" <td>0.79</td>\n",
" <td>0.12</td>\n",
" <td>0.12</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>108</th>\n",
" <td>0.08</td>\n",
" <td>0.58</td>\n",
" <td>0.07</td>\n",
" <td>0.08</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>109</th>\n",
" <td>0.19</td>\n",
" <td>0.58</td>\n",
" <td>0.08</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>110</th>\n",
" <td>0.03</td>\n",
" <td>0.38</td>\n",
" <td>0.07</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>111</th>\n",
" <td>0.17</td>\n",
" <td>0.46</td>\n",
" <td>0.08</td>\n",
" <td>0.00</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>112</th>\n",
" <td>0.31</td>\n",
" <td>0.71</td>\n",
" <td>0.08</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>113</th>\n",
" <td>0.14</td>\n",
" <td>0.58</td>\n",
" <td>0.10</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>114</th>\n",
" <td>0.14</td>\n",
" <td>0.42</td>\n",
" <td>0.07</td>\n",
" <td>0.00</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>115</th>\n",
" <td>0.00</td>\n",
" <td>0.42</td>\n",
" <td>0.02</td>\n",
" <td>0.00</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>116</th>\n",
" <td>0.42</td>\n",
" <td>0.83</td>\n",
" <td>0.03</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>117</th>\n",
" <td>0.39</td>\n",
" <td>1.00</td>\n",
" <td>0.08</td>\n",
" <td>0.12</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>118</th>\n",
" <td>0.31</td>\n",
" <td>0.79</td>\n",
" <td>0.05</td>\n",
" <td>0.12</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>119</th>\n",
" <td>0.22</td>\n",
" <td>0.62</td>\n",
" <td>0.07</td>\n",
" <td>0.08</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>120</th>\n",
" <td>0.39</td>\n",
" <td>0.75</td>\n",
" <td>0.12</td>\n",
" <td>0.08</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>121</th>\n",
" <td>0.22</td>\n",
" <td>0.75</td>\n",
" <td>0.08</td>\n",
" <td>0.08</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>122</th>\n",
" <td>0.31</td>\n",
" <td>0.58</td>\n",
" <td>0.12</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>123</th>\n",
" <td>0.22</td>\n",
" <td>0.71</td>\n",
" <td>0.08</td>\n",
" <td>0.12</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>124</th>\n",
" <td>0.08</td>\n",
" <td>0.67</td>\n",
" <td>0.00</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>125</th>\n",
" <td>0.22</td>\n",
" <td>0.54</td>\n",
" <td>0.12</td>\n",
" <td>0.17</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>126</th>\n",
" <td>0.14</td>\n",
" <td>0.58</td>\n",
" <td>0.15</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>127</th>\n",
" <td>0.19</td>\n",
" <td>0.42</td>\n",
" <td>0.10</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>128</th>\n",
" <td>0.19</td>\n",
" <td>0.58</td>\n",
" <td>0.10</td>\n",
" <td>0.12</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>129</th>\n",
" <td>0.25</td>\n",
" <td>0.62</td>\n",
" <td>0.08</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>130</th>\n",
" <td>0.25</td>\n",
" <td>0.58</td>\n",
" <td>0.07</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>131</th>\n",
" <td>0.11</td>\n",
" <td>0.50</td>\n",
" <td>0.10</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>132</th>\n",
" <td>0.14</td>\n",
" <td>0.46</td>\n",
" <td>0.10</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>133</th>\n",
" <td>0.31</td>\n",
" <td>0.58</td>\n",
" <td>0.08</td>\n",
" <td>0.12</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>134</th>\n",
" <td>0.25</td>\n",
" <td>0.87</td>\n",
" <td>0.08</td>\n",
" <td>0.00</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>135</th>\n",
" <td>0.33</td>\n",
" <td>0.92</td>\n",
" <td>0.07</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>136</th>\n",
" <td>0.19</td>\n",
" <td>0.50</td>\n",
" <td>0.03</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>137</th>\n",
" <td>0.33</td>\n",
" <td>0.62</td>\n",
" <td>0.05</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>138</th>\n",
" <td>0.03</td>\n",
" <td>0.42</td>\n",
" <td>0.05</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>139</th>\n",
" <td>0.22</td>\n",
" <td>0.58</td>\n",
" <td>0.08</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>140</th>\n",
" <td>0.19</td>\n",
" <td>0.62</td>\n",
" <td>0.05</td>\n",
" <td>0.08</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>141</th>\n",
" <td>0.06</td>\n",
" <td>0.12</td>\n",
" <td>0.05</td>\n",
" <td>0.08</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>142</th>\n",
" <td>0.03</td>\n",
" <td>0.50</td>\n",
" <td>0.05</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>143</th>\n",
" <td>0.19</td>\n",
" <td>0.62</td>\n",
" <td>0.10</td>\n",
" <td>0.21</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>144</th>\n",
" <td>0.22</td>\n",
" <td>0.75</td>\n",
" <td>0.15</td>\n",
" <td>0.12</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>145</th>\n",
" <td>0.14</td>\n",
" <td>0.42</td>\n",
" <td>0.07</td>\n",
" <td>0.08</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>146</th>\n",
" <td>0.22</td>\n",
" <td>0.75</td>\n",
" <td>0.10</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>147</th>\n",
" <td>0.08</td>\n",
" <td>0.50</td>\n",
" <td>0.07</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>148</th>\n",
" <td>0.28</td>\n",
" <td>0.71</td>\n",
" <td>0.08</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>149</th>\n",
" <td>0.19</td>\n",
" <td>0.54</td>\n",
" <td>0.07</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Długość kielicha \\\n",
"0 0.17 \n",
"1 0.17 \n",
"2 0.75 \n",
"3 0.58 \n",
"4 0.72 \n",
"5 0.33 \n",
"6 0.61 \n",
"7 0.39 \n",
"8 0.56 \n",
"9 0.17 \n",
"10 0.64 \n",
"11 0.25 \n",
"12 0.19 \n",
"13 0.44 \n",
"14 0.47 \n",
"15 0.50 \n",
"16 0.36 \n",
"17 0.67 \n",
"18 0.36 \n",
"19 0.42 \n",
"20 0.53 \n",
"21 0.36 \n",
"22 0.44 \n",
"23 0.50 \n",
"24 0.56 \n",
"25 0.50 \n",
"26 0.58 \n",
"27 0.64 \n",
"28 0.69 \n",
"29 0.47 \n",
"30 0.39 \n",
"31 0.33 \n",
"32 0.33 \n",
"33 0.42 \n",
"34 0.47 \n",
"35 0.31 \n",
"36 0.47 \n",
"37 0.67 \n",
"38 0.56 \n",
"39 0.36 \n",
"40 0.33 \n",
"41 0.33 \n",
"42 0.50 \n",
"43 0.42 \n",
"44 0.19 \n",
"45 0.36 \n",
"46 0.39 \n",
"47 0.39 \n",
"48 0.53 \n",
"49 0.22 \n",
"50 0.39 \n",
"51 0.42 \n",
"52 0.17 \n",
"53 0.39 \n",
"54 0.47 \n",
"55 0.36 \n",
"56 0.56 \n",
"57 0.53 \n",
"58 0.50 \n",
"59 0.56 \n",
"60 0.50 \n",
"61 0.47 \n",
"62 0.42 \n",
"63 0.56 \n",
"64 0.44 \n",
"65 0.67 \n",
"66 0.56 \n",
"67 0.78 \n",
"68 0.56 \n",
"69 0.61 \n",
"70 0.92 \n",
"71 0.83 \n",
"72 0.67 \n",
"73 0.81 \n",
"74 0.61 \n",
"75 0.58 \n",
"76 0.69 \n",
"77 0.42 \n",
"78 0.58 \n",
"79 0.61 \n",
"80 0.94 \n",
"81 0.94 \n",
"82 0.72 \n",
"83 0.94 \n",
"84 0.67 \n",
"85 0.81 \n",
"86 0.58 \n",
"87 0.81 \n",
"88 0.86 \n",
"89 1.00 \n",
"90 0.58 \n",
"91 0.94 \n",
"92 0.56 \n",
"93 0.58 \n",
"94 0.72 \n",
"95 0.67 \n",
"96 0.72 \n",
"97 0.69 \n",
"98 0.67 \n",
"99 0.67 \n",
"100 0.61 \n",
"101 0.53 \n",
"102 0.22 \n",
"103 0.17 \n",
"104 0.11 \n",
"105 0.08 \n",
"106 0.19 \n",
"107 0.31 \n",
"108 0.08 \n",
"109 0.19 \n",
"110 0.03 \n",
"111 0.17 \n",
"112 0.31 \n",
"113 0.14 \n",
"114 0.14 \n",
"115 0.00 \n",
"116 0.42 \n",
"117 0.39 \n",
"118 0.31 \n",
"119 0.22 \n",
"120 0.39 \n",
"121 0.22 \n",
"122 0.31 \n",
"123 0.22 \n",
"124 0.08 \n",
"125 0.22 \n",
"126 0.14 \n",
"127 0.19 \n",
"128 0.19 \n",
"129 0.25 \n",
"130 0.25 \n",
"131 0.11 \n",
"132 0.14 \n",
"133 0.31 \n",
"134 0.25 \n",
"135 0.33 \n",
"136 0.19 \n",
"137 0.33 \n",
"138 0.03 \n",
"139 0.22 \n",
"140 0.19 \n",
"141 0.06 \n",
"142 0.03 \n",
"143 0.19 \n",
"144 0.22 \n",
"145 0.14 \n",
"146 0.22 \n",
"147 0.08 \n",
"148 0.28 \n",
"149 0.19 \n",
"\n",
" Szerokość kielicha \\\n",
"0 0.46 \n",
"1 0.46 \n",
"2 0.50 \n",
"3 0.50 \n",
"4 0.46 \n",
"5 0.12 \n",
"6 0.33 \n",
"7 0.33 \n",
"8 0.54 \n",
"9 0.17 \n",
"10 0.38 \n",
"11 0.29 \n",
"12 0.00 \n",
"13 0.42 \n",
"14 0.08 \n",
"15 0.38 \n",
"16 0.38 \n",
"17 0.46 \n",
"18 0.42 \n",
"19 0.29 \n",
"20 0.08 \n",
"21 0.21 \n",
"22 0.50 \n",
"23 0.33 \n",
"24 0.21 \n",
"25 0.33 \n",
"26 0.38 \n",
"27 0.42 \n",
"28 0.33 \n",
"29 0.38 \n",
"30 0.25 \n",
"31 0.17 \n",
"32 0.17 \n",
"33 0.29 \n",
"34 0.29 \n",
"35 0.42 \n",
"36 0.58 \n",
"37 0.46 \n",
"38 0.12 \n",
"39 0.42 \n",
"40 0.21 \n",
"41 0.25 \n",
"42 0.42 \n",
"43 0.25 \n",
"44 0.12 \n",
"45 0.29 \n",
"46 0.42 \n",
"47 0.38 \n",
"48 0.38 \n",
"49 0.21 \n",
"50 0.33 \n",
"51 0.29 \n",
"52 0.21 \n",
"53 0.21 \n",
"54 0.08 \n",
"55 0.33 \n",
"56 0.29 \n",
"57 0.33 \n",
"58 0.42 \n",
"59 0.33 \n",
"60 0.25 \n",
"61 0.42 \n",
"62 0.29 \n",
"63 0.21 \n",
"64 0.42 \n",
"65 0.42 \n",
"66 0.54 \n",
"67 0.42 \n",
"68 0.38 \n",
"69 0.42 \n",
"70 0.42 \n",
"71 0.38 \n",
"72 0.21 \n",
"73 0.67 \n",
"74 0.50 \n",
"75 0.29 \n",
"76 0.42 \n",
"77 0.33 \n",
"78 0.50 \n",
"79 0.42 \n",
"80 0.75 \n",
"81 0.25 \n",
"82 0.50 \n",
"83 0.33 \n",
"84 0.54 \n",
"85 0.50 \n",
"86 0.33 \n",
"87 0.42 \n",
"88 0.33 \n",
"89 0.75 \n",
"90 0.33 \n",
"91 0.42 \n",
"92 0.58 \n",
"93 0.46 \n",
"94 0.46 \n",
"95 0.46 \n",
"96 0.46 \n",
"97 0.50 \n",
"98 0.54 \n",
"99 0.42 \n",
"100 0.42 \n",
"101 0.58 \n",
"102 0.62 \n",
"103 0.42 \n",
"104 0.50 \n",
"105 0.46 \n",
"106 0.67 \n",
"107 0.79 \n",
"108 0.58 \n",
"109 0.58 \n",
"110 0.38 \n",
"111 0.46 \n",
"112 0.71 \n",
"113 0.58 \n",
"114 0.42 \n",
"115 0.42 \n",
"116 0.83 \n",
"117 1.00 \n",
"118 0.79 \n",
"119 0.62 \n",
"120 0.75 \n",
"121 0.75 \n",
"122 0.58 \n",
"123 0.71 \n",
"124 0.67 \n",
"125 0.54 \n",
"126 0.58 \n",
"127 0.42 \n",
"128 0.58 \n",
"129 0.62 \n",
"130 0.58 \n",
"131 0.50 \n",
"132 0.46 \n",
"133 0.58 \n",
"134 0.87 \n",
"135 0.92 \n",
"136 0.50 \n",
"137 0.62 \n",
"138 0.42 \n",
"139 0.58 \n",
"140 0.62 \n",
"141 0.12 \n",
"142 0.50 \n",
"143 0.62 \n",
"144 0.75 \n",
"145 0.42 \n",
"146 0.75 \n",
"147 0.50 \n",
"148 0.71 \n",
"149 0.54 \n",
"\n",
" Długość płatka \\\n",
"0 0.08 \n",
"1 0.08 \n",
"2 0.63 \n",
"3 0.59 \n",
"4 0.66 \n",
"5 0.51 \n",
"6 0.61 \n",
"7 0.59 \n",
"8 0.63 \n",
"9 0.39 \n",
"10 0.61 \n",
"11 0.49 \n",
"12 0.42 \n",
"13 0.54 \n",
"14 0.51 \n",
"15 0.63 \n",
"16 0.44 \n",
"17 0.58 \n",
"18 0.59 \n",
"19 0.53 \n",
"20 0.59 \n",
"21 0.49 \n",
"22 0.64 \n",
"23 0.51 \n",
"24 0.66 \n",
"25 0.63 \n",
"26 0.56 \n",
"27 0.58 \n",
"28 0.64 \n",
"29 0.59 \n",
"30 0.42 \n",
"31 0.47 \n",
"32 0.46 \n",
"33 0.49 \n",
"34 0.69 \n",
"35 0.59 \n",
"36 0.59 \n",
"37 0.63 \n",
"38 0.58 \n",
"39 0.53 \n",
"40 0.51 \n",
"41 0.58 \n",
"42 0.61 \n",
"43 0.51 \n",
"44 0.39 \n",
"45 0.54 \n",
"46 0.54 \n",
"47 0.54 \n",
"48 0.56 \n",
"49 0.34 \n",
"50 0.53 \n",
"51 0.69 \n",
"52 0.59 \n",
"53 0.68 \n",
"54 0.68 \n",
"55 0.66 \n",
"56 0.66 \n",
"57 0.64 \n",
"58 0.66 \n",
"59 0.69 \n",
"60 0.78 \n",
"61 0.64 \n",
"62 0.69 \n",
"63 0.68 \n",
"64 0.69 \n",
"65 0.68 \n",
"66 0.85 \n",
"67 0.83 \n",
"68 0.78 \n",
"69 0.81 \n",
"70 0.95 \n",
"71 0.90 \n",
"72 0.81 \n",
"73 0.86 \n",
"74 0.69 \n",
"75 0.73 \n",
"76 0.76 \n",
"77 0.69 \n",
"78 0.73 \n",
"79 0.76 \n",
"80 0.97 \n",
"81 1.00 \n",
"82 0.80 \n",
"83 0.97 \n",
"84 0.80 \n",
"85 0.85 \n",
"86 0.78 \n",
"87 0.81 \n",
"88 0.86 \n",
"89 0.92 \n",
"90 0.78 \n",
"91 0.86 \n",
"92 0.78 \n",
"93 0.76 \n",
"94 0.75 \n",
"95 0.78 \n",
"96 0.69 \n",
"97 0.83 \n",
"98 0.80 \n",
"99 0.71 \n",
"100 0.71 \n",
"101 0.75 \n",
"102 0.07 \n",
"103 0.07 \n",
"104 0.05 \n",
"105 0.08 \n",
"106 0.07 \n",
"107 0.12 \n",
"108 0.07 \n",
"109 0.08 \n",
"110 0.07 \n",
"111 0.08 \n",
"112 0.08 \n",
"113 0.10 \n",
"114 0.07 \n",
"115 0.02 \n",
"116 0.03 \n",
"117 0.08 \n",
"118 0.05 \n",
"119 0.07 \n",
"120 0.12 \n",
"121 0.08 \n",
"122 0.12 \n",
"123 0.08 \n",
"124 0.00 \n",
"125 0.12 \n",
"126 0.15 \n",
"127 0.10 \n",
"128 0.10 \n",
"129 0.08 \n",
"130 0.07 \n",
"131 0.10 \n",
"132 0.10 \n",
"133 0.08 \n",
"134 0.08 \n",
"135 0.07 \n",
"136 0.03 \n",
"137 0.05 \n",
"138 0.05 \n",
"139 0.08 \n",
"140 0.05 \n",
"141 0.05 \n",
"142 0.05 \n",
"143 0.10 \n",
"144 0.15 \n",
"145 0.07 \n",
"146 0.10 \n",
"147 0.07 \n",
"148 0.08 \n",
"149 0.07 \n",
"\n",
" Szerokość płatka \\\n",
"0 0.00 \n",
"1 0.00 \n",
"2 0.54 \n",
"3 0.58 \n",
"4 0.58 \n",
"5 0.50 \n",
"6 0.58 \n",
"7 0.50 \n",
"8 0.63 \n",
"9 0.38 \n",
"10 0.50 \n",
"11 0.54 \n",
"12 0.38 \n",
"13 0.58 \n",
"14 0.38 \n",
"15 0.54 \n",
"16 0.50 \n",
"17 0.54 \n",
"18 0.58 \n",
"19 0.38 \n",
"20 0.58 \n",
"21 0.42 \n",
"22 0.71 \n",
"23 0.50 \n",
"24 0.58 \n",
"25 0.46 \n",
"26 0.50 \n",
"27 0.54 \n",
"28 0.54 \n",
"29 0.58 \n",
"30 0.38 \n",
"31 0.42 \n",
"32 0.38 \n",
"33 0.46 \n",
"34 0.63 \n",
"35 0.58 \n",
"36 0.63 \n",
"37 0.58 \n",
"38 0.50 \n",
"39 0.50 \n",
"40 0.50 \n",
"41 0.46 \n",
"42 0.54 \n",
"43 0.46 \n",
"44 0.38 \n",
"45 0.50 \n",
"46 0.46 \n",
"47 0.50 \n",
"48 0.50 \n",
"49 0.42 \n",
"50 0.50 \n",
"51 0.75 \n",
"52 0.67 \n",
"53 0.79 \n",
"54 0.58 \n",
"55 0.79 \n",
"56 0.71 \n",
"57 0.71 \n",
"58 0.71 \n",
"59 0.58 \n",
"60 0.54 \n",
"61 0.71 \n",
"62 0.75 \n",
"63 0.75 \n",
"64 0.71 \n",
"65 0.67 \n",
"66 1.00 \n",
"67 0.83 \n",
"68 0.71 \n",
"69 0.88 \n",
"70 0.83 \n",
"71 0.71 \n",
"72 0.71 \n",
"73 1.00 \n",
"74 0.79 \n",
"75 0.75 \n",
"76 0.83 \n",
"77 0.96 \n",
"78 0.92 \n",
"79 0.71 \n",
"80 0.88 \n",
"81 0.92 \n",
"82 0.92 \n",
"83 0.79 \n",
"84 0.83 \n",
"85 0.71 \n",
"86 0.83 \n",
"87 0.63 \n",
"88 0.75 \n",
"89 0.79 \n",
"90 0.88 \n",
"91 0.92 \n",
"92 0.96 \n",
"93 0.71 \n",
"94 0.83 \n",
"95 0.96 \n",
"96 0.92 \n",
"97 0.92 \n",
"98 1.00 \n",
"99 0.92 \n",
"100 0.79 \n",
"101 0.92 \n",
"102 0.04 \n",
"103 0.04 \n",
"104 0.04 \n",
"105 0.04 \n",
"106 0.04 \n",
"107 0.12 \n",
"108 0.08 \n",
"109 0.04 \n",
"110 0.04 \n",
"111 0.00 \n",
"112 0.04 \n",
"113 0.04 \n",
"114 0.00 \n",
"115 0.00 \n",
"116 0.04 \n",
"117 0.12 \n",
"118 0.12 \n",
"119 0.08 \n",
"120 0.08 \n",
"121 0.08 \n",
"122 0.04 \n",
"123 0.12 \n",
"124 0.04 \n",
"125 0.17 \n",
"126 0.04 \n",
"127 0.04 \n",
"128 0.12 \n",
"129 0.04 \n",
"130 0.04 \n",
"131 0.04 \n",
"132 0.04 \n",
"133 0.12 \n",
"134 0.00 \n",
"135 0.04 \n",
"136 0.04 \n",
"137 0.04 \n",
"138 0.04 \n",
"139 0.04 \n",
"140 0.08 \n",
"141 0.08 \n",
"142 0.04 \n",
"143 0.21 \n",
"144 0.12 \n",
"145 0.08 \n",
"146 0.04 \n",
"147 0.04 \n",
"148 0.04 \n",
"149 0.04 \n",
"\n",
" Wartość medoidu 0 \\\n",
"0 (0.47, 0.38, 0.59, 0.58) \n",
"1 (0.47, 0.38, 0.59, 0.58) \n",
"2 (0.47, 0.38, 0.59, 0.58) \n",
"3 (0.47, 0.38, 0.59, 0.58) \n",
"4 (0.47, 0.38, 0.59, 0.58) \n",
"5 (0.47, 0.38, 0.59, 0.58) \n",
"6 (0.47, 0.38, 0.59, 0.58) \n",
"7 (0.47, 0.38, 0.59, 0.58) \n",
"8 (0.47, 0.38, 0.59, 0.58) \n",
"9 (0.47, 0.38, 0.59, 0.58) \n",
"10 (0.47, 0.38, 0.59, 0.58) \n",
"11 (0.47, 0.38, 0.59, 0.58) \n",
"12 (0.47, 0.38, 0.59, 0.58) \n",
"13 (0.47, 0.38, 0.59, 0.58) \n",
"14 (0.47, 0.38, 0.59, 0.58) \n",
"15 (0.47, 0.38, 0.59, 0.58) \n",
"16 (0.47, 0.38, 0.59, 0.58) \n",
"17 (0.47, 0.38, 0.59, 0.58) \n",
"18 (0.47, 0.38, 0.59, 0.58) \n",
"19 (0.47, 0.38, 0.59, 0.58) \n",
"20 (0.47, 0.38, 0.59, 0.58) \n",
"21 (0.47, 0.38, 0.59, 0.58) \n",
"22 (0.47, 0.38, 0.59, 0.58) \n",
"23 (0.47, 0.38, 0.59, 0.58) \n",
"24 (0.47, 0.38, 0.59, 0.58) \n",
"25 (0.47, 0.38, 0.59, 0.58) \n",
"26 (0.47, 0.38, 0.59, 0.58) \n",
"27 (0.47, 0.38, 0.59, 0.58) \n",
"28 (0.47, 0.38, 0.59, 0.58) \n",
"29 (0.47, 0.38, 0.59, 0.58) \n",
"30 (0.47, 0.38, 0.59, 0.58) \n",
"31 (0.47, 0.38, 0.59, 0.58) \n",
"32 (0.47, 0.38, 0.59, 0.58) \n",
"33 (0.47, 0.38, 0.59, 0.58) \n",
"34 (0.47, 0.38, 0.59, 0.58) \n",
"35 (0.47, 0.38, 0.59, 0.58) \n",
"36 (0.47, 0.38, 0.59, 0.58) \n",
"37 (0.47, 0.38, 0.59, 0.58) \n",
"38 (0.47, 0.38, 0.59, 0.58) \n",
"39 (0.47, 0.38, 0.59, 0.58) \n",
"40 (0.47, 0.38, 0.59, 0.58) \n",
"41 (0.47, 0.38, 0.59, 0.58) \n",
"42 (0.47, 0.38, 0.59, 0.58) \n",
"43 (0.47, 0.38, 0.59, 0.58) \n",
"44 (0.47, 0.38, 0.59, 0.58) \n",
"45 (0.47, 0.38, 0.59, 0.58) \n",
"46 (0.47, 0.38, 0.59, 0.58) \n",
"47 (0.47, 0.38, 0.59, 0.58) \n",
"48 (0.47, 0.38, 0.59, 0.58) \n",
"49 (0.47, 0.38, 0.59, 0.58) \n",
"50 (0.47, 0.38, 0.59, 0.58) \n",
"51 (0.47, 0.38, 0.59, 0.58) \n",
"52 (0.47, 0.38, 0.59, 0.58) \n",
"53 (0.47, 0.38, 0.59, 0.58) \n",
"54 (0.47, 0.38, 0.59, 0.58) \n",
"55 (0.47, 0.38, 0.59, 0.58) \n",
"56 (0.47, 0.38, 0.59, 0.58) \n",
"57 (0.47, 0.38, 0.59, 0.58) \n",
"58 (0.47, 0.38, 0.59, 0.58) \n",
"59 (0.47, 0.38, 0.59, 0.58) \n",
"60 (0.47, 0.38, 0.59, 0.58) \n",
"61 (0.47, 0.38, 0.59, 0.58) \n",
"62 (0.47, 0.38, 0.59, 0.58) \n",
"63 (0.47, 0.38, 0.59, 0.58) \n",
"64 (0.47, 0.38, 0.59, 0.58) \n",
"65 (0.47, 0.38, 0.59, 0.58) \n",
"66 (0.47, 0.38, 0.59, 0.58) \n",
"67 (0.47, 0.38, 0.59, 0.58) \n",
"68 (0.47, 0.38, 0.59, 0.58) \n",
"69 (0.47, 0.38, 0.59, 0.58) \n",
"70 (0.47, 0.38, 0.59, 0.58) \n",
"71 (0.47, 0.38, 0.59, 0.58) \n",
"72 (0.47, 0.38, 0.59, 0.58) \n",
"73 (0.47, 0.38, 0.59, 0.58) \n",
"74 (0.47, 0.38, 0.59, 0.58) \n",
"75 (0.47, 0.38, 0.59, 0.58) \n",
"76 (0.47, 0.38, 0.59, 0.58) \n",
"77 (0.47, 0.38, 0.59, 0.58) \n",
"78 (0.47, 0.38, 0.59, 0.58) \n",
"79 (0.47, 0.38, 0.59, 0.58) \n",
"80 (0.47, 0.38, 0.59, 0.58) \n",
"81 (0.47, 0.38, 0.59, 0.58) \n",
"82 (0.47, 0.38, 0.59, 0.58) \n",
"83 (0.47, 0.38, 0.59, 0.58) \n",
"84 (0.47, 0.38, 0.59, 0.58) \n",
"85 (0.47, 0.38, 0.59, 0.58) \n",
"86 (0.47, 0.38, 0.59, 0.58) \n",
"87 (0.47, 0.38, 0.59, 0.58) \n",
"88 (0.47, 0.38, 0.59, 0.58) \n",
"89 (0.47, 0.38, 0.59, 0.58) \n",
"90 (0.47, 0.38, 0.59, 0.58) \n",
"91 (0.47, 0.38, 0.59, 0.58) \n",
"92 (0.47, 0.38, 0.59, 0.58) \n",
"93 (0.47, 0.38, 0.59, 0.58) \n",
"94 (0.47, 0.38, 0.59, 0.58) \n",
"95 (0.47, 0.38, 0.59, 0.58) \n",
"96 (0.47, 0.38, 0.59, 0.58) \n",
"97 (0.47, 0.38, 0.59, 0.58) \n",
"98 (0.47, 0.38, 0.59, 0.58) \n",
"99 (0.47, 0.38, 0.59, 0.58) \n",
"100 (0.47, 0.38, 0.59, 0.58) \n",
"101 (0.47, 0.38, 0.59, 0.58) \n",
"102 (0.47, 0.38, 0.59, 0.58) \n",
"103 (0.47, 0.38, 0.59, 0.58) \n",
"104 (0.47, 0.38, 0.59, 0.58) \n",
"105 (0.47, 0.38, 0.59, 0.58) \n",
"106 (0.47, 0.38, 0.59, 0.58) \n",
"107 (0.47, 0.38, 0.59, 0.58) \n",
"108 (0.47, 0.38, 0.59, 0.58) \n",
"109 (0.47, 0.38, 0.59, 0.58) \n",
"110 (0.47, 0.38, 0.59, 0.58) \n",
"111 (0.47, 0.38, 0.59, 0.58) \n",
"112 (0.47, 0.38, 0.59, 0.58) \n",
"113 (0.47, 0.38, 0.59, 0.58) \n",
"114 (0.47, 0.38, 0.59, 0.58) \n",
"115 (0.47, 0.38, 0.59, 0.58) \n",
"116 (0.47, 0.38, 0.59, 0.58) \n",
"117 (0.47, 0.38, 0.59, 0.58) \n",
"118 (0.47, 0.38, 0.59, 0.58) \n",
"119 (0.47, 0.38, 0.59, 0.58) \n",
"120 (0.47, 0.38, 0.59, 0.58) \n",
"121 (0.47, 0.38, 0.59, 0.58) \n",
"122 (0.47, 0.38, 0.59, 0.58) \n",
"123 (0.47, 0.38, 0.59, 0.58) \n",
"124 (0.47, 0.38, 0.59, 0.58) \n",
"125 (0.47, 0.38, 0.59, 0.58) \n",
"126 (0.47, 0.38, 0.59, 0.58) \n",
"127 (0.47, 0.38, 0.59, 0.58) \n",
"128 (0.47, 0.38, 0.59, 0.58) \n",
"129 (0.47, 0.38, 0.59, 0.58) \n",
"130 (0.47, 0.38, 0.59, 0.58) \n",
"131 (0.47, 0.38, 0.59, 0.58) \n",
"132 (0.47, 0.38, 0.59, 0.58) \n",
"133 (0.47, 0.38, 0.59, 0.58) \n",
"134 (0.47, 0.38, 0.59, 0.58) \n",
"135 (0.47, 0.38, 0.59, 0.58) \n",
"136 (0.47, 0.38, 0.59, 0.58) \n",
"137 (0.47, 0.38, 0.59, 0.58) \n",
"138 (0.47, 0.38, 0.59, 0.58) \n",
"139 (0.47, 0.38, 0.59, 0.58) \n",
"140 (0.47, 0.38, 0.59, 0.58) \n",
"141 (0.47, 0.38, 0.59, 0.58) \n",
"142 (0.47, 0.38, 0.59, 0.58) \n",
"143 (0.47, 0.38, 0.59, 0.58) \n",
"144 (0.47, 0.38, 0.59, 0.58) \n",
"145 (0.47, 0.38, 0.59, 0.58) \n",
"146 (0.47, 0.38, 0.59, 0.58) \n",
"147 (0.47, 0.38, 0.59, 0.58) \n",
"148 (0.47, 0.38, 0.59, 0.58) \n",
"149 (0.47, 0.38, 0.59, 0.58) \n",
"\n",
" Wartość medoidu 1 \\\n",
"0 (0.69, 0.42, 0.76, 0.83) \n",
"1 (0.69, 0.42, 0.76, 0.83) \n",
"2 (0.69, 0.42, 0.76, 0.83) \n",
"3 (0.69, 0.42, 0.76, 0.83) \n",
"4 (0.69, 0.42, 0.76, 0.83) \n",
"5 (0.69, 0.42, 0.76, 0.83) \n",
"6 (0.69, 0.42, 0.76, 0.83) \n",
"7 (0.69, 0.42, 0.76, 0.83) \n",
"8 (0.69, 0.42, 0.76, 0.83) \n",
"9 (0.69, 0.42, 0.76, 0.83) \n",
"10 (0.69, 0.42, 0.76, 0.83) \n",
"11 (0.69, 0.42, 0.76, 0.83) \n",
"12 (0.69, 0.42, 0.76, 0.83) \n",
"13 (0.69, 0.42, 0.76, 0.83) \n",
"14 (0.69, 0.42, 0.76, 0.83) \n",
"15 (0.69, 0.42, 0.76, 0.83) \n",
"16 (0.69, 0.42, 0.76, 0.83) \n",
"17 (0.69, 0.42, 0.76, 0.83) \n",
"18 (0.69, 0.42, 0.76, 0.83) \n",
"19 (0.69, 0.42, 0.76, 0.83) \n",
"20 (0.69, 0.42, 0.76, 0.83) \n",
"21 (0.69, 0.42, 0.76, 0.83) \n",
"22 (0.69, 0.42, 0.76, 0.83) \n",
"23 (0.69, 0.42, 0.76, 0.83) \n",
"24 (0.69, 0.42, 0.76, 0.83) \n",
"25 (0.69, 0.42, 0.76, 0.83) \n",
"26 (0.69, 0.42, 0.76, 0.83) \n",
"27 (0.69, 0.42, 0.76, 0.83) \n",
"28 (0.69, 0.42, 0.76, 0.83) \n",
"29 (0.69, 0.42, 0.76, 0.83) \n",
"30 (0.69, 0.42, 0.76, 0.83) \n",
"31 (0.69, 0.42, 0.76, 0.83) \n",
"32 (0.69, 0.42, 0.76, 0.83) \n",
"33 (0.69, 0.42, 0.76, 0.83) \n",
"34 (0.69, 0.42, 0.76, 0.83) \n",
"35 (0.69, 0.42, 0.76, 0.83) \n",
"36 (0.69, 0.42, 0.76, 0.83) \n",
"37 (0.69, 0.42, 0.76, 0.83) \n",
"38 (0.69, 0.42, 0.76, 0.83) \n",
"39 (0.69, 0.42, 0.76, 0.83) \n",
"40 (0.69, 0.42, 0.76, 0.83) \n",
"41 (0.69, 0.42, 0.76, 0.83) \n",
"42 (0.69, 0.42, 0.76, 0.83) \n",
"43 (0.69, 0.42, 0.76, 0.83) \n",
"44 (0.69, 0.42, 0.76, 0.83) \n",
"45 (0.69, 0.42, 0.76, 0.83) \n",
"46 (0.69, 0.42, 0.76, 0.83) \n",
"47 (0.69, 0.42, 0.76, 0.83) \n",
"48 (0.69, 0.42, 0.76, 0.83) \n",
"49 (0.69, 0.42, 0.76, 0.83) \n",
"50 (0.69, 0.42, 0.76, 0.83) \n",
"51 (0.69, 0.42, 0.76, 0.83) \n",
"52 (0.69, 0.42, 0.76, 0.83) \n",
"53 (0.69, 0.42, 0.76, 0.83) \n",
"54 (0.69, 0.42, 0.76, 0.83) \n",
"55 (0.69, 0.42, 0.76, 0.83) \n",
"56 (0.69, 0.42, 0.76, 0.83) \n",
"57 (0.69, 0.42, 0.76, 0.83) \n",
"58 (0.69, 0.42, 0.76, 0.83) \n",
"59 (0.69, 0.42, 0.76, 0.83) \n",
"60 (0.69, 0.42, 0.76, 0.83) \n",
"61 (0.69, 0.42, 0.76, 0.83) \n",
"62 (0.69, 0.42, 0.76, 0.83) \n",
"63 (0.69, 0.42, 0.76, 0.83) \n",
"64 (0.69, 0.42, 0.76, 0.83) \n",
"65 (0.69, 0.42, 0.76, 0.83) \n",
"66 (0.69, 0.42, 0.76, 0.83) \n",
"67 (0.69, 0.42, 0.76, 0.83) \n",
"68 (0.69, 0.42, 0.76, 0.83) \n",
"69 (0.69, 0.42, 0.76, 0.83) \n",
"70 (0.69, 0.42, 0.76, 0.83) \n",
"71 (0.69, 0.42, 0.76, 0.83) \n",
"72 (0.69, 0.42, 0.76, 0.83) \n",
"73 (0.69, 0.42, 0.76, 0.83) \n",
"74 (0.69, 0.42, 0.76, 0.83) \n",
"75 (0.69, 0.42, 0.76, 0.83) \n",
"76 (0.69, 0.42, 0.76, 0.83) \n",
"77 (0.69, 0.42, 0.76, 0.83) \n",
"78 (0.69, 0.42, 0.76, 0.83) \n",
"79 (0.69, 0.42, 0.76, 0.83) \n",
"80 (0.69, 0.42, 0.76, 0.83) \n",
"81 (0.69, 0.42, 0.76, 0.83) \n",
"82 (0.69, 0.42, 0.76, 0.83) \n",
"83 (0.69, 0.42, 0.76, 0.83) \n",
"84 (0.69, 0.42, 0.76, 0.83) \n",
"85 (0.69, 0.42, 0.76, 0.83) \n",
"86 (0.69, 0.42, 0.76, 0.83) \n",
"87 (0.69, 0.42, 0.76, 0.83) \n",
"88 (0.69, 0.42, 0.76, 0.83) \n",
"89 (0.69, 0.42, 0.76, 0.83) \n",
"90 (0.69, 0.42, 0.76, 0.83) \n",
"91 (0.69, 0.42, 0.76, 0.83) \n",
"92 (0.69, 0.42, 0.76, 0.83) \n",
"93 (0.69, 0.42, 0.76, 0.83) \n",
"94 (0.69, 0.42, 0.76, 0.83) \n",
"95 (0.69, 0.42, 0.76, 0.83) \n",
"96 (0.69, 0.42, 0.76, 0.83) \n",
"97 (0.69, 0.42, 0.76, 0.83) \n",
"98 (0.69, 0.42, 0.76, 0.83) \n",
"99 (0.69, 0.42, 0.76, 0.83) \n",
"100 (0.69, 0.42, 0.76, 0.83) \n",
"101 (0.69, 0.42, 0.76, 0.83) \n",
"102 (0.69, 0.42, 0.76, 0.83) \n",
"103 (0.69, 0.42, 0.76, 0.83) \n",
"104 (0.69, 0.42, 0.76, 0.83) \n",
"105 (0.69, 0.42, 0.76, 0.83) \n",
"106 (0.69, 0.42, 0.76, 0.83) \n",
"107 (0.69, 0.42, 0.76, 0.83) \n",
"108 (0.69, 0.42, 0.76, 0.83) \n",
"109 (0.69, 0.42, 0.76, 0.83) \n",
"110 (0.69, 0.42, 0.76, 0.83) \n",
"111 (0.69, 0.42, 0.76, 0.83) \n",
"112 (0.69, 0.42, 0.76, 0.83) \n",
"113 (0.69, 0.42, 0.76, 0.83) \n",
"114 (0.69, 0.42, 0.76, 0.83) \n",
"115 (0.69, 0.42, 0.76, 0.83) \n",
"116 (0.69, 0.42, 0.76, 0.83) \n",
"117 (0.69, 0.42, 0.76, 0.83) \n",
"118 (0.69, 0.42, 0.76, 0.83) \n",
"119 (0.69, 0.42, 0.76, 0.83) \n",
"120 (0.69, 0.42, 0.76, 0.83) \n",
"121 (0.69, 0.42, 0.76, 0.83) \n",
"122 (0.69, 0.42, 0.76, 0.83) \n",
"123 (0.69, 0.42, 0.76, 0.83) \n",
"124 (0.69, 0.42, 0.76, 0.83) \n",
"125 (0.69, 0.42, 0.76, 0.83) \n",
"126 (0.69, 0.42, 0.76, 0.83) \n",
"127 (0.69, 0.42, 0.76, 0.83) \n",
"128 (0.69, 0.42, 0.76, 0.83) \n",
"129 (0.69, 0.42, 0.76, 0.83) \n",
"130 (0.69, 0.42, 0.76, 0.83) \n",
"131 (0.69, 0.42, 0.76, 0.83) \n",
"132 (0.69, 0.42, 0.76, 0.83) \n",
"133 (0.69, 0.42, 0.76, 0.83) \n",
"134 (0.69, 0.42, 0.76, 0.83) \n",
"135 (0.69, 0.42, 0.76, 0.83) \n",
"136 (0.69, 0.42, 0.76, 0.83) \n",
"137 (0.69, 0.42, 0.76, 0.83) \n",
"138 (0.69, 0.42, 0.76, 0.83) \n",
"139 (0.69, 0.42, 0.76, 0.83) \n",
"140 (0.69, 0.42, 0.76, 0.83) \n",
"141 (0.69, 0.42, 0.76, 0.83) \n",
"142 (0.69, 0.42, 0.76, 0.83) \n",
"143 (0.69, 0.42, 0.76, 0.83) \n",
"144 (0.69, 0.42, 0.76, 0.83) \n",
"145 (0.69, 0.42, 0.76, 0.83) \n",
"146 (0.69, 0.42, 0.76, 0.83) \n",
"147 (0.69, 0.42, 0.76, 0.83) \n",
"148 (0.69, 0.42, 0.76, 0.83) \n",
"149 (0.69, 0.42, 0.76, 0.83) \n",
"\n",
" Wartość medoidu 2 \\\n",
"0 (0.19, 0.58, 0.08, 0.04) \n",
"1 (0.19, 0.58, 0.08, 0.04) \n",
"2 (0.19, 0.58, 0.08, 0.04) \n",
"3 (0.19, 0.58, 0.08, 0.04) \n",
"4 (0.19, 0.58, 0.08, 0.04) \n",
"5 (0.19, 0.58, 0.08, 0.04) \n",
"6 (0.19, 0.58, 0.08, 0.04) \n",
"7 (0.19, 0.58, 0.08, 0.04) \n",
"8 (0.19, 0.58, 0.08, 0.04) \n",
"9 (0.19, 0.58, 0.08, 0.04) \n",
"10 (0.19, 0.58, 0.08, 0.04) \n",
"11 (0.19, 0.58, 0.08, 0.04) \n",
"12 (0.19, 0.58, 0.08, 0.04) \n",
"13 (0.19, 0.58, 0.08, 0.04) \n",
"14 (0.19, 0.58, 0.08, 0.04) \n",
"15 (0.19, 0.58, 0.08, 0.04) \n",
"16 (0.19, 0.58, 0.08, 0.04) \n",
"17 (0.19, 0.58, 0.08, 0.04) \n",
"18 (0.19, 0.58, 0.08, 0.04) \n",
"19 (0.19, 0.58, 0.08, 0.04) \n",
"20 (0.19, 0.58, 0.08, 0.04) \n",
"21 (0.19, 0.58, 0.08, 0.04) \n",
"22 (0.19, 0.58, 0.08, 0.04) \n",
"23 (0.19, 0.58, 0.08, 0.04) \n",
"24 (0.19, 0.58, 0.08, 0.04) \n",
"25 (0.19, 0.58, 0.08, 0.04) \n",
"26 (0.19, 0.58, 0.08, 0.04) \n",
"27 (0.19, 0.58, 0.08, 0.04) \n",
"28 (0.19, 0.58, 0.08, 0.04) \n",
"29 (0.19, 0.58, 0.08, 0.04) \n",
"30 (0.19, 0.58, 0.08, 0.04) \n",
"31 (0.19, 0.58, 0.08, 0.04) \n",
"32 (0.19, 0.58, 0.08, 0.04) \n",
"33 (0.19, 0.58, 0.08, 0.04) \n",
"34 (0.19, 0.58, 0.08, 0.04) \n",
"35 (0.19, 0.58, 0.08, 0.04) \n",
"36 (0.19, 0.58, 0.08, 0.04) \n",
"37 (0.19, 0.58, 0.08, 0.04) \n",
"38 (0.19, 0.58, 0.08, 0.04) \n",
"39 (0.19, 0.58, 0.08, 0.04) \n",
"40 (0.19, 0.58, 0.08, 0.04) \n",
"41 (0.19, 0.58, 0.08, 0.04) \n",
"42 (0.19, 0.58, 0.08, 0.04) \n",
"43 (0.19, 0.58, 0.08, 0.04) \n",
"44 (0.19, 0.58, 0.08, 0.04) \n",
"45 (0.19, 0.58, 0.08, 0.04) \n",
"46 (0.19, 0.58, 0.08, 0.04) \n",
"47 (0.19, 0.58, 0.08, 0.04) \n",
"48 (0.19, 0.58, 0.08, 0.04) \n",
"49 (0.19, 0.58, 0.08, 0.04) \n",
"50 (0.19, 0.58, 0.08, 0.04) \n",
"51 (0.19, 0.58, 0.08, 0.04) \n",
"52 (0.19, 0.58, 0.08, 0.04) \n",
"53 (0.19, 0.58, 0.08, 0.04) \n",
"54 (0.19, 0.58, 0.08, 0.04) \n",
"55 (0.19, 0.58, 0.08, 0.04) \n",
"56 (0.19, 0.58, 0.08, 0.04) \n",
"57 (0.19, 0.58, 0.08, 0.04) \n",
"58 (0.19, 0.58, 0.08, 0.04) \n",
"59 (0.19, 0.58, 0.08, 0.04) \n",
"60 (0.19, 0.58, 0.08, 0.04) \n",
"61 (0.19, 0.58, 0.08, 0.04) \n",
"62 (0.19, 0.58, 0.08, 0.04) \n",
"63 (0.19, 0.58, 0.08, 0.04) \n",
"64 (0.19, 0.58, 0.08, 0.04) \n",
"65 (0.19, 0.58, 0.08, 0.04) \n",
"66 (0.19, 0.58, 0.08, 0.04) \n",
"67 (0.19, 0.58, 0.08, 0.04) \n",
"68 (0.19, 0.58, 0.08, 0.04) \n",
"69 (0.19, 0.58, 0.08, 0.04) \n",
"70 (0.19, 0.58, 0.08, 0.04) \n",
"71 (0.19, 0.58, 0.08, 0.04) \n",
"72 (0.19, 0.58, 0.08, 0.04) \n",
"73 (0.19, 0.58, 0.08, 0.04) \n",
"74 (0.19, 0.58, 0.08, 0.04) \n",
"75 (0.19, 0.58, 0.08, 0.04) \n",
"76 (0.19, 0.58, 0.08, 0.04) \n",
"77 (0.19, 0.58, 0.08, 0.04) \n",
"78 (0.19, 0.58, 0.08, 0.04) \n",
"79 (0.19, 0.58, 0.08, 0.04) \n",
"80 (0.19, 0.58, 0.08, 0.04) \n",
"81 (0.19, 0.58, 0.08, 0.04) \n",
"82 (0.19, 0.58, 0.08, 0.04) \n",
"83 (0.19, 0.58, 0.08, 0.04) \n",
"84 (0.19, 0.58, 0.08, 0.04) \n",
"85 (0.19, 0.58, 0.08, 0.04) \n",
"86 (0.19, 0.58, 0.08, 0.04) \n",
"87 (0.19, 0.58, 0.08, 0.04) \n",
"88 (0.19, 0.58, 0.08, 0.04) \n",
"89 (0.19, 0.58, 0.08, 0.04) \n",
"90 (0.19, 0.58, 0.08, 0.04) \n",
"91 (0.19, 0.58, 0.08, 0.04) \n",
"92 (0.19, 0.58, 0.08, 0.04) \n",
"93 (0.19, 0.58, 0.08, 0.04) \n",
"94 (0.19, 0.58, 0.08, 0.04) \n",
"95 (0.19, 0.58, 0.08, 0.04) \n",
"96 (0.19, 0.58, 0.08, 0.04) \n",
"97 (0.19, 0.58, 0.08, 0.04) \n",
"98 (0.19, 0.58, 0.08, 0.04) \n",
"99 (0.19, 0.58, 0.08, 0.04) \n",
"100 (0.19, 0.58, 0.08, 0.04) \n",
"101 (0.19, 0.58, 0.08, 0.04) \n",
"102 (0.19, 0.58, 0.08, 0.04) \n",
"103 (0.19, 0.58, 0.08, 0.04) \n",
"104 (0.19, 0.58, 0.08, 0.04) \n",
"105 (0.19, 0.58, 0.08, 0.04) \n",
"106 (0.19, 0.58, 0.08, 0.04) \n",
"107 (0.19, 0.58, 0.08, 0.04) \n",
"108 (0.19, 0.58, 0.08, 0.04) \n",
"109 (0.19, 0.58, 0.08, 0.04) \n",
"110 (0.19, 0.58, 0.08, 0.04) \n",
"111 (0.19, 0.58, 0.08, 0.04) \n",
"112 (0.19, 0.58, 0.08, 0.04) \n",
"113 (0.19, 0.58, 0.08, 0.04) \n",
"114 (0.19, 0.58, 0.08, 0.04) \n",
"115 (0.19, 0.58, 0.08, 0.04) \n",
"116 (0.19, 0.58, 0.08, 0.04) \n",
"117 (0.19, 0.58, 0.08, 0.04) \n",
"118 (0.19, 0.58, 0.08, 0.04) \n",
"119 (0.19, 0.58, 0.08, 0.04) \n",
"120 (0.19, 0.58, 0.08, 0.04) \n",
"121 (0.19, 0.58, 0.08, 0.04) \n",
"122 (0.19, 0.58, 0.08, 0.04) \n",
"123 (0.19, 0.58, 0.08, 0.04) \n",
"124 (0.19, 0.58, 0.08, 0.04) \n",
"125 (0.19, 0.58, 0.08, 0.04) \n",
"126 (0.19, 0.58, 0.08, 0.04) \n",
"127 (0.19, 0.58, 0.08, 0.04) \n",
"128 (0.19, 0.58, 0.08, 0.04) \n",
"129 (0.19, 0.58, 0.08, 0.04) \n",
"130 (0.19, 0.58, 0.08, 0.04) \n",
"131 (0.19, 0.58, 0.08, 0.04) \n",
"132 (0.19, 0.58, 0.08, 0.04) \n",
"133 (0.19, 0.58, 0.08, 0.04) \n",
"134 (0.19, 0.58, 0.08, 0.04) \n",
"135 (0.19, 0.58, 0.08, 0.04) \n",
"136 (0.19, 0.58, 0.08, 0.04) \n",
"137 (0.19, 0.58, 0.08, 0.04) \n",
"138 (0.19, 0.58, 0.08, 0.04) \n",
"139 (0.19, 0.58, 0.08, 0.04) \n",
"140 (0.19, 0.58, 0.08, 0.04) \n",
"141 (0.19, 0.58, 0.08, 0.04) \n",
"142 (0.19, 0.58, 0.08, 0.04) \n",
"143 (0.19, 0.58, 0.08, 0.04) \n",
"144 (0.19, 0.58, 0.08, 0.04) \n",
"145 (0.19, 0.58, 0.08, 0.04) \n",
"146 (0.19, 0.58, 0.08, 0.04) \n",
"147 (0.19, 0.58, 0.08, 0.04) \n",
"148 (0.19, 0.58, 0.08, 0.04) \n",
"149 (0.19, 0.58, 0.08, 0.04) \n",
"\n",
" Medoid \n",
"0 2 \n",
"1 2 \n",
"2 2 \n",
"3 2 \n",
"4 2 \n",
"5 2 \n",
"6 2 \n",
"7 2 \n",
"8 2 \n",
"9 2 \n",
"10 2 \n",
"11 2 \n",
"12 2 \n",
"13 2 \n",
"14 2 \n",
"15 2 \n",
"16 2 \n",
"17 2 \n",
"18 2 \n",
"19 2 \n",
"20 2 \n",
"21 2 \n",
"22 2 \n",
"23 2 \n",
"24 2 \n",
"25 2 \n",
"26 2 \n",
"27 2 \n",
"28 2 \n",
"29 2 \n",
"30 2 \n",
"31 2 \n",
"32 2 \n",
"33 2 \n",
"34 0 \n",
"35 2 \n",
"36 2 \n",
"37 0 \n",
"38 2 \n",
"39 2 \n",
"40 2 \n",
"41 2 \n",
"42 2 \n",
"43 2 \n",
"44 2 \n",
"45 2 \n",
"46 2 \n",
"47 2 \n",
"48 2 \n",
"49 2 \n",
"50 0 \n",
"51 0 \n",
"52 0 \n",
"53 0 \n",
"54 0 \n",
"55 0 \n",
"56 0 \n",
"57 0 \n",
"58 0 \n",
"59 0 \n",
"60 0 \n",
"61 0 \n",
"62 0 \n",
"63 0 \n",
"64 0 \n",
"65 0 \n",
"66 0 \n",
"67 0 \n",
"68 0 \n",
"69 0 \n",
"70 0 \n",
"71 0 \n",
"72 0 \n",
"73 0 \n",
"74 0 \n",
"75 0 \n",
"76 0 \n",
"77 1 \n",
"78 0 \n",
"79 0 \n",
"80 0 \n",
"81 0 \n",
"82 0 \n",
"83 0 \n",
"84 0 \n",
"85 0 \n",
"86 0 \n",
"87 0 \n",
"88 0 \n",
"89 0 \n",
"90 0 \n",
"91 0 \n",
"92 0 \n",
"93 0 \n",
"94 0 \n",
"95 0 \n",
"96 0 \n",
"97 0 \n",
"98 0 \n",
"99 0 \n",
"100 1 \n",
"101 0 \n",
"102 1 \n",
"103 1 \n",
"104 1 \n",
"105 1 \n",
"106 0 \n",
"107 1 \n",
"108 1 \n",
"109 1 \n",
"110 1 \n",
"111 1 \n",
"112 1 \n",
"113 0 \n",
"114 1 \n",
"115 1 \n",
"116 1 \n",
"117 1 \n",
"118 1 \n",
"119 0 \n",
"120 1 \n",
"121 0 \n",
"122 1 \n",
"123 0 \n",
"124 1 \n",
"125 1 \n",
"126 0 \n",
"127 0 \n",
"128 1 \n",
"129 1 \n",
"130 1 \n",
"131 1 \n",
"132 1 \n",
"133 0 \n",
"134 0 \n",
"135 1 \n",
"136 1 \n",
"137 1 \n",
"138 0 \n",
"139 1 \n",
"140 1 \n",
"141 1 \n",
"142 0 \n",
"143 1 \n",
"144 1 \n",
"145 1 \n",
"146 0 \n",
"147 1 \n",
"148 1 \n",
"149 0 "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# iris\n",
"model4 = TrainModel_medoids(dataset, 3)\n",
"medoids4, res_cluster4, cluster_labels4, silhouette4 = model4.return_values()\n",
2022-06-07 17:23:39 +02:00
"\n",
2022-06-17 19:53:34 +02:00
"res = res_cluster4[0] + res_cluster4[1] + res_cluster4[2]\n",
"\n",
"data = {'Długość kielicha': [round(res[i][0],2) for i in range(0, len(res))],\n",
" 'Szerokość kielicha': [round(res[i][1],2) for i in range(0, len(res))],\n",
" 'Długość płatka': [round(res[i][2],2) for i in range(0, len(res))],\n",
" 'Szerokość płatka': [round(res[i][3],2) for i in range(0, len(res))],\n",
" 'Wartość medoidu 0': [(round(medoids4[0][0],2),round(medoids4[0][1],2), round(medoids4[0][2],2), round(medoids4[0][3],2)) for i in range(150)],\n",
" 'Wartość medoidu 1': [(round(medoids4[1][0],2), round(medoids4[1][1],2), round(medoids4[1][2],2), round(medoids4[1][3],2)) for i in range(150)],\n",
" 'Wartość medoidu 2': [(round(medoids4[2][0],2), round(medoids4[2][1],2), round(medoids4[2][2],2), round(medoids4[2][3],2)) for i in range(150)],\n",
" 'Medoid': cluster_labels4}\n",
"df = pd.DataFrame(data)\n",
"df.to_csv('iris_data.csv')\n",
"\n",
"pd.set_option('display.max_rows', None)\n",
"pd.set_option('display.max_columns', None)\n",
"pd.set_option('display.width', 10)\n",
"pd.set_option('display.colheader_justify', 'center')\n",
"pd.set_option('display.precision', 5)\n",
"display(df)"
]
},
{
"cell_type": "markdown",
"id": "655da39a",
"metadata": {},
"source": [
"#### Uruchomienie algorytmu k-medoid dla zbioru danych glass"
2022-06-07 17:23:39 +02:00
]
},
{
"cell_type": "code",
2022-06-17 19:53:34 +02:00
"execution_count": 36,
"id": "bb83f704",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Sylwetka (ang.silhouette) dla metody k-medoid i dla k = 4 0.35\n"
]
2022-06-15 22:16:06 +02:00
}
2022-06-17 19:53:34 +02:00
],
"source": [
"# glass\n",
"model5 = TrainModel_medoids(dataset2, 4)\n",
"medoids5, res_cluster5, cluster_labels5, silhouette5 = model5.return_values()"
]
},
{
"cell_type": "markdown",
"id": "17f279ec",
"metadata": {},
"source": [
"#### Uruchomienie algorytmu k-medoid dla zbioru danych wine"
]
},
{
"cell_type": "code",
"execution_count": 74,
"id": "6ffe3810",
"metadata": {},
2022-06-15 22:16:06 +02:00
"outputs": [
{
2022-06-17 19:53:34 +02:00
"name": "stdout",
"output_type": "stream",
"text": [
"Sylwetka (ang.silhouette) dla metody k-medoid i dla k = 3 0.28\n"
2022-06-15 22:16:06 +02:00
]
}
],
"source": [
2022-06-17 19:53:34 +02:00
"# wine\n",
"model6 = TrainModel_medoids(dataset3, 3)\n",
"medoids6, res_cluster6, cluster_labels6, silhouette6 = model6.return_values()"
]
},
{
"cell_type": "markdown",
"id": "3db40fc5",
"metadata": {},
"source": [
"### Algorytm k-medoid + PCA"
]
},
{
"cell_type": "code",
"execution_count": 39,
"id": "662d4cf5",
"metadata": {},
"outputs": [],
"source": [
"pca = PCA(n_components=2)"
]
},
{
"cell_type": "markdown",
"id": "ab279486",
"metadata": {},
"source": [
"#### Redukcja wymiaru z 4 do 2 przy pomocy PCA na zbiorze danych iris"
]
},
{
"cell_type": "code",
"execution_count": 40,
"id": "21f2332b",
"metadata": {},
"outputs": [],
"source": [
"pca.fit(dataset)\n",
"dataset_pca = pca.transform(dataset)"
]
},
{
"cell_type": "code",
"execution_count": 47,
"id": "71128af5",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Sylwetka (ang.silhouette) dla metody k-medoid i dla k = 3 0.5\n"
]
}
],
"source": [
"# iris\n",
"model7 = TrainModel_medoids(dataset_pca, 3)\n",
"medoids7, res_cluster7, cluster_labels7, silhouette7 = model7.return_values()"
]
},
{
"cell_type": "markdown",
"id": "7a82f399",
"metadata": {},
"source": [
"#### Redukcja wymiaru z 9 do 2 przy pomocy PCA na zbiorze danych glass"
]
},
{
"cell_type": "code",
"execution_count": 42,
"id": "5c305f99",
"metadata": {},
"outputs": [],
"source": [
"pca.fit(dataset2)\n",
"dataset2_pca = pca.transform(dataset2)"
]
},
{
"cell_type": "code",
"execution_count": 43,
"id": "e4621daf",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Sylwetka (ang.silhouette) dla metody k-medoid i dla k = 4 0.5\n"
]
}
],
"source": [
"# glass\n",
"model8 = TrainModel_medoids(dataset2_pca, 4)\n",
"medoids8, res_cluster8, cluster_labels8, silhouette8 = model8.return_values()"
]
},
{
"cell_type": "markdown",
"id": "14a5a5dd",
"metadata": {},
"source": [
"#### Redukcja wymiaru z 13 do 2 przy pomocy PCA na zbiorze danych wine"
]
},
{
"cell_type": "code",
"execution_count": 48,
"id": "b63e355c",
"metadata": {},
"outputs": [],
"source": [
"pca.fit(dataset3)\n",
"dataset3_pca = pca.transform(dataset3)"
]
},
{
"cell_type": "code",
"execution_count": 49,
"id": "bf13c5e4",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Sylwetka (ang.silhouette) dla metody k-medoid i dla k = 3 0.45\n"
]
}
],
"source": [
"# wine\n",
"model9 = TrainModel_medoids(dataset3_pca, 3)\n",
"medoids9, res_cluster9, cluster_labels9, silhouette9 = model9.return_values()"
]
},
{
"cell_type": "markdown",
"id": "ba1dd5c6",
"metadata": {},
"source": [
"### Porównanie metody k-średnich, k-medoid, k-medoid + PCA"
]
},
{
"cell_type": "markdown",
"id": "80537977",
"metadata": {},
"source": [
" W celu porównania przedstawionych powyżej trzech metod został stworzony wykres. Na wykresie zostały porównane wartości sylwetek trzech metod na trzech zbiorach danych (iris, glass, wine): "
]
},
{
"cell_type": "code",
"execution_count": 125,
"id": "c5909200",
"metadata": {},
"outputs": [],
"source": [
"result_data = {'Iris': [silhouette, silhouette4, silhouette7],\n",
" 'Glass': [silhouette2, silhouette5, silhouette8],\n",
" 'Wine': [silhouette3, silhouette6, silhouette9]}\n",
"df_shoulette = pd.DataFrame(result_data)\n",
"df_shoulette.index = ['k-średnich', 'k-medoid', 'k-medoid + PCA']"
]
},
{
"cell_type": "code",
"execution_count": 126,
"id": "a8983527",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "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
"text/plain": [
"<Figure size 864x576 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"barWidth = 0.25\n",
"fig = plt.subplots(figsize =(12, 8))\n",
2022-06-15 22:16:06 +02:00
"\n",
2022-06-17 19:53:34 +02:00
"iris = [silhouette, silhouette2, silhouette3]\n",
"glass = [silhouette4, silhouette5, silhouette6]\n",
"wine = [silhouette7, silhouette8, silhouette9]\n",
"\n",
"br1 = np.arange(len(iris))\n",
"br2 = [x + barWidth for x in br1]\n",
"br3 = [x + barWidth for x in br2]\n",
"\n",
"plt.bar(br1, iris, color ='y', width = barWidth, edgecolor ='grey', label ='k-średnich')\n",
"plt.bar(br2, glass, color ='m', width = barWidth, edgecolor ='grey', label ='k-medoid')\n",
"plt.bar(br3, wine, color ='c', width = barWidth, edgecolor ='grey', label ='k-medoid + PCA')\n",
"\n",
"plt.xlabel('Zbiór danych', fontsize = 15)\n",
"plt.ylabel('Wartość sylwetki', fontsize = 15)\n",
"plt.xticks([r + barWidth for r in range(len(iris))], ['Iris', 'Glass', 'Wine'])\n",
"\n",
"plt.legend()\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 127,
"id": "74fc7277",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: center;\">\n",
" <th></th>\n",
" <th>Iris</th>\n",
" <th>Glass</th>\n",
" <th>Wine</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>k-średnich</th>\n",
" <td>0.44</td>\n",
" <td>0.28</td>\n",
" <td>0.30</td>\n",
" </tr>\n",
" <tr>\n",
" <th>k-medoid</th>\n",
" <td>0.48</td>\n",
" <td>0.35</td>\n",
" <td>0.28</td>\n",
" </tr>\n",
" <tr>\n",
" <th>k-medoid + PCA</th>\n",
" <td>0.50</td>\n",
" <td>0.50</td>\n",
" <td>0.45</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Iris \\\n",
"k-średnich 0.44 \n",
"k-medoid 0.48 \n",
"k-medoid + PCA 0.50 \n",
"\n",
" Glass \\\n",
"k-średnich 0.28 \n",
"k-medoid 0.35 \n",
"k-medoid + PCA 0.50 \n",
"\n",
" Wine \n",
"k-średnich 0.30 \n",
"k-medoid 0.28 \n",
"k-medoid + PCA 0.45 "
]
},
"execution_count": 127,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_shoulette"
]
},
{
"cell_type": "markdown",
"id": "cf18c7b0",
"metadata": {},
"source": [
" W wyniku tego porównania można dojść do wniosku, że najlepszą z metod jest metoda k-medoid wraz z redukcją wymiaru zbiorów danych przy pomocy PCA. "
2022-06-15 22:16:06 +02:00
]
2022-06-07 17:23:39 +02:00
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.13"
}
},
"nbformat": 4,
"nbformat_minor": 5
2022-06-17 19:53:34 +02:00
}