svd_mpsic/kmedoids.ipynb

4222 lines
514 KiB
Plaintext
Raw Permalink Normal View History

{
"cells": [
{
"cell_type": "code",
2022-06-20 18:39:28 +02:00
"execution_count": 76,
"id": "e6e27297",
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"import random\n",
2022-06-20 11:07:41 +02:00
"import time\n",
"import matplotlib.pyplot as plt\n",
2022-06-20 11:07:41 +02:00
"import seaborn as sns\n",
"from sklearn.preprocessing import MinMaxScaler\n",
"from sklearn.metrics import silhouette_score\n",
"from sklearn.decomposition import PCA\n",
2022-06-20 11:07:41 +02:00
"from IPython.display import Image\n",
"from sklearn.datasets import make_classification, make_blobs"
]
},
{
"cell_type": "markdown",
"id": "e1e5a2b7",
2022-06-15 22:16:06 +02:00
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"# Analiza skupień metodą k-medoids "
]
},
{
"cell_type": "markdown",
"id": "80d5deaf",
2022-06-15 22:16:06 +02:00
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"### Co to jest klasteryzacja? "
]
},
{
"cell_type": "markdown",
"id": "4040df16",
2022-06-15 22:16:06 +02:00
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
" 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. "
]
},
{
"cell_type": "markdown",
"id": "493a0d16",
"metadata": {},
"source": [
" Idea algorytmu klastrowania:"
]
},
{
"cell_type": "code",
2022-06-20 18:39:28 +02:00
"execution_count": 77,
"id": "e84b8c18",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAApUAAAFTCAYAAABoCPeTAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAClaADAAQAAAAB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1112nWS9evNi0NL8poYaGBnnggQfk3//+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>"
]
},
2022-06-20 18:39:28 +02:00
"execution_count": 77,
"metadata": {},
"output_type": "execute_result"
2022-06-15 22:16:06 +02:00
}
],
"source": [
"Image(\"algorithm.png\")"
]
},
{
"cell_type": "markdown",
"id": "5813bd1a",
"metadata": {},
"source": [
"&emsp;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"
}
},
"source": [
"&emsp;W naszym projekcie przedstawimy metodę $k-medoid$ i porównamy ją z metodą $k-średnich$."
]
},
{
"cell_type": "markdown",
"id": "2e28109b",
"metadata": {},
"source": [
"### Algorytm k-średnich"
]
},
{
"cell_type": "markdown",
"id": "01b24fd7",
"metadata": {},
"source": [
"&emsp;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": [
"&emsp;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": [
"&emsp;Główne zadanie algorytmu $k-średnich$ jest następujące:\n",
"\n",
"&emsp;&emsp;$1.$ Wybierz liczbę klastrów $k$. \n",
"&emsp;&emsp;$2.$ Wybierz losowo $k$ punktów z zestawu danych jako centroidy. \n",
"&emsp;&emsp;$3.$ Przypisz każdy punkt danych do najbliższego mu centroida. \n",
"&emsp;&emsp;$4.$ Oblicz wariancję i umieść nowy centroid dla każdego klastra. \n",
"&emsp;&emsp;$5.$ Powtórz $krok 3$, czyli ponownie przypisz każdy punkt danych do nowego najbliższego centroidu."
]
},
{
"cell_type": "markdown",
"id": "15d683c2",
"metadata": {},
"source": [
"&emsp;**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",
2022-06-21 15:37:48 +02:00
"execution_count": 118,
"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",
2022-06-21 15:37:48 +02:00
" print(\"Sylwetka (ang.silhouette) dla metody k-średnich 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",
2022-06-21 15:37:48 +02:00
"execution_count": 130,
"id": "b42a9194",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2022-06-21 15:37:48 +02:00
"Sylwetka (ang.silhouette) dla metody k-średnich i dla k = 3 0.44\n"
]
2022-06-15 22:16:06 +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",
2022-06-21 15:37:48 +02:00
"execution_count": 131,
"id": "15541704",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2022-06-21 15:37:48 +02:00
"Sylwetka (ang.silhouette) dla metody k-średnich i dla k = 4 0.33\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",
2022-06-21 15:37:48 +02:00
"execution_count": 132,
"id": "c29dca2b",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2022-06-21 15:37:48 +02:00
"Sylwetka (ang.silhouette) dla metody k-średnich i dla k = 3 0.3\n"
]
}
],
"source": [
"# 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()"
]
},
{
"cell_type": "markdown",
"id": "f7c684c9",
2022-06-15 22:16:06 +02:00
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"### Algorytm k-medoid"
]
},
{
"cell_type": "markdown",
"id": "af45d7c7",
2022-06-15 22:16:06 +02:00
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"$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",
"&emsp;&emsp;Dla każdej medoidy $m$, dla każdego punktu danych $o$, który nie jest medoidą: \n",
"&emsp;&emsp;&emsp;&emsp;$i.$ Zamień punkty $m$ i $o$, przyporządkuj każdy punkt danych do najbliższej medoidy, ponownie oblicz koszt. \n",
"&emsp;&emsp;&emsp;&emsp;$ii.$ Jeśli całkowity koszt jest większy niż w poprzednim kroku, cofnij zamianę."
]
},
{
"cell_type": "markdown",
"id": "d8f6dd1e",
2022-06-15 22:16:06 +02:00
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"&emsp;**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. "
]
},
{
"cell_type": "code",
2022-06-20 18:39:28 +02:00
"execution_count": 102,
"id": "73cffc81",
2022-06-15 22:16:06 +02:00
"metadata": {
"pycharm": {
"name": "#%%\n"
}
2022-06-15 22:16:06 +02:00
},
"outputs": [],
"source": [
"class TrainModel_medoids:\n",
" 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",
" self.medoids, self.res_cluster, self.cluster_labels, self.silhouette = self.kmedoids(self.data)\n",
"\n",
" def get_random_medoids(self, data):\n",
" points = random.sample(range(0, len(data)), self.k_value)\n",
" medoids = []\n",
" for i in points:\n",
" 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",
2022-06-20 11:07:41 +02:00
" \n",
" def plot_results(self, clusters, medoids):\n",
" colors = ['b', 'g', 'r', 'c', 'm', 'k']\n",
" X = []\n",
" Y = []\n",
" plt.figure(figsize=(10,8))\n",
" for i in range(self.k_value):\n",
" X.append(np.squeeze(clusters[i])[:, 0])\n",
" Y.append(np.squeeze(clusters[i])[:, 1])\n",
"\n",
" for i in range(len(X)):\n",
" plt.scatter(X[i], Y[i], c=colors[i])\n",
"\n",
" mx = []\n",
" my = []\n",
"\n",
" for m in medoids:\n",
" mx.append(m[0])\n",
" my.append(m[1])\n",
"\n",
" plt.scatter(mx, my, c='yellow', marker='*')\n",
" plt.xlabel(\"X\")\n",
" plt.ylabel(\"Y\")\n",
" plt.title(f\"K-medoids. Number of clusters: {self.k_value}\")\n",
" plt.show()\n",
" time.sleep(4)\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-20 11:07:41 +02:00
" self.plot_results(final_clusters, medoids)\n",
"\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",
"\n",
" def calculateDistance(self, x, y):\n",
" return np.linalg.norm(x-y)\n",
"\n",
" 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",
2022-06-20 18:39:28 +02:00
"execution_count": 84,
"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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>65</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>66</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>67</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>68</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>69</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>70</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>71</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>72</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>73</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>74</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>75</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>76</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>77</th>\n",
2022-06-20 18:39:28 +02:00
" <td>0.14</td>\n",
" <td>0.42</td>\n",
2022-06-20 18:39:28 +02:00
" <td>0.07</td>\n",
" <td>0.00</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>78</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>79</th>\n",
" <td>0.42</td>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>80</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>81</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>82</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>83</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>84</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>85</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>86</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>87</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>88</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>89</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>90</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>91</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>92</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>93</th>\n",
2022-06-20 18:39:28 +02:00
" <td>0.25</td>\n",
" <td>0.58</td>\n",
2022-06-20 18:39:28 +02:00
" <td>0.07</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>94</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>95</th>\n",
2022-06-20 18:39:28 +02:00
" <td>0.14</td>\n",
" <td>0.46</td>\n",
2022-06-20 18:39:28 +02:00
" <td>0.10</td>\n",
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>96</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>97</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>98</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>99</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>100</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>101</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>102</th>\n",
" <td>0.22</td>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>103</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>104</th>\n",
2022-06-20 18:39:28 +02:00
" <td>0.06</td>\n",
" <td>0.12</td>\n",
" <td>0.05</td>\n",
2022-06-20 18:39:28 +02:00
" <td>0.08</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>105</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>106</th>\n",
" <td>0.19</td>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>107</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>108</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>109</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>110</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>111</th>\n",
2022-06-20 18:39:28 +02:00
" <td>0.28</td>\n",
" <td>0.71</td>\n",
" <td>0.08</td>\n",
2022-06-20 18:39:28 +02:00
" <td>0.04</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>112</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>113</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>114</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>115</th>\n",
2022-06-20 18:39:28 +02:00
" <td>0.78</td>\n",
" <td>0.42</td>\n",
2022-06-20 18:39:28 +02:00
" <td>0.83</td>\n",
" <td>0.83</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>116</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>117</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>118</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>119</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>120</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>121</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>122</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>123</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>124</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>125</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>126</th>\n",
" <td>0.58</td>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>127</th>\n",
2022-06-20 18:39:28 +02:00
" <td>0.61</td>\n",
" <td>0.42</td>\n",
2022-06-20 18:39:28 +02:00
" <td>0.76</td>\n",
" <td>0.71</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>128</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>129</th>\n",
2022-06-20 18:39:28 +02:00
" <td>0.94</td>\n",
" <td>0.25</td>\n",
2022-06-20 18:39:28 +02:00
" <td>1.00</td>\n",
" <td>0.92</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>130</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>131</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>132</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>133</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>134</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>135</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>136</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>137</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>138</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>139</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>140</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>141</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>142</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>143</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>144</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>145</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>146</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>147</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>148</th>\n",
2022-06-20 18:39:28 +02:00
" <td>0.61</td>\n",
" <td>0.42</td>\n",
" <td>0.71</td>\n",
2022-06-20 18:39:28 +02:00
" <td>0.79</td>\n",
" <td>(0.47, 0.38, 0.59, 0.58)</td>\n",
" <td>(0.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>149</th>\n",
2022-06-20 18:39:28 +02:00
" <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.19, 0.58, 0.08, 0.04)</td>\n",
2022-06-20 18:39:28 +02:00
" <td>(0.69, 0.42, 0.76, 0.83)</td>\n",
" <td>2</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",
2022-06-20 18:39:28 +02:00
"65 0.22 \n",
"66 0.17 \n",
"67 0.11 \n",
"68 0.08 \n",
"69 0.19 \n",
"70 0.31 \n",
"71 0.08 \n",
"72 0.19 \n",
"73 0.03 \n",
"74 0.17 \n",
"75 0.31 \n",
"76 0.14 \n",
"77 0.14 \n",
"78 0.00 \n",
"79 0.42 \n",
"80 0.39 \n",
"81 0.31 \n",
"82 0.22 \n",
"83 0.39 \n",
"84 0.22 \n",
"85 0.31 \n",
"86 0.22 \n",
"87 0.08 \n",
"88 0.22 \n",
"89 0.14 \n",
"90 0.19 \n",
"91 0.19 \n",
"92 0.25 \n",
"93 0.25 \n",
"94 0.11 \n",
"95 0.14 \n",
"96 0.31 \n",
"97 0.25 \n",
"98 0.33 \n",
"99 0.19 \n",
"100 0.33 \n",
"101 0.03 \n",
"102 0.22 \n",
2022-06-20 18:39:28 +02:00
"103 0.19 \n",
"104 0.06 \n",
"105 0.03 \n",
"106 0.19 \n",
2022-06-20 18:39:28 +02:00
"107 0.22 \n",
"108 0.14 \n",
"109 0.22 \n",
"110 0.08 \n",
"111 0.28 \n",
"112 0.19 \n",
"113 0.67 \n",
"114 0.56 \n",
"115 0.78 \n",
"116 0.56 \n",
"117 0.61 \n",
"118 0.92 \n",
"119 0.83 \n",
"120 0.67 \n",
"121 0.81 \n",
"122 0.61 \n",
"123 0.58 \n",
"124 0.69 \n",
"125 0.42 \n",
"126 0.58 \n",
"127 0.61 \n",
"128 0.94 \n",
"129 0.94 \n",
"130 0.72 \n",
"131 0.94 \n",
"132 0.67 \n",
"133 0.81 \n",
"134 0.58 \n",
"135 0.81 \n",
"136 0.86 \n",
"137 1.00 \n",
"138 0.58 \n",
"139 0.94 \n",
"140 0.56 \n",
"141 0.58 \n",
"142 0.72 \n",
"143 0.67 \n",
"144 0.72 \n",
"145 0.69 \n",
"146 0.67 \n",
"147 0.67 \n",
"148 0.61 \n",
"149 0.53 \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",
2022-06-20 18:39:28 +02:00
"65 0.62 \n",
"66 0.42 \n",
"67 0.50 \n",
"68 0.46 \n",
"69 0.67 \n",
"70 0.79 \n",
"71 0.58 \n",
"72 0.58 \n",
"73 0.38 \n",
"74 0.46 \n",
"75 0.71 \n",
"76 0.58 \n",
"77 0.42 \n",
"78 0.42 \n",
"79 0.83 \n",
"80 1.00 \n",
"81 0.79 \n",
"82 0.62 \n",
"83 0.75 \n",
"84 0.75 \n",
"85 0.58 \n",
"86 0.71 \n",
"87 0.67 \n",
"88 0.54 \n",
"89 0.58 \n",
"90 0.42 \n",
"91 0.58 \n",
"92 0.62 \n",
"93 0.58 \n",
"94 0.50 \n",
"95 0.46 \n",
2022-06-20 18:39:28 +02:00
"96 0.58 \n",
"97 0.87 \n",
"98 0.92 \n",
"99 0.50 \n",
"100 0.62 \n",
"101 0.42 \n",
"102 0.58 \n",
"103 0.62 \n",
"104 0.12 \n",
"105 0.50 \n",
"106 0.62 \n",
"107 0.75 \n",
"108 0.42 \n",
"109 0.75 \n",
"110 0.50 \n",
"111 0.71 \n",
"112 0.54 \n",
"113 0.42 \n",
"114 0.54 \n",
"115 0.42 \n",
2022-06-20 18:39:28 +02:00
"116 0.38 \n",
"117 0.42 \n",
"118 0.42 \n",
"119 0.38 \n",
"120 0.21 \n",
"121 0.67 \n",
"122 0.50 \n",
"123 0.29 \n",
"124 0.42 \n",
"125 0.33 \n",
"126 0.50 \n",
"127 0.42 \n",
2022-06-20 18:39:28 +02:00
"128 0.75 \n",
"129 0.25 \n",
"130 0.50 \n",
"131 0.33 \n",
"132 0.54 \n",
"133 0.50 \n",
"134 0.33 \n",
"135 0.42 \n",
"136 0.33 \n",
"137 0.75 \n",
"138 0.33 \n",
"139 0.42 \n",
"140 0.58 \n",
"141 0.46 \n",
"142 0.46 \n",
"143 0.46 \n",
"144 0.46 \n",
"145 0.50 \n",
"146 0.54 \n",
"147 0.42 \n",
"148 0.42 \n",
"149 0.58 \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",
2022-06-20 18:39:28 +02:00
"65 0.07 \n",
"66 0.07 \n",
"67 0.05 \n",
"68 0.08 \n",
"69 0.07 \n",
"70 0.12 \n",
"71 0.07 \n",
"72 0.08 \n",
"73 0.07 \n",
"74 0.08 \n",
"75 0.08 \n",
"76 0.10 \n",
"77 0.07 \n",
"78 0.02 \n",
"79 0.03 \n",
"80 0.08 \n",
"81 0.05 \n",
"82 0.07 \n",
"83 0.12 \n",
"84 0.08 \n",
"85 0.12 \n",
"86 0.08 \n",
"87 0.00 \n",
"88 0.12 \n",
"89 0.15 \n",
"90 0.10 \n",
"91 0.10 \n",
"92 0.08 \n",
"93 0.07 \n",
"94 0.10 \n",
"95 0.10 \n",
"96 0.08 \n",
"97 0.08 \n",
"98 0.07 \n",
"99 0.03 \n",
"100 0.05 \n",
"101 0.05 \n",
"102 0.08 \n",
"103 0.05 \n",
"104 0.05 \n",
2022-06-20 18:39:28 +02:00
"105 0.05 \n",
"106 0.10 \n",
"107 0.15 \n",
"108 0.07 \n",
2022-06-20 18:39:28 +02:00
"109 0.10 \n",
"110 0.07 \n",
"111 0.08 \n",
2022-06-20 18:39:28 +02:00
"112 0.07 \n",
"113 0.68 \n",
"114 0.85 \n",
"115 0.83 \n",
"116 0.78 \n",
"117 0.81 \n",
"118 0.95 \n",
"119 0.90 \n",
"120 0.81 \n",
"121 0.86 \n",
"122 0.69 \n",
"123 0.73 \n",
"124 0.76 \n",
"125 0.69 \n",
"126 0.73 \n",
"127 0.76 \n",
"128 0.97 \n",
"129 1.00 \n",
"130 0.80 \n",
"131 0.97 \n",
"132 0.80 \n",
"133 0.85 \n",
"134 0.78 \n",
"135 0.81 \n",
"136 0.86 \n",
"137 0.92 \n",
"138 0.78 \n",
"139 0.86 \n",
"140 0.78 \n",
"141 0.76 \n",
"142 0.75 \n",
"143 0.78 \n",
"144 0.69 \n",
"145 0.83 \n",
"146 0.80 \n",
"147 0.71 \n",
"148 0.71 \n",
"149 0.75 \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",
2022-06-20 18:39:28 +02:00
"65 0.04 \n",
"66 0.04 \n",
"67 0.04 \n",
"68 0.04 \n",
"69 0.04 \n",
"70 0.12 \n",
"71 0.08 \n",
"72 0.04 \n",
"73 0.04 \n",
"74 0.00 \n",
"75 0.04 \n",
"76 0.04 \n",
"77 0.00 \n",
"78 0.00 \n",
"79 0.04 \n",
"80 0.12 \n",
"81 0.12 \n",
"82 0.08 \n",
"83 0.08 \n",
"84 0.08 \n",
"85 0.04 \n",
"86 0.12 \n",
"87 0.04 \n",
"88 0.17 \n",
"89 0.04 \n",
"90 0.04 \n",
"91 0.12 \n",
"92 0.04 \n",
"93 0.04 \n",
"94 0.04 \n",
"95 0.04 \n",
"96 0.12 \n",
"97 0.00 \n",
"98 0.04 \n",
"99 0.04 \n",
"100 0.04 \n",
"101 0.04 \n",
"102 0.04 \n",
2022-06-20 18:39:28 +02:00
"103 0.08 \n",
"104 0.08 \n",
"105 0.04 \n",
2022-06-20 18:39:28 +02:00
"106 0.21 \n",
"107 0.12 \n",
"108 0.08 \n",
"109 0.04 \n",
"110 0.04 \n",
2022-06-20 18:39:28 +02:00
"111 0.04 \n",
"112 0.04 \n",
2022-06-20 18:39:28 +02:00
"113 0.67 \n",
"114 1.00 \n",
"115 0.83 \n",
"116 0.71 \n",
"117 0.88 \n",
"118 0.83 \n",
"119 0.71 \n",
"120 0.71 \n",
"121 1.00 \n",
"122 0.79 \n",
"123 0.75 \n",
"124 0.83 \n",
"125 0.96 \n",
"126 0.92 \n",
"127 0.71 \n",
"128 0.88 \n",
"129 0.92 \n",
"130 0.92 \n",
"131 0.79 \n",
"132 0.83 \n",
"133 0.71 \n",
"134 0.83 \n",
"135 0.63 \n",
"136 0.75 \n",
"137 0.79 \n",
"138 0.88 \n",
"139 0.92 \n",
"140 0.96 \n",
"141 0.71 \n",
"142 0.83 \n",
"143 0.96 \n",
"144 0.92 \n",
"145 0.92 \n",
"146 1.00 \n",
"147 0.92 \n",
"148 0.79 \n",
"149 0.92 \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",
2022-06-20 18:39:28 +02:00
"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",
2022-06-20 18:39:28 +02:00
" Wartość medoidu 1 \\\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",
2022-06-20 18:39:28 +02:00
" Wartość medoidu 2 \\\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",
" Medoid \n",
2022-06-20 18:39:28 +02:00
"0 0 \n",
"1 0 \n",
"2 0 \n",
"3 0 \n",
"4 0 \n",
"5 0 \n",
"6 0 \n",
"7 0 \n",
"8 0 \n",
"9 0 \n",
"10 0 \n",
"11 0 \n",
"12 0 \n",
"13 0 \n",
"14 0 \n",
"15 0 \n",
"16 0 \n",
"17 0 \n",
"18 0 \n",
"19 0 \n",
"20 0 \n",
"21 0 \n",
"22 0 \n",
"23 0 \n",
"24 0 \n",
"25 0 \n",
"26 0 \n",
"27 0 \n",
"28 0 \n",
"29 0 \n",
"30 0 \n",
"31 0 \n",
"32 0 \n",
"33 0 \n",
"34 0 \n",
2022-06-20 18:39:28 +02:00
"35 0 \n",
"36 0 \n",
"37 0 \n",
2022-06-20 18:39:28 +02:00
"38 0 \n",
"39 0 \n",
"40 0 \n",
"41 0 \n",
"42 0 \n",
"43 0 \n",
"44 0 \n",
"45 0 \n",
"46 0 \n",
"47 0 \n",
"48 0 \n",
"49 0 \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",
2022-06-20 18:39:28 +02:00
"65 1 \n",
"66 1 \n",
"67 1 \n",
"68 1 \n",
"69 1 \n",
"70 1 \n",
"71 1 \n",
"72 1 \n",
"73 1 \n",
"74 1 \n",
"75 1 \n",
"76 1 \n",
"77 1 \n",
2022-06-20 18:39:28 +02:00
"78 1 \n",
"79 1 \n",
"80 1 \n",
"81 1 \n",
"82 1 \n",
"83 1 \n",
"84 1 \n",
"85 1 \n",
"86 1 \n",
"87 1 \n",
"88 1 \n",
"89 1 \n",
"90 1 \n",
"91 1 \n",
"92 1 \n",
"93 1 \n",
"94 1 \n",
"95 1 \n",
"96 1 \n",
"97 1 \n",
"98 1 \n",
"99 1 \n",
"100 1 \n",
2022-06-20 18:39:28 +02:00
"101 1 \n",
"102 1 \n",
"103 1 \n",
"104 1 \n",
"105 1 \n",
2022-06-20 18:39:28 +02:00
"106 1 \n",
"107 1 \n",
"108 1 \n",
"109 1 \n",
"110 1 \n",
"111 1 \n",
"112 1 \n",
2022-06-20 18:39:28 +02:00
"113 2 \n",
"114 2 \n",
"115 2 \n",
"116 2 \n",
"117 2 \n",
"118 2 \n",
"119 2 \n",
"120 2 \n",
"121 2 \n",
"122 2 \n",
"123 2 \n",
"124 2 \n",
"125 2 \n",
"126 2 \n",
"127 2 \n",
"128 2 \n",
"129 2 \n",
"130 2 \n",
"131 2 \n",
"132 2 \n",
"133 2 \n",
"134 2 \n",
"135 2 \n",
"136 2 \n",
"137 2 \n",
"138 2 \n",
"139 2 \n",
"140 2 \n",
"141 2 \n",
"142 2 \n",
"143 2 \n",
"144 2 \n",
"145 2 \n",
"146 2 \n",
"147 2 \n",
"148 2 \n",
"149 2 "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# iris\n",
"model4 = TrainModel_medoids(dataset, 3)\n",
"medoids4, res_cluster4, cluster_labels4, silhouette4 = model4.return_values()\n",
"\n",
"res = res_cluster4[0] + res_cluster4[1] + res_cluster4[2]\n",
"\n",
2022-06-20 18:39:28 +02:00
"medoids_values = []\n",
"for i in range(0, len(res_cluster4[0])):\n",
" medoids_values.append(0)\n",
" \n",
"for i in range(0, len(res_cluster4[1])):\n",
" medoids_values.append(1)\n",
" \n",
"for i in range(0, len(res_cluster4[2])):\n",
" medoids_values.append(2)\n",
"\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",
2022-06-20 18:39:28 +02:00
" 'Medoid': medoids_values}\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"
]
},
{
"cell_type": "code",
2022-06-20 18:39:28 +02:00
"execution_count": 85,
"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
}
],
"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",
2022-06-20 18:39:28 +02:00
"execution_count": 86,
"id": "6ffe3810",
"metadata": {},
2022-06-15 22:16:06 +02:00
"outputs": [
{
"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": [
"# 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",
2022-06-20 18:39:28 +02:00
"execution_count": 87,
"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",
2022-06-20 18:39:28 +02:00
"execution_count": 88,
"id": "21f2332b",
"metadata": {},
"outputs": [],
"source": [
"pca.fit(dataset)\n",
"dataset_pca = pca.transform(dataset)"
]
},
{
"cell_type": "code",
2022-06-20 18:39:28 +02:00
"execution_count": 94,
"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",
2022-06-20 18:39:28 +02:00
"execution_count": 95,
"id": "5c305f99",
"metadata": {},
"outputs": [],
"source": [
"pca.fit(dataset2)\n",
"dataset2_pca = pca.transform(dataset2)"
]
},
{
"cell_type": "code",
2022-06-20 18:39:28 +02:00
"execution_count": 96,
"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",
2022-06-20 18:39:28 +02:00
"execution_count": 98,
"id": "b63e355c",
"metadata": {},
"outputs": [],
"source": [
"pca.fit(dataset3)\n",
"dataset3_pca = pca.transform(dataset3)"
]
},
{
"cell_type": "code",
2022-06-20 18:39:28 +02:00
"execution_count": 101,
"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": [
"&emsp;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",
2022-06-21 15:37:48 +02:00
"execution_count": 133,
"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",
2022-06-21 15:37:48 +02:00
"execution_count": 134,
"id": "a8983527",
"metadata": {},
"outputs": [
{
"data": {
2022-06-21 15:37:48 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtYAAAHmCAYAAABXgsn2AAAA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zs2ap6+/TrYf8/f316pV76h9+w6aMWOKxo+fqqVLV6lfvwcVGztVkjRlyng9/vi/tHTpKtWseUOhPtPSUrVw4auaMWOO/t//m1foWHp6ml5+eY7mzFmgN95YK6u1QDt2JEm6FO7nz39Fr732htasWans7CxnvS1Ox4w1AABAGXLs2BHFxk7RxInT5O3tXehYvXr19cMP32vkyCcUEhKmESOesh+7+eZmkqQff/xeJ078pDFjRtqPZWVl6cyZM/r111/Vtm2IJKlbt57673/j7W3atWsvi8WievXq69y5s4X63bcvRc2bt1RQUDVJ0vPPX5r1PnToO4WEhMrT01Oenp7y96+kc+fOydvbx+A74joEawAAgDLE29tHzz03XvPmvaimTZtr1KinJUlVq1bV7NnztXLlWu3evUs7d27X4MEPauXKtZIkLy8vSVJBgVU1a96g5ctX/992gU6fzpDFcunBKb/53ycSenpeev2VblPn4eGhP+4+ffr0H87jbv/aYrEU6qO0YSkIAABAGVKtWnWFh0coOLi13nxzlZYvX63ly1dr9uz5SkrapsmTX1BoaLiefvoZVahQQWlpqYVeX7t2HZ07d86+TOT999drwoRx8vevpOrVq9uXcHz4YaLDNTVp0lTffLNPp079Kkl6+eU5SkraZuiKSw6XzlgnJCRo0aJFys/P10MPPaQHHnig0PEFCxbo3XfflZ+fnyTp3nvvvawNAABASeXr4238Dh6/nfdqjRjxlAYMuE9du3ZTo0aNJUkhIWH6+OOtGjDgXnl6eioysrvq129Q6HWenp6aPHmG5s2brby8PHl7+ygmZqKkS0s4pk+fqLi4hWratIXDtVStGqinnvq3Ro78l6zWAjVr1kLdu0dp+fJXr/q6SjKLzUXz7ampqbr//vu1bt06eXp6ql+/fpozZ44aNPj9mzls2DA99thjCg4OvqY+Tp3KlNVaev98ACkwsKLS088XdxnA3wZjDrg+J09+r+rVazvc3sPDTfn5VidWBJOu9P11c7OoSpUr36bQZUtBduzYoZCQEFWqVEne3t6KjIxUYmLhPyHs27dPixcvVlRUlCZNmqQLFy64qjwAAADgurhsKUhaWpoCAwPt20FBQUpJSbF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Ll0u3Q+7atZv9mSN79nyhHj3ukiRVqlRJHTtGKDn593XhR48eVpUqgapTp64kqVu3ns65+GLGUhAAAIAyxNvbR889N17z5r2opk2ba9SopyVJVatW1ezZ8yVJ5cqVs7d3d3cv9Hqr1SpPTy8tX77avi8tLVV+fv6SLPanXFssFrm5XXqtzVb4aZI2m1RQkP+HPRZJvz8d+3/7LCuYsQYAAChDqlWrrvDwCAUHt9abb67S8uWrtXz5anuo/iu+vr6qVetGbdy4QZK0e/dnGjHi0q3+2rRpZ9+/bdtW5eVdkCS1bt1W778fL0k6c+aMPv30YwUHt7Gfs0GDm5SRkaFDhw5KkjZv3mjiUkscZqwBAAAMqVDB1+Fb413tea/WiBFPacCA+9S1azc1atT4ql47fvwUzZo1TatXvy4Pj3KaNGmaLBaLRo4crcmTX9D69f9R48ZN5O3tI0kaNGiIXnwxVgMH3ier1aqBAwerUaPGOnLk0jprDw8PTZgwVVOmvCB3d3c1bHh19ZQWFpvNZvvrZqXDqVOZ9j9PoHQKDKyo9PTzLulr4cI5+qlt1F83LKVq7U7Q8OEji7sMlHCuHHNS2R53jLm/p5Mnv1f16rUdbu/h4ab8fOtfN0SJcKXvr5ubRVWqXPkXHZaCAAAAAAYQrAEAAAADWGONP7Vs2RLl5GQWdxkAAAAlHsEafyonJ1OWc7cUdxl
"text/plain": [
"<Figure size 864x576 with 1 Axes>"
]
},
2022-06-20 18:39:28 +02:00
"metadata": {},
"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",
"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",
2022-06-21 15:37:48 +02:00
"execution_count": 135,
"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",
2022-06-21 15:37:48 +02:00
" <td>0.33</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",
2022-06-21 15:37:48 +02:00
"k-średnich 0.33 \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 "
]
},
2022-06-21 15:37:48 +02:00
"execution_count": 135,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_shoulette"
]
},
{
"cell_type": "markdown",
"id": "cf18c7b0",
"metadata": {},
"source": [
"&emsp;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-20 11:07:41 +02:00
},
{
"cell_type": "markdown",
2022-06-21 15:37:48 +02:00
"id": "f5a71343",
2022-06-20 11:07:41 +02:00
"metadata": {},
"source": [
"### K-medoids na innych zbiorach danych"
]
},
{
"cell_type": "code",
2022-06-20 18:39:28 +02:00
"execution_count": 106,
2022-06-21 15:37:48 +02:00
"id": "963d94ab",
2022-06-20 11:07:41 +02:00
"metadata": {},
"outputs": [],
"source": [
"# Load datasets\n",
"\n",
"dataset = np.array([[5, 6], [4, 7], [4, 8], [4, 6], [5, 7], [5, 8], [7, 6], [8, 8], [7, 7], [7, 8]])\n",
"dataset3 = np.array(\n",
" [[4.5, 6], [4, 7], [4, 8], [4, 6], [4.5, 7], [4.5, 8], [7, 6], [5.5, 7], [5.5, 8], [5.5, 6], [8, 8], [7, 7],\n",
" [7, 8]])\n",
"\n",
"X1, Y1 = make_blobs(n_features=2, centers=4)\n",
"X, y = make_classification(n_samples=100, n_features=2, n_informative=2, n_redundant=0, n_repeated=0, n_classes=2,\n",
" n_clusters_per_class=2, class_sep=2, flip_y=0, weights=[0.5, 0.5], random_state=17)"
]
},
{
"cell_type": "code",
2022-06-20 18:39:28 +02:00
"execution_count": 107,
2022-06-21 15:37:48 +02:00
"id": "03fdd9f0",
2022-06-20 11:07:41 +02:00
"metadata": {},
"outputs": [],
"source": [
"def print_sns_plot(data):\n",
" column_values = ['x', 'y']\n",
" df = pd.DataFrame(data=data, columns=column_values, index=None)\n",
" sns.set_theme(style='darkgrid')\n",
" plt.figure(figsize=(10,8))\n",
" plt.title(\"Dataset for clustering\")\n",
" sns.scatterplot(data=df, x='x', y='y')\n",
" plt.show()\n",
" time.sleep(4)"
]
},
{
"cell_type": "code",
2022-06-20 18:39:28 +02:00
"execution_count": 108,
2022-06-21 15:37:48 +02:00
"id": "c5740cd9",
2022-06-20 11:07:41 +02:00
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmkAAAHwCAYAAAD98PjEAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAwlklEQVR4nO3de3hV1YH+8feQHBIOCdSEQCy2xUdbYAAJiDNNccKlREgCpAZDNYiXlCg0TiQdMkZAEqiIRW5yyQwVZ3weUCkXQxyHweKgPARsBVslUaRqvQSCJAQkgRBycrJ+f/DzSERu1k1Ws7+ff3Tvtc/Z62WxfV733gGPMcYIAAAAVmnX2hMAAADAuShpAAAAFqKkAQAAWIiSBgAAYCFKGgAAgIUoaQAAABaipAH4mx04cEC9e/dWamqqUlNTNWbMGN1+++3avHnzJX1++fLleuWVVxyZW2Zmpo4ePXrO/hMnTuj2229XSkqKfv/733+r5zxw4IAGDBjwjT//2muv6cknn7zszz355JPatGnTNz4vALuEtvYEALQN4eHhKikpCW4fPHhQ99xzj0JCQjRy5MgLfvaPf/yjrr/+ekfmtXPnzq/dv2/fPtXU1Gjr1q2OnPdvUVZWpuPHj1/25x588EEHZgOgtVDSADiie/fuysnJ0dNPP62RI0fqo48+0pw5c3Ty5ElVV1erV69eWrJkiTZs2KDy8nLNnz9fISEhuv7667/2uLCwMC1dulRbt26V1+vVVVddpXnz5qlr16768MMPNXfuXH3++ecKBAKaOHGibrvtNj388MOSpLvvvlu//e1vdfXVV0uS/vrXv2r69Ok6fPiwUlNT9bvf/U6lpaVavny5mpub1bFjRz388MO64YYbtGzZMr311luqqqpSz549tWDBghY5X331VS1ZskTNzc3y+XyaPXu2IiIiguPLli3TsWPHNGvWrHO2f//73+vf//3f5fF4FBISon/7t39T+/bttXbtWgUCAUVGRio3N1fr16/X888/r+bmZn3nO9/RI488ouuuu075+fn6/PPPVVFRoaFDh6qmpkY//OEP9Ytf/EL9+vXTfffdp507d6qqqkqTJk1SRkaGAoGA5s+fr23btikyMlI33HCDPvzwQ61evfoK/c4AcMkMAPyNKioqTFxc3Dn7//KXv5j+/fsbY4x5/PHHzaZNm4wxxjQ2NprRo0ebLVu2GGOMufPOO83//u//XvC4yspKM3DgQHP69GljjDFPP/202bp1q/H7/SY5OdmUl5cbY4ypra01SUlJ5s9//rMxxpgf/ehHpqam5py5/eEPfzApKSnGGGM++OAD85Of/MR8+umnxhhjdu3aZQYPHmzq6urM0qVLzciRI43f7z/nO6qrq82NN95o3nnnHWOMMS+//LL5xS9+0eLXY+nSpWb27NnBz5y9/dOf/jQ4zx07dphly5adc8wf//hHk5GRYerr64PHjRo1yhhjzEMPPWTuvvvu4Hc/9NBDZtWqVcHcq1evNsYYU1ZWZvr27WsaGhrM888/byZMmGAaGhrM6dOnTWZmprnzzjvPyQag9XEnDYBjPB6PwsPDJUl5eXnauXOnnnrqKX388ceqqqpSfX39OZ8533HdunVTr169dOuttyohIUEJCQmKj4/XBx98oE8//VTTp08PfkdDQ4PeffddxcXFXdI8//CHP+jHP/6xvve970mS4uPjFRUVpfLycklSXFycQkPP/c/ln/70J/3whz/UP/zDP0iSbrnlFt1yyy06cODAJZ03JSVFDzzwgIYMGaLBgwcrKyvrnGNee+01ffLJJ7r99tuD+2pra/X5559Lkm688cbzfv9Pf/pTSVKfPn3U2Nio+vp6bd++XampqQoLC5Mk/fznP+cuGmApShoAx5SVlelHP/qRJOlXv/qVAoGAkpKSNHToUB06dEjma/7q4PMd165dO61Zs0ZlZWV6/fXX9dhjj+mf//mflZqaqsjIyBbvwx05ckSRkZGXPM/m5mZ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gAAYCFKGgAAgIUoaQAAABaipAEAAFiIkgYAAGAhShoAAICFKGkAAAAWoqQBAABYiJIGAABgIUdLWklJiVJSUpSSkqLf/OY354zv27dPaWlpGjlypGbMmKGmpiZJUmVlpSZMmKBRo0ZpypQpOnnypJPTvDweqfaUX2UfVKu2oUnytPaEcEWw7oD7cN27lyVrH+rUF586dUpz587Vli1b1KlTJ91xxx3atWuXfvKTnwSPycvL06OPPqq4uDhNnz5d69atU0ZGhmbPnq2MjAylpKRoxYoVKioqUl5enlNTvXQead+nx7V03Vs67Q8ozBuinPFx6v39zpJp7cnBMaw74D5c9+5l0do7dictEAioublZp06dUlNTk5qamhQWFhYcP3jwoBoaGhQXFydJSktL05YtW+T3+7V7926NHDmyxX4b1Nb7g4smSaf9AS1d95Zq6/2tPDM4iXUH3Ifr3r1sWnvH7qRFRETowQcfVFJSkjp06KCbbrpJAwcODI5XVVUpJiYmuB0TE6PDhw/r2LFjioiIUGhoaIv9lyM6OuLbCfEVn31QHVy0L5z2B1TvD+i670c5ck5bxcREtvYUrhjWvSU3rf1XuTm75K78XPdfctO6S3atvWMl7b333tPGjRv16quvKjIyUtOmTdPTTz+tSZMmSZKam5vl8Xz5kNcYI4/HE/zn2b66fTE1NSfU3Pzt35P0hYUqzBvSYvHCvCHyeUNUXV33rZ/PVjExka7Ky7p/yW1rfzY3Z5fcl5/r/gy3rbt0Zde+XTvPBW8sOfa4s7S0VPHx8YqOjlb79u2VlpamN954IzgeGxur6urq4PaRI0fUtWtXRUVFqa6uToHAmV+c6upqde3a1alpXpZOHUKVMz5OYd4QSQo+p+7k87byzOAk1h1wH65797Jp7R27k9arVy898cQTqq+vV4cOHbRt2zb169cvON69e3eFhYXpzTff1I0
"text/plain": [
"<Figure size 720x576 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2022-06-20 18:39:28 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmMAAAHwCAYAAADq0mgNAAAAOXRFWHRTb2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BoNq2bKlpk6dqssvv1zTpk1TcXGx7r33Xi1dulQtWrQIfU0gEFBOTo52796tqKgoDRs2rM5VrQMHDuiee+7Rp59+etpxIBDQ5MmTdfjwYUnSHXfcoccee0xTp05VZWWl7r33Xq1YsUJ79+7VzJkzdeTIEdXW1mrkyJEaOnSoNm7cqJkzZyomJkYnTpxQbm6usrKy9D//8z+KiopSUlKSZsyYoaioKGVmZmrYsGH6yU9+Uud77tixo5544onQjm688Ubl5uaec79ARHIAvjf279/vunbt6ubOneuuv/5698Ybb5zz/hs2bHA//OEPXWFhoXPOuYceesjdd999rqqqypWWlrqkpCRXVFTk9uzZ4/r37+/Kysqcc87t2LHD3Xbbbe7EiRNu5syZ7oknnnDBYNCVlpa6tLQ09+yzz7rq6mr3k5/8xK1du9Y551xRUZHr2bOn27x5s9uwYYPr16+fc865cePGuYULFzrnnNu7d6/r2rWrW758ufvb3/7mbr75ZldVVeWcc+7ll1927777boO+/9raWjdixAg3Z84c55xzL730kps8ebJzzrnJkye7l156KfQ1px7feeedbtasWc45595++23XuXNnt23bttCcL7zwQuh+OTk5oe8rJSXF7dix45yv07PPPusyMjJcdXX1aXPv3LnTpaamun379jnnnMvPz3e33XabO378eJ3X6tseeeQRN3fuXOecc8eOHXP9+vVze/fudT/96U/dO++8E3o9vv36OOfcH/7wB/fkk08655w7ceKEe+yxx9yxY8fq3Ke6utr17dvXff7556Hn6NOnj/v000/dhg0bXOfOnd2BAwecc86tXLnSjR492jnnXE1NjcvKynJ79+49575OdeTIEdevXz/3+uuvN/hrgEjBlTHge+brr7/Wjh07tHjxYk2cOFHdunXTDTfccNb7t23bNnS+Xbt2io2NVbNmzdS6dWu1bNlSR48e1X/913+ppKREP/vZz0Jf5/P5tG/fPhUUFGjatGny+Xxq3bq17r77bknS3r17VVVVFXprLSEhQenp6frP//xP3XrrraHHyc/P1+TJkyVJ7du3D51LSEhQ586dNWjQIKWlpSktLa3Bb7VGRUXpd7/7nQYOHKjbb7+94S+eFJr3mmuu0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p0iTdfvvt+uKLL845f2FhocaPH6+5c+cSYsA5cGUM+B7z+XyaO3euBg0apKefflqPP/74BT1Ox44dNWPGDD3++ONyzoU+zN6yZUv927/9m3JyctSnTx+1bt1a119/vaS/X1V6/vnn9dRTT2nRokWqra3VI488oh49eoSCS5JycnI0depU9enTR4mJiaG3BTt37qw+ffpoyJAhiomJUYsWLZSdnS1JeuaZZySpQUGZnZ2tTz75JHQ8cuRI/epXv1JGRobatm2rHj16XNBrUlVVpUGDBqm6ulrZ2dm69tprJemsr9O5dOzYUTk5ORo/frxqa2vVokULvfjii4qNjT3n102fPl2//vWvdc8998g5p7Fjx+rGG28MnY+NjdWkSZOUmZmp1q1bq3fv3qFzDzzwgKZMmaL+/furWbNm6tSpk/r166cmTZooOTlZ/fr105IlS/T8889r5syZeumll1RTU6NHH31U3bt3r7NDSRo4cKA2bdqkvn376rLLLtNVV12lkSNHStJZP8C/YMECOef0+9//Xr///e8l/f1t8+eee66eVx+ILD536jVuAAAANCrepgQAADBEjAEAABgixgAAAAwRYwAAAIaIMQAAAEPf63/a4vDhEwoGvftj0DZ
2022-06-20 11:07:41 +02:00
"text/plain": [
"<Figure size 720x576 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
2022-06-20 18:39:28 +02:00
"Sylwetka (ang.silhouette) dla metody k-medoid i dla k = 2 0.3\n"
2022-06-20 11:07:41 +02:00
]
}
],
"source": [
"# 2 clusters\n",
"print_sns_plot(dataset)\n",
"model9 = TrainModel_medoids(dataset, 2)"
]
},
{
"cell_type": "code",
2022-06-20 18:39:28 +02:00
"execution_count": 109,
2022-06-21 15:37:48 +02:00
"id": "7e39c874",
2022-06-20 11:07:41 +02:00
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmkAAAHwCAYAAAD98PjEAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAw4klEQVR4nO3de3hV1YH+8feQHBIPCdSEQCy2xUdbYAAJiDNNccKlREi4pAZDNUjVFAo0TDQdMkZAEqiIRW5yyQyKMz4PqJSLIY7DYHFQHgK2gq2SKFK1XgJBEgKShBBycrJ+f/DjSEBu6iar2d/PP3bvtc/Z63Xt9Hndewc8xhgjAAAAWKVNS08AAAAA56OkAQAAWIiSBgAAYCFKGgAAgIUoaQAAABaipAEAAFiIkgbgGztw4IB69OihlJQUpaSkaNSoUbrrrru0efPmy/r88uXL9eqrrzoyt4yMDB09evS8/bW1tbrrrrs0YsQI/eEPf/hWz3ngwAH17dv3a3/+9ddf15NPPnnFn3vyySe1adOmr31eAHYJbekJAGgdwsPDVVRUFNw+ePCg7rvvPoWEhGjYsGEX/eyf/vQn3XTTTY7Ma+fOnV+5f9++faqqqtLWrVsdOe83UVJSouPHj1/x5x544AEHZgOgpVDSADiiS5cuysrK0jPPPKNhw4bp448/1pw5c3TixAlVVlaqe/fuWrJkiTZs2KDS0lLNnz9fISEhuummm77yuLCwMC1dulRbt26V1+vVtddeq3nz5qlTp0766KOPNHfuXH3xxRcKBAIaP3687rzzTj388MOSpHvvvVdPPfWUrrvuOknS3/72N02fPl2HDx9WSkqKfv/736u4uFjLly9XU1OT2rVrp4cfflg333yzli1bprffflsVFRXq1q2bFixY0Czna6+9piVLlqipqUk+n0+zZ89WREREcHzZsmU6duyYZs2add72H/7wB/37v/+7PB6PQkJC9G//9m9q27at1q5dq0AgoMjISGVnZ2v9+vV64YUX1NTUpO985zt65JFHdOONNyo3N1dffPGFysrKNGjQIFVVVemHP/yhfvnLX6p379761a9+pZ07d6qiokITJkxQenq6AoGA5s+fr23btikyMlI333yzPvroI61evfoqXRkALpsBgG+orKzMxMXFnbf/r3/9q+nTp48xxpjHH3/cbNq0yRhjTENDgxk5cqTZsmWLMcaYe+65x/zv//7vRY8rLy83/fr1M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xbtIibs58lJiZSlZU1LT2Nq4u1l+TStT+L6/Jz3Uty4bpLV3Xt27TxKDo64sLj3+7pvhQIBNTU1KSTJ0+qsbFRjY2NCgsLC44fPHhQ9fX1iouLkySlpqZqy5Yt8vv92r17t4YNG9Zsvw2q6/zBRZOkU/6Alq57W9V1/haemfPcnN3tWHu4Ede9e9m09qFOfXFERIQeeOABJSUl6ZprrtGtt96qfv36BccrKioUExMT3I6JidHhw4d17NgxRUREKDQ0tNn+K3GxVvpNfP5hZXDRzjjlD6jOH9CN349y5Jy2cHP2c8XERLb0FK4q1v5Lblv7c7kpP9f9l9y07pJda+9YSXv//fe1ceNGvfbaa4qMjNS0adP0zDPPaMKECZKkpqYmeTxfPuQ1xsjj8QT/ebZzty/FqcedvrBQhXlDmi1emDdEPm9Iq78d7ObsZ3PjrX/W/jQ3rv3Z3Jaf6/40t627dHXXvsUedxYXFys+Pl7R0dFq27atUlNT9eabbwbHY2NjVVlZGdw+cuSIOnXqpKioKNXU1CgQOP0vp7KyUp06dXJqmlek/TWhyhobpzBviCQFn1O393lbeGbOc3N2t2Pt4UZc9+5l09o7diete/f
"text/plain": [
"<Figure size 720x576 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2022-06-20 18:39:28 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmMAAAHwCAYAAADq0mgNAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAArhElEQVR4nO3de3RU9b338c+EcDEYGwiTxCPKUaigSETxOYQo8Ug13CJy6xJRsOIJeDsoKuWSaCyVm/KIl1Zdqa6iNTlCCwjYY0Bx6To2iZx6KYjwICoFlSRDgkAwCUnm9/zRwxwjQgK6890w79da/WPPnsz+7fnm8u6eGQw455wAAABgIsZ6AQAAANGMGAMAADBEjAEAABgixgAAAAwRYwAAAIaIMQAAAEPEGHAS+eKLL3TJJZc0ue0///M/1b9/f5WUlLTKGubMmaOnnnrqmPfZtGmTpk6d+r37pkyZohUrVpzQsb/44gv17NlTf/zjH5vc/vzzz2vmzJkn9JjfZ9CgQdq0adOP9njHUl1drXHjxmn48OFat25di75mwoQJKioqOqHjHThwQBMnTjyhrz1ehw4d0oMPPqhhw4Zp2LBhWrBggRobG1vl2MDJJNZ6AQBO3Msvv6ynn35aS5Ys0QUXXGC9nIg+ffroySef9OSxY2JitHDhQvXr10/nnXeeJ8doTVu2bFFlZaVef/31Vjnevn37Wi00CwoKVFVVpVdffVXhcFg33nijXnvtNWVlZbXK8YGTBTEGnKTy8/O1YsUKFRYWqmvXrt97n3fffVePPfaYzjzzTH3++ec67bTTNHnyZP3hD3/Q559/rszMTM2ePVuS9Oabb+qZZ55RfX29OnTooBkzZuiSSy5RdXW1cnJytHXrViUlJalNmzbq16+fJOmTTz7RnDlz9PXXXysQCGjSpEkaOXKk3n33Xf3617/Wq6++qvLycs2cOVMVFRX6p3/6J1VWVkbW9+STT+r1119X27Zt1alTJ82fP19JSUnHPO8OHTrolltu0f3336+XX35Z7dq1a7J/5syZ+ulPf6pbb731iO1BgwYpKytLpaWl2rdvn/7t3/5N77//vjZv3qzY2Fg988wzSk5OliQVFhZq69atOnTokG655RaNHTv2mM/TU089pQ8//FAVFRXq2bOnFi1a1GRdb7zxhn7zm98oHA6rY8eOmjVrlk4//XTNnj1b5eXluu6667R06VJ16NAh8jWhUEh5eXn67LPPFBMTo3HjxjW5qvXFF1/o2muv1QcffHDEdigU0owZM7R3715J0pVXXql77rlHs2bNUm1tra677jqtWLFCO3bs0Ny5c/X111+rsbFREyZM0NixY/Xuu+9q7ty5iouL08GDB1VYWKicnBz9/e9/V0xMjHr37q05c+YoJiZG2dnZGjdunH72s581OedbbrlFN910k2JiYlRVVaX9+/frJz/5yTHnC0QlB+CksWvXLte3b1+3cOFCd/7557uXXnrpmPcvLS11F1xwgdu8ebNzzrlbb73VXX/99a6urs5VVla63r17u7KyMvf555+7rKwsV1VV5Zxzbtu2be7yyy93Bw8edHPnznW//OUvXTgcdpWVlS4jI8M9+eSTrr6+3v3sZz9za9eudc45V1ZW5gYOHOjef/99V1pa6oYPH+6cc+6OO+5wixcvds45t2PHDte3b1+3fPly99VXX7lLL73U1dXVOeece/75593rr7/eovNvbGx0N954o1uwYIFzzrnnnnvOzZgxwznn3IwZM9xzzz0X+Zpvb1911VVu3rx5zjnn/vznP7tevXq5LVu2RNb5zDPPRO6Xl5cXOa8BAwa4bdu2HfN5evLJJ93gwYNdfX39Eevevn27S09Pdzt37nTOOVdcXOwuv/xyd+DAgSbP1XfdeeedbuHChc455/bv3++GDx/uduzY4W666Sb32muvRZ6P7z4/zjn3m9/8xj3wwAPOOecOHjzo7rnnHrd///4m96mvr3fDhg1zH330UeQYQ4cOdR988IErLS11vXr1cl988YVzzrmVK1e6SZMmOeeca2hocDk5OW7Hjh3HnNdhjz76qOvbt6+76aab3DfffNOirwGiCVfGgJPMN998o23btik/P1/Tpk3TJZdcogsvvPCo9+/atWtk/znnnKP4+Hi1a9dOnTt3VseOHbVv3z7993//tyoqKvSLX/wi8nWBQEA7d+5USUmJZs+erUAgoM6dO+uaa66RJO3YsUN1dXXKzMyUJCUnJyszM1P/9V//pf79+0cep7i4WDNmzJAkdevWLbIvOTlZvXr10qhRo5SRkaGMjAwNGDCgRc9BTEyMHn30UY0cOVJXXHFFy588KbLes88+W126dFGvXr0iz82+ffsi9xs3blxknZdffrlKSkrUpk2boz5PktS3b1/Fxh75a7W0tFRpaWk6++yzJUkDBgxQ586d9dFHHykQCBx1rcXFxZo+fbokKT4+Xq+++mqLz3PgwIGaPHmydu/erfT0dN13332Kj49vco47duzQzp07I1dHJam2tlYff/yxunfvrjPPPFNnnXWWJKlfv35avHixJkyYoPT0dN18883q1q1bi9Zy//336+6779YDDzyghx56SAsXLmzxeQDRgBgDTjIdOnTQM888o7Zt22rKlCm66667tGLFCiUkJOiJJ57Qm2++Kekfb0JPS0s74mW874uFcDisAQMG6PHHH4/ctnv37shLhu5b/wnbNm3aSJIaGxuPCAnnnBoaGprcFggEmnz94ePHxMTopZde0qZNm1RSUqJ58+Zp4MCB+uUvf9mi5+HMM8/Ur371K82YMUMjR4486vHq6+ubfN23n4+2bdse9fFjYv73803hcFixsbFqbGw86vP0+uuvKy4u7nsfKxwOH/W5OtYaYmNjm3zdrl271KlTp8j2sc41NTVV69evV0lJiUpLS/Xzn/9cv/vd75SQkBC5T2Njo+Lj47Vq1arIbXv27FF8fLw+/PDDJudz9tln6/XXX9e7776r0tJS3XLLLZozZ44GDRp01PW/99576ty5s84991y1bdtWo0aN0sMPP3zU+wPRik9TAieZmJiYyB/wyZMnq0ePHrrvvvsUDod19913a9WqVVq1apXuvvvuFj/mgAED9Je//EWffvqpJOntt9/WiBEjVFtbq4EDB+pPf/qTwuGw9u3bp/Xr10uSzjvvPMXGxkY+AVheXq61a9cqPT29yWMPHDhQS5culSR99dVXevfddyVJW7duVVZWlrp3764pU6boF7/4xXG/sXzIkCHKyMjQCy+8ELmtU6dO+uijjyJr2rBhw3E95mErV66MrLmkpEQDBgw45vN0LAMGDNA777yjXbt2SZJKSkq0e/duXXzxxc1+3fLlyyX941OQN998s3bs2BHZf8YZZ6i+vl7bt2+XJP35z3+O7Fu0aJGefvppXX311crJyVGPHj30ySefRKLSOadzzz1XHTp0iMTY7t27lZWVFXn+vq2wsFCzZs3SFVdcoenTp+uKK67Qxx9/fMz1l5aWav78+WpoaFA4HNaaNWuaXDUF8A9cGQNOYoFAQAsXLtSoUaP0+OOP69577z2hx+nRo4fmzJmje++9V865yJvZO3bsqH//939XXl6ehg4dqs6dO+v888+X9I+rSk8//bQefvhhPfXUU2psbNSdd96ptLS0SHBJUl5enmbNmqWhQ4cqJSUl8rJgr169NHToUI0ZM0ZxcXHq0KGDcnNzJUlPPPGEJLUoKHNzc/Xee+9FtidMmKD7779fgwcPVteuXZWWlnZCz0ldXZ1GjRql+vp65ebm6txzz5Wkoz5Px9KjRw/l5eXprrvuUmNjozp06KBnn31W8fHxx/y6Bx98UA899JCuvfZaOec0ZcoUXXTRRZH98fHxmj59urKzs9W5c2cNGTIksu/mm2/WzJkzlZWVpXbt2qlnz54aPny42rRpo9TUVA0fPlwFBQV6+umnNXfuXD333HNqaGjQ3XffrX79+jWZoSSNHDlSGzZs0LBhw3TaaafpzDPP1IQJEyTpqG/gz87O1rx583TdddcpJiZGl156qe67777mn3wgygTct69xAwA
2022-06-20 11:07:41 +02:00
"text/plain": [
"<Figure size 720x576 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Sylwetka (ang.silhouette) dla metody k-medoid i dla k = 3 0.36\n"
]
}
],
"source": [
"print_sns_plot(dataset3)\n",
"model10 = TrainModel_medoids(dataset3, 3)"
]
},
{
"cell_type": "code",
2022-06-20 18:39:28 +02:00
"execution_count": 110,
2022-06-21 15:37:48 +02:00
"id": "c76108ff",
2022-06-20 11:07:41 +02:00
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmkAAAHwCAYAAAD98PjEAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAw4klEQVR4nO3de3hV1YH+8feQHBIPCdSEQCy2xUdbYAAJiDNNccKlREi4pAZDNUjVFAo0TDQdMkZAEqiIRW5yyQyKMz4PqJSLIY7DYHFQHgK2gq2SKFK1XgJBEgKShBBycrJ+f/DjSEBu6iar2d/PP3bvtc/Z63Xt9Hndewc8xhgjAAAAWKVNS08AAAAA56OkAQAAWIiSBgAAYCFKGgAAgIUoaQAAABaipAEAAFiIkgbgGztw4IB69OihlJQUpaSkaNSoUbrrrru0efPmy/r88uXL9eqrrzoyt4yMDB09evS8/bW1tbrrrrs0YsQI/eEPf/hWz3ngwAH17dv3a3/+9ddf15NPPnnFn3vyySe1adOmr31eAHYJbekJAGgdwsPDVVRUFNw+ePCg7rvvPoWEhGjYsGEX/eyf/vQn3XTTTY7Ma+fOnV+5f9++faqqqtLWrVsdOe83UVJSouPHj1/x5x544AEHZgOgpVDSADiiS5cuysrK0jPPPKNhw4bp448/1pw5c3TixAlVVlaqe/fuWrJkiTZs2KDS0lLNnz9fISEhuummm77yuLCwMC1dulRbt26V1+vVtddeq3nz5qlTp0766KOPNHfuXH3xxRcKBAIaP3687rzzTj388MOSpHvvvVdPPfWUrrvuOknS3/72N02fPl2HDx9WSkqKfv/736u4uFjLly9XU1OT2rVrp4cfflg333yzli1bprffflsVFRXq1q2bFixY0Czna6+9piVLlqipqUk+n0+zZ89WREREcHzZsmU6duyYZs2add72H/7wB/37v/+7PB6PQkJC9G//9m9q27at1q5dq0AgoMjISGVnZ2v9+vV64YUX1NTUpO985zt65JFHdOONNyo3N1dffPGFysrKNGjQIFVVVemHP/yhfvnLX6p379761a9+pZ07d6qiokITJkxQenq6AoGA5s+fr23btikyMlI333yzPvroI61evfoqXRkALpsBgG+orKzMxMXFnbf/r3/9q+nTp48xxpjHH3/cbNq0yRhjTENDgxk5cqTZsmWLMcaYe+65x/zv//7vRY8rLy83/fr1M6dOnTLGGPPMM8+YrVu3Gr/fb5KTk01paakxxpjq6mqTlJRk/vKXvxhjjPnRj35kqqqqzpvbH//4RzNixAhjjDEffvih+clPfmI+++wzY4wxu3btMgMGDDA1NTVm6dKlZtiwYcbv95/3HZWVleaWW24x7777rjHGmFdeecX88pe/bPbvY+nSpWb27NnBz5y9/dOf/jQ4zx07dphly5add8yf/vQnk56eburq6oLHDR8+3BhjzEMPPWTuvffe4Hc/9NBDZtWqVcHcq1evNsYYU1JSYnr16mXq6+vNCy+8YMaNG2fq6+vNqVOnTEZGhrnnnnvOywag5XEnDYBjPB6PwsPDJUk5OTnauXOnnn76aX3yySeqqKhQXV3deZ+50HGdO3dW9+7ddccddygh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eTxfPuQ1xsjj8QT/ebZzty/FqcedvrBQhXlDmi1emDdEPm9Iq78d7ObsZ3PjrX/W/jQ3rv3Z3Jaf6/40t627dHXXvsUedxYXFys+Pl7R0dFq27atUlNT9eabbwbHY2NjVVlZGdw+cuSIOnXqpKioKNXU1CgQOP0vp7KyUp06dXJqmlek/TWhyhobpzBviCQFn1O393lbeGbOc3N2t2Pt4UZc9+5l09o7diete/f
"text/plain": [
"<Figure size 720x576 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2022-06-20 18:39:28 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmMAAAHwCAYAAADq0mgNAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAArwklEQVR4nO3de3RU5b3/8c+EcDEYGwiTxAPCUaigmAjFU5Io8Ug14RKRW5eIBSs2gOCJYKVcEk1LC4jlJyqtuFJdRWtyhAoI9BJAXLpKE+B4KxigyK2AkmRIIBBMQpJ5fn/0MMeUSwDZebbs92st/9izJ7Ofme/GvN0zgz5jjBEAAACsCLO9AAAAAC8jxgAAACwixgAAACwixgAAACwixgAAACwixgAAACwixoBvkEOHDql3796NbvvTn/6kvn37qqioqFnWMHv2bC1atOi899m2bZsyMzPPum/ChAlasWLFJR370KFD6t69u37/+983uv3VV1/VjBkzLukxz6Z///7atm3bZXu886mqqtKoUaM0ePBgrVu37oJ+ZsyYMSooKLik4504cUJjx469pJ/9OubMmaMJEyY0+3GBb4Jw2wsAcOnefPNNvfTSS1qyZIluuukm28sJiY+P14svvujIY4eFhWn+/Pnq06ePbrjhBkeO0Zx27Nih8vJyrV+/vlmOV1lZ2Wyhedqf/vQnrVmzRrfeemuzHhf4piDGgG+o3NxcrVixQvn5+erUqdNZ77N582Y999xzuvbaa7Vv3z5dddVVGj9+vH73u99p3759Sk1N1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x576 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Sylwetka (ang.silhouette) dla metody k-medoid i dla k = 4 0.42\n"
]
}
],
"source": [
"print_sns_plot(dataset3)\n",
"model11 = TrainModel_medoids(dataset3, 4)"
]
},
{
"cell_type": "markdown",
2022-06-21 15:37:48 +02:00
"id": "b5e15802",
2022-06-20 11:07:41 +02:00
"metadata": {},
"source": [
"### Przykłady z syntetycznymi zbiorami danych"
]
},
{
"cell_type": "code",
2022-06-20 18:39:28 +02:00
"execution_count": 111,
2022-06-21 15:37:48 +02:00
"id": "23475798",
2022-06-20 11:07:41 +02:00
"metadata": {},
"outputs": [
{
"data": {
2022-06-20 18:39:28 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmgAAAHwCAYAAAASMpP6AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAA4tUlEQVR4nO3deXyU5b338e8kZF8MSxAOiguKUKvido5gH4G2gGGLCyqueHBBUfGgIki1LqgsxYJIUauc8nqpxYoF1FY8ohWrhLqjoIi7QUUTAmHIPslczx9hpgnZJsnMvc3n/ZczmeXiyu3MN79r8xljjAAAAOAYCXY3AAAAAI0R0AAAAByGgAYAAOAwBDQAAACHIaABAAA4DAENAADAYQhoAFr13XffaeDAgcrPz1d+fr7GjRuniRMn6sUXX4zo+UuXLtUrr7wSk7ZNnjxZu3fvbnJ/WVmZJk6cqDFjxujll1+O6nt+9913OvHEEzv8/A0bNujBBx9s9/MefPBBrV27tsPvC8BdutjdAADOl5qaqueeey58+/vvv9fll1+uxMREjRo1qtXnvvXWWzrqqKNi0q6NGzc2e/+2bdtUUlKi9evXx+R9O2PLli3au3dvu5934403xqA1AJyKgAag3fr06aNp06Zp+fLlGjVqlL7++mvdc889Ki8vV3FxsQYMG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3q7S0VJJ08sknt/j6v/rVryRJxx57rGpqalRRUaHXX39d+fn5SklJkSRdcMEFVM8AlyKgAeiQLVu2qH///pKkm266SXV1dcrLy9OwYcO0c+dOmWaO+W3pcQkJCXryySe1ZcsWbdq0Sffff7/+3//7f8rPz1dWVlaj+W+7du1SVlZWxO0MBoPy+XyN7jPGqLa2VpKUnp7e7PMSExMbPc8Yo+3btzca4vT5fI3+nYFAIPzf06dP17nnnquNGzdq9erV+t///V89++yzTdqWn5+vGTNmhG8XFRXpoIMOarVtksIhLNRGY0yToJmQwDowwK34vxdAu3399ddatmyZJk+eLEl68803dd1112n06NGSpA8//FB1dXWS6oNOKAy19LhPP/1UY8eOVb9+/TRlyhRdfvnl2rJli4444ohGCxR27typsWPHhqtfDV+7JYMHD9abb76pHTt2SJI2bdqknTt36oQTTmj1eSeccIK+/PJLff7555KkV199NRykQrp27aqPP/5YxhiVlZXptddekyTV1tbql7/8pSorK3XhhRfqzjvv1Pbt21VTU9Oozb/4xS/097//XUVFRZKklStXatKkSa22qzVDhw7V888/r5qaGtXW1mrNmjUdfi0A9qKCBqBNVVVVys/Pl1RflUlJSdFNN92kYcOGSaqvFl133XVKT09XZmamTj31VBUWFkqSfvnLX+r3v/+9AoFAi48777zzlJeXp3PPPVfp6elKTU3V7bffruTkZC1btkz33XefHn/8cdXW1urGG28MD/2deeaZuvTSS/XQQw+Fq3kHOuqoo3TnnXfq+uuvV11dnVJTU/XII4+0WYXr0aOHFi5cqJkzZ6qurk6ZmZlatGhRo8eMHz9eb7zxhkaOHKmDDz5Y//mf/xmuZM2ePVu33HKLunTpIp/Pp/vvv1/Jyck67bTTdMstt2jOnDm64447dNVVV2ny5Mny+XzKzMzU0qVLm1T8InXOOefo66+/1llnnaX09HQdcsghSktL69BrAbCXzzQ3DgEAcJ0333xTJSUl4TB97733KiUlpUnlD4DzEdAAwCN++uknzZo1S7t27VIwGNSAAQN01113tWvOHgBnIKABAAA4DIsEAAAAHIaABgAA4DAENAAAAIdx3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KyF/qA6sOLV0T+oWNgBoC22BLTS0lItWrRI11xzjT799FM
2022-06-20 11:07:41 +02:00
"text/plain": [
"<Figure size 720x576 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Dataset with 4 centers\n",
"X1, Y1 = make_blobs(n_features=2, centers=4)\n",
"print_sns_plot(X1)"
]
},
{
"cell_type": "code",
2022-06-20 18:39:28 +02:00
"execution_count": 112,
2022-06-21 15:37:48 +02:00
"id": "df756b46",
2022-06-20 11:07:41 +02:00
"metadata": {},
"outputs": [
{
"data": {
2022-06-20 18:39:28 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmMAAAHwCAYAAADq0mgNAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAA65klEQVR4nO3df3xU1Z3/8XeGhEAwaSDmh6vC2lBJjUTErhJQqLYCkRAh0IcIC1QsYJGl0paCkkIXi4BaUanYB627oiXf4pYoomtA5SGPVYJs1RYMZFGQBVtCxoTfhphk7vcPdqYMZH4kmTv3ztzX87+ZOz9O5gTynnM+55wEwzAMAQAAwBIuqxsAAADgZIQxAAAACxHGAAAALEQYAwAAsBBhDAAAwEKEMQAAAAsRxoAY8vnnn+v666/3u+8///M/ddNNN6mqqioqbViyZIlWrVoV9DG7d+/WnDlz2rw2c+ZMVVRUdOi9P//8c/Xr10//8R//4Xf/c889pwULFnToNdty2223affu3RF7vWBOnz6tCRMmaNSoUdqyZUtYz5k8ebIqKys79H6nTp3SlClTOvTc9vJ4PHr00Uc1atQojR49WrNnz1ZDQ0NU3huIJYQxIIb94Q9/0PLly/X888+rsLDQ6ub49O/fX08//bQpr+1yubRixQodOHDAlNePtr1796q+vl6vv/66hg8fbvr7nThxImpBc8OGDaqurtbLL7+sTZs2qXfv3lq+fHlU3huIJYlWNwBAx6xZs0YVFRUqLy/XFVdc0eZj3n//fT3xxBO67LLL9Nlnn6l79+6aMWOGXnzxRX322WcaPny4HnroIUnS1q1b9eyzz6q5uVndunXT/Pnzdf311+v06dNauHChampqlJWVpS5duuiGG26QJH3yySdasmSJjh8/roSEBE2bNk1jxozR+++/r4cfflivvfaajh49qgULFqiurk7/8A//oPr6el/7nn76ab355ptKSkpSz549tWzZMmVlZQX9ubt166Z77rlHP/3pT/WHP/xBXbt29bu+YMECfeMb39C999570e3bbrtNxcXF2rFjh06cOKEf/OAH+vDDD1VdXa3ExEQ9++yzys7OliSVl5erpqZGX331le655x6NHz8+6Oe0atUq/fnPf1ZdXZ369eunxx9/3K9db731ln7961/L4/GoR48eevDBB3XJJZfooYce0tGjR3XnnXdq/fr16tatm+85brdbixcv1oEDB+RyuTRhwgS/Ua3PP/9co0eP1kcffXTRbbfbrfnz5+vYsWOSpGHDhumBBx7Qgw8+qLNnz+rOO+9URUWFDh48qKVLl+r48eNqbW3V5MmTNX78eL3//vtaunSpUlJSdObMGZWXl2vhwoX63//9X7lcLuXn52vJkiVyuVyaPn26JkyYoO985zt+P3Pfvn31s5/9zNdH1157rcrLy4P2L+BIBoCYcfjwYWPAgAHGihUrjKuvvtr4/e9/H/TxO3bsML75zW8a1dXVhmEYxr333mvcddddRlNTk1FfX2/k5+cbtbW1xmeffWYUFxcbDQ0NhmEYxr59+4whQ4YYZ86cMZYuXWr87Gc/Mzwej1FfX28MHTrUePrpp43m5mbjO9/5jrF582bDMAyjtrbWuOWWW4wPP/zQ2LFjhzFq1CjDMAxj1qxZxsqVKw3DMIyDBw8aAwYMMDZs2GD87W9/MwYOHGg0NTUZhmEYzz33nPHmm2+G9fO3trYakyZNMpYvX24YhmH87ne/M+bPn28YhmHMnz/f+N3vfud7zvm3b731VuORRx4xDMMwXn/9dSMvL8/Yu3evr53PPvus73GLFy/2/VyFhYXGvn37gn5OTz/9tDFixAijubn5onZ/+umnxuDBg41Dhw4ZhmEY27dvN4YMGWKcOnXK77O60P3332+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lixZottuuy1g+6VzQXTu3Ln6wQ9+4Js6BuCPAn4gxrhcLt8f8BkzZqhv3776yU9+Io/Hox/96EfauHGjNm7cqB/96Edhv2ZhYaHee+897d+/X5K0bds2lZSU6OzZs7rlllv0xz/+UR6PRydOnNDbb78tSfr617+uxMRE3wrAo0ePavPmzRo8eLDfa99yyy1av369JOlvf/ub3n//fUlSTU2NiouLlZubq5kzZ+r73/9+uwvLR44cqaFDh2rt2rW++3r27KmPP/7Y16adO3e26zW9Xn75ZV+bq6qqVFhYGPRzCqawsFDvvvuuDh8+LEmqqqrSkSNHdN1114V83oYNGySdWwU5depUHTx40Hc9LS1Nzc3N+vTTTyVJr7/+uu/a448/rtWrV+u73/2uFi5cqL59++qTTz7xhUrDMHTVVVepW7duvjB25MgRFRcX+z6/85WXl+vBBx/UzTffrHnz5unmm2/Wnj17gra/urpas2fP1ooVKwhiQBCMjAExLCEhQStWrNDYsWP15JNP6sc//nGHXqdv375asmSJfvzjH8swDF8xe48ePfQv//IvWrx4sYqKitSrVy9dffXVks6NKq1evVq//OUvtWrVKrW2tur+++/XoEGDfIFLkhYvXqwHH3xQRUVFysnJ8U0L5uXlqaioSOPGjVNKSoq6deumsrIySdJTTz0lSWEFyrKyMn3wwQe+25MnT9ZPf/pTjRgxQldccYUGDRrUoc+kqalJY8eOVXNzs8rKynTVVVdJUsDPKZi+fftq8eLFmj17tlpbW9WtWzf95je/UWpqatDnLVq0SL/4xS80evRoGYahmTNn6tprr/VdT01N1bx58zR9+nT16tVLI0eO9F2bOnWqFixYoOLiYnXt2lX9+vXTqFGj1KVLFxUUFGjUqFFat26dVq9eraVLl+p3v/udWlpa9KMf/Ug33HCDXx9K0pgxY7Rz507dcccd6t69uy677DJNnjxZkgIW8D/xxBMyDEO/+tWv9Ktf/UrSuWnzZ555JsSnDzhLgnH+GDcAAACiimlKAAAACxHGAAAALEQYAwAAsBBhDAA
2022-06-20 11:07:41 +02:00
"text/plain": [
"<Figure size 720x576 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
2022-06-20 18:39:28 +02:00
"Sylwetka (ang.silhouette) dla metody k-medoid i dla k = 2 0.53\n"
2022-06-20 11:07:41 +02:00
]
}
],
"source": [
"model12 = TrainModel_medoids(X1, 2)"
]
},
{
"cell_type": "code",
2022-06-20 18:39:28 +02:00
"execution_count": 113,
2022-06-21 15:37:48 +02:00
"id": "98d981cc",
2022-06-20 11:07:41 +02:00
"metadata": {},
"outputs": [
{
"data": {
2022-06-20 18:39:28 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmMAAAHwCAYAAADq0mgNAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAA8EElEQVR4nO3de3xU5aHv/++EkEA0NCTk4vZCNewSjVCQHk2iQLWVa0RI6BFBgpciVi1KvSAQpVsFvJ2i0mp/bN0brbDVXWIRuwW8vPTXNonsiq2IcFAQ0ZZcSJBwCbnNc/5gz5SBTDJJZs1aM+vz/sfXrDWz1jPzBOc7z9VjjDECAACALeLsLgAAAICbEcYAAABsRBgDAACwEWEMAADARoQxAAAAGxHGAAAAbEQYA6LI119/reHDhwcc+6//+i9dcsklqqioiEgZHnzwQa1YsaLD52zdulVz585t99ycOXNUVlbWrXt//fXXGjx4sP7zP/8z4Pjzzz+v++67r1vXbM8VV1yhrVu3hu16HTl8+LCmTZumiRMnatOmTSG9ZubMmdqwYUO37nfo0CGVlJR067Vd1dzcrAceeEATJkzQhAkT9Mgjj6itrS0i9waiSbzdBQDQfS+//LKeeeYZrVq1Sueff77dxfEbMmSInn76aUuuHRcXp0cffVQjRozQeeedZ8k9Imn79u2qq6vTW2+9FZH7HTx4MGJBc/Xq1aqvr9cbb7whr9erGTNm6M0331RhYWFE7g9EC8IYEKVWrlypsrIyrVmzRmeddVa7z/nggw/0i1/8QmeccYa++OIL9e3bVzfffLN+85vf6IsvvtCYMWO0cOFCSdK7776rZ599Vi0tLerTp4/mz5+v4cOH6/Dhw1q0aJF27NihjIwM9erVSyNGjJAkffbZZ3rwwQf1zTffyOPx6MYbb9TkyZP1wQcf6KGHHtIbb7yh6upq3XfffaqpqdE//dM/qa6uzl++p59+Wm+99ZZ69+6t/v37a9myZcrIyOjwfffp00c33HCD7r77br388stKSEgIOH/ffffpn//5n3XTTTed8viKK65QYWGhKisrdfDgQf34xz/Wli1btG3bNsXHx+vZZ59VZmamJGnNmjXasWOHmpubdcMNN2jq1Kkdfk4rVqzQX/7yF9XU1Gjw4MF64oknAsr19ttv65e//KW8Xq9OO+00LViwQKeffroWLlyo6upqXX311XrllVfUp08f/2tqa2u1ePFi7d69W3FxcZo2bVpAq9bXX3+tq666Sh999NEpj2trazV//nwdOHBAkjR69GjdeeedWrBggY4dO6arr75aZWVl2rNnj5YsWaJvvvlGbW1tmjlzpqZOnaoPPvhAS5YsUVJSko4cOaI1a9Zo0aJF+vLLLxUXF6fc3Fw9+OCDiouL0+zZszVt2jT94Ac/CHjPN9xwg6677jrFxcWpvr5eDQ0N+ta3vtVh/QKuZABEja+++soMGzbMPProo+Y73/mOeemllzp8fmVlpTn//PPNtm3bjDHG3HTTTeaaa64xTU1Npq6uzuTm5pqqqirzxRdfmMLCQlNfX2+MMWbnzp3m0ksvNUeOHDFLliwx9957r/F6vaaurs6MGjXKPP3006alpcX84Ac/MBs3bjTGGFNVVWVGjhxptmzZYiorK83EiRONMcbceuutZvny5cYYY/bs2WOGDRtm1q5da/7+97+biy66yDQ1NRljjHn++efNW2+9FdL7b2trMzNmzDCPPPKIMcaY5557zsyfP98YY8z8+fPNc88953/NiY8vv/xys3TpUmOMMb///e9NTk6O2b59u7+czz77rP95ixcv9r+v/Px8s3Pnzg4/p6efftqMHTvWtLS0nFLuzz//3BQUFJi9e/caY4wpLy83l156qTl06FDAZ3Wy2267zTz66KPGGGMaGhrMxIkTzZ49e8x1111n3nzzTf/ncfLnY4wxv/zlL839999vjDHmyJEj5s477zQNDQ0Bz2lpaTETJkwwn3zyif8e48ePNx999JGprKw0OTk55uuvvzbGGPPaa6+ZG2+80RhjTGtrq1m0aJHZs2dPh/Xl8/jjj5thw4aZ6667zhw9ejSk1wBuQssYEGWOHj2qnTt3auXKlZo3b56GDx+uCy64IOjzzzrrLP/5c845R8nJyUpISFBqaqpOO+00HTx4UP/93/+tmpoaXX/99f7XeTwe7d27VxUVFVq4cKE8Ho9SU1N15ZVXSpL27NmjpqYmjRkzRpKUmZmpMWPG6A9/+IMuueQS/3XKy8s1f/58SdLAgQP95zIzM5WTk6MpU6Zo1KhRGjVqlPLz80P6DOLi4vT4449r8uTJuuyyy0L/8CR/ec8++2wNGDBAOTk5/s/m4MGD/udNmzbNX85LL71UFRUV6tWrV9DPSZKGDRum+PhT/7daWVmpvLw8nX322ZKk/Px8paam6pNPPpHH4wla1vLyct1zzz2SpOTkZL3xxhshv8+RI0fq5ptv1r59+1RQUKC77rpLycnJAe9xz5492rt3r791VJKOHTumTz/9VNnZ2TrjjDN05plnSpJGjBih5cuXa+bMmSooKNCsWbM0cODAkMpy991364477tD999+vn//853r00UdDfh+AGxDGgCjTp08fPfvss+rdu7fmzJmj22+/XWVlZUpJSdFTTz2ld999V9LxQeh5eXmndOO1Fxa8Xq/y8/P15JNP+o/t27fP32VoTtjCtlevXpKktra2U4KEMUatra0BxzweT8DrffePi4vTSy+9pK1bt6qiokJLly7VyJEjde+994b0OZxxxhn6l3/5F82fP1+TJ08Oer+WlpaA1534efTu3Tvo9ePi/jG/yev1Kj4+Xm1tbUE/p7feektJSUntXsvr9Qb9rDoqQ3x8fMDrvvrqK/Xv39//uKP3OnToUL3zzjuqqKhQZWWlfvSjH+lf//VflZKS4n9OW1ubkpOTtW7dOv+x/fv3Kzk5WX/5y18C3s/ZZ5+tt956Sx988IEqKyt1ww036MEHH9QVV1wRtPwffvihUlNTde6556p3796aMmWKHn744aDPB9yK2ZRAlImLi/N/gd98880aNGiQ7rrrLnm9Xt1xxx1at26d1q1bpzvuuCPka+bn5+tPf/qTdu3aJUl6//33NWnSJB07dkwjR47Ub3/7W3m9Xh08eFDvvPOOJOm8885TfHy8fwZgdXW1Nm7cqIKCgoBrjxw5Uq+88ook6e9//7s++OADSdKOHTtUWFio7OxszZkzR9dff32XB5aPGzdOo0aN0gsvvOA/1r9/f33yySf+Mm3evLlL1/R57bXX/GWuqKhQfn5+h59TR/Lz8/XHP/5RX331lSSpoqJC+/bt03e/+91OX7d27VpJx2dBzpo1S3v27PGf79evn1paWvT5559Lkn7/+9/7zz3xxBN65pln9MMf/lCLFi3SoEGD9Nlnn/lDpTFG5557rvr06eMPY/v27VNhYaH/8zvRmjVrtGDBAl122WW65557dNlll+nTTz/tsPyVlZVatmyZWltb5fV6tX79+oBWUwDH0TIGRDGPx6NHH31UU6ZM0ZNPPqmf/exn3brOoEGD9OCDD+pnP/uZjDH+weynnXaafvrTn2rx4sUaP368UlNT9Z3vfEfS8ValZ555Rg8//LBWrFihtrY23XbbbcrLy/MHLklavHixFixYoPHjxysrK8vfLZiTk6Px48eruLhYSUlJ6tOnj0pLSyVJTz31lCSFFChLS0v14Ycf+h/PnDlTd999t8aOHauzzjpLeXl53fpMmpqaNGXKFLW0tKi0tFTnnnuuJAX9nDoyaNAgLV68WLfffrva2trUp08f/frXv1ZycnKHr3vggQf085//XFdddZWMMZozZ44uvPBC//nk5GTdc889mj17tlJTUzVu3Dj/uVmzZum+++5TYWGhEhISNHjwYE2cOFG9evXS0KFDNXHiRK1evVrPPPOMlixZoueee06tra264447NGLEiIA6lKTJkydr8+bNmjBhgvr27aszzjhDM2fOlKSgA/hnz56tpUuX6uqrr1ZcXJwuuugi3XXXXZ1/+IDLeMyJbdwAAACIKLo
2022-06-20 11:07:41 +02:00
"text/plain": [
"<Figure size 720x576 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
2022-06-20 18:39:28 +02:00
"Sylwetka (ang.silhouette) dla metody k-medoid i dla k = 3 0.7\n"
2022-06-20 11:07:41 +02:00
]
}
],
"source": [
"model13 = TrainModel_medoids(X1, 3)"
]
},
{
"cell_type": "code",
2022-06-20 18:39:28 +02:00
"execution_count": 114,
2022-06-21 15:37:48 +02:00
"id": "bce6689e",
2022-06-20 11:07:41 +02:00
"metadata": {},
"outputs": [
{
"data": {
2022-06-20 18:39:28 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmMAAAHwCAYAAADq0mgNAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAA+PklEQVR4nO3da3hU5b338d8MOUAwacjZolINFRRB0G5NokK15SSIkNBLhBLwAFh1o9QiKgjdWjzVp6i02ovqs9EKu7olitjKQb3k2ZogW6FFIxTloKjkDASQHCaznhd0RgYyySSZNWvNrO/nTTtrTWbdmRvKr//75DIMwxAAAAAs4ba6AQAAAE5GGAMAALAQYQwAAMBChDEAAAALEcYAAAAsRBgDAACwEGEMiCJfffWVhgwZEnDtb3/7my699FKVlZVFpA0PPPCAli5d2uZ7Pv74Y82ePbvVe7NmzVJJSUmnnv3VV1+pX79++u///u+A688995zuueeeTn1ma6666ip9/PHHYfu8thw5ckSTJk3SmDFjtH79+pB+ZurUqVq7dm2nnnf48GEVFxd36me7YvHixZo1a1bEnwtEgzirGwCg8/7yl7/o6aef1vLly3XeeedZ3Ry/gQMH6qmnnjLls91utx599FFdfPHFOuecc0x5RiRt375dtbW12rBhQ0Sed+jQoYgFTZ+//e1vWrNmjS688MKIPheIFoQxIEotW7ZMJSUlWrlypc4444xW3/PBBx/od7/7nU4//XTt2bNHPXr00MyZM/XnP/9Ze/bs0YgRI3TfffdJkt555x0988wzam5uVvfu3TVv3jwNGTJER44c0fz587Vjxw5lZWWpW7duuvjiiyVJn332mR544AEdPHhQLpdLN954o8aPH68PPvhADz74oN544w1VVlbqnnvuUVVVlb7//e+rtrbW376nnnpKGzZsUHx8vHr16qWHH35YWVlZbf7e3bt31w033KBf/epX+stf/qKEhISA+/fcc49++MMf6qabbjrl9VVXXaWxY8dq06ZNOnTokG6++WZt2bJF5eXliouL0zPPPKPs7GxJ0sqVK7Vjxw41NTXphhtu0MSJE9v8npYuXaq///3vqqqqUr9+/fT4448HtOutt97S73//e3m9XvXs2VP33nuvTjvtNN13332qrKzUtddeq5deekndu3f3/0x1dbUWLVqk3bt3y+12a9KkSQFVra+++krXXHONtm7desrr6upqzZs3TwcOHJAkDRs2THfeeafuvfdeNTQ06Nprr1VJSYn27t2rxYsX6+DBg2ppadHUqVM1ceJEffDBB1q8eLGSkpJ09OhRrVy5UvPnz9cXX3wht9utAQMG6IEHHpDb7daMGTM0adIk/eQnPzmlv3bt2qVnn31Wt912m9577702+xZwLANA1Ni3b58xePBg49FHHzXOPfdc48UXX2zz/Zs2bTLOO+88o7y83DAMw7jpppuM6667zmhsbDRqa2uNAQMGGBUVFcaePXuMsWPHGnV1dYZhGMbOnTuNyy67zDh69KixePFi4+677za8Xq9RW1trDB061HjqqaeM5uZm4yc/+Ymxbt06wzAMo6KiwrjiiiuMLVu2GJs2bTLGjBljGIZh3HrrrcaSJUsMwzCMvXv3GoMHDzZWrVplfPPNN8ZFF11kNDY2GoZhGM8995yxYcOGkH7/lpYWY8qUKcYjjzxiGIZhPPvss8a8efMMwzCMefPmGc8++6z/Z058feWVVxoPPfSQYRiG8de//tXo37+/sX37dn87n3nmGf/7Fi1a5P+98vPzjZ07d7b5PT311FPGyJEjjebm5lPa/fnnnxsFBQXGl19+aRiGYZSWlhqXXXaZcfjw4YDv6mS33Xab8eijjxqGYRj19fXGmDFjjL179xo///nPjTfffNP/fZz8/RiGYfz+97837r//fsMwDOPo0aPGnXfeadTX1we8p7m52bj66quNTz75xP+M0aNHG1u3bjU2bdpk9O/f3/jqq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JG3cuFHjxo1TQ0ODrrjiCr3yyivyer06dOiQ3n77bUnSOeeco7i4OP8KwMrKSq1bt04FBQUBn33FFVfopZdekiR98803+uCDDyRJO3bs0NixY5Wbm6tZs2Zp+vTpHZ5YPmrUKA0dOlTPP/+8/1qvXr38VZjKykpt3ry5Q5/p8+qrr/rbXFZWpvz8/Da/p7bk5+frvffe0759+yRJZWVl2r9/f7sT2vPz87Vq1SpJx1dBTps2TXv37vXfT0lJUXNzsz7//HNJ0l//+lf/vccff1xPP/20fvrTn2r+/Pnq27evPvvsM3+oNAxDZ599trp37+4PY/v379fYsWNbrWKtXLlS9957ry6//HLNnTtXl19+uT799NOgbc/JydF7773n//M4e/Zs/ehHPyKIAa2gMgZEMZfLpUcffVQTJkzQE088oV/+8ped+py+ffvqgQce0C9/+UsZhuGfzN6zZ0/9+7//uxYtWqTRo0crLS1N5557rqTjVaWnn35av/nNb7R06VK1tLTotttuU15enj9wSdKiRYt07733avTo0crJyfEPC/bv31+jR49WUVGRkpKS1L17dy1YsECS9OSTT0pSSIFywYIF+uijj/yvp06dql/96lcaOXKkzjjjDOXl5XXqO2lsbNSECRPU3NysBQsW6Oyzz5akoN9TW/r27atFixbp9ttvV0tLi7p3764//vGPSk5ObvPnFi5cqF//+te65pprZBiGZs2apQsuuMB/Pzk5WXPnztWMGTOUlpamUaNG+e9NmzZN99xzj8aOHauEhAT169dPY8aMUbdu3TRo0CCNGTNGK1as0NNPP63Fixfr2Weflcfj0R133KGLL744oA8lafz48dq8ebOuvvpq9ejRQ6effrqmTp0qSW1O4AfQPpdxYo0bAAAAEcUwJQAAgIUIYwAAABYijAEAAFiIMAYAAGAhwhgAAICFonpriwMHjsr
2022-06-20 11:07:41 +02:00
"text/plain": [
"<Figure size 720x576 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
2022-06-20 18:39:28 +02:00
"Sylwetka (ang.silhouette) dla metody k-medoid i dla k = 4 0.69\n"
2022-06-20 11:07:41 +02:00
]
}
],
"source": [
"model14 = TrainModel_medoids(X1, 4)"
]
},
{
"cell_type": "code",
2022-06-20 18:39:28 +02:00
"execution_count": 115,
2022-06-21 15:37:48 +02:00
"id": "5b6502bf",
2022-06-20 11:07:41 +02:00
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmAAAAHwCAYAAAAB5dMOAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAB0b0lEQVR4nO3de3xU9Zk/8M9MMpnJ3BIySbgnQDBAkYtQimBV1hIV0eYHCgRqV6t0QaW6+NNi+WnVlVZtXWmVgt1ql64UuShIdwVtgOINy4IXQI2kREgCBnIjTGaSSSaZ8/tjMoeZzDlzSWbO3D7v12tfa8JcTk7nnHm+3+/zfR6VIAgCiIiIiEgx6lgfABEREVGqYQBGREREpDAGYEREREQKYwBGREREpDAGYEREREQKYwBGREREpDAGYEQU0JkzZzBu3DiUlpaitLQUt9xyC8rKyrB79+6Qnr9u3Trs3bs3Ksd21113obm52e/3NpsNZWVlmDt3Lv76179G9D3PnDmDK664os/PP3DgAH7729+G/bzf/va3ePPNN/v8vkQUX9JjfQBEFP90Oh127dol/nz27FnceeedSEtLww033BDwuYcOHcLo0aOjclwffvih5O8rKirQ1NSE8vLyqLxvfxw/fhwXL14M+3kPPPBAFI6GiGKFARgRhW3o0KG4//778corr+CGG27AqVOn8G//9m+w2+1oaGjA2LFj8Zvf/Aavv/46Pv/8c/zqV79CWloaRo8eLfk4rVaLF154AeXl5dBoNBgwYACefvpp5Ofno6qqCr/4xS/Q0tKC7u5u/PCHP8Rtt92Gn/3sZwCAO+64A//xH/+BwYMHAwC+/vprrF69GufPn0dpaSm2bt2KDz74AOvWrYPL5YLBYMDPfvYzTJw4ES+++CI+++wz1NfXY8yYMXjuued8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ERERApjAEZERESkMAZgRERERApjAEZERESkMAZgRERERApjAEZERESkMAZgRERERApjAEZERESkMAZg3lSAtd2JmgY7rI4uQBXrAyIiIqJklB7rA4gbKqCi5iJe2PYZOpzd0GrScP/CyRhXkAUIsT44IiIiSiacAethbXOKwRcAdDi78cK2z2Btc8b4yIiIiCjZMADr0WLrFIMvjw5nN1rsnTE6IiIiIkpWDMB6ZJu00GrSfH6n1aQh25ARoyMiIiKiZMUArIc5Mx33L5wsBmGeHDCzXhPjIyMiIqJkwyR8DwEYV5CFZ++diRZ7J7INGe7giwn4REREFGEMwLwJgDlTA3OmRvyZiIiIKNK4BElERESkMAZgRERERApjAEZERESkMAZgRERERApjAEZElGjYt5Yo4XEXJBFRImHfWqKkwBkwIqIEwr61RMkhZgHYb37zG7z44ouxensiooTEvrVEyUHxAKy1tRWrV6/Gf/7nfyr91kRECY99a4mSg+IB2L59+zBixAj86Ec/UvqtiYgSHvvWEiUHlSAIMUnb9Cw//uQnP4nF2xMRJSyXS0Bdox3Nre3IMWVicK4BajW3QhIlkqjtgtyzZw+efvppn9+NGjUKGzdu7NfrNjXZ4HKl1lafvDwTGhpaY30YKYHnWjk81/2ToQIGmXUABDQ12QI+ludaOTzXyon3c61Wq2CxGGX/PWoB2Jw5czBnzpxovTwRERFRwmIZCiIiIiKFMQAjIiIiUljMKuEz+Z6IiIhSFWfAiIiIiBTGAIyIiIhIYQzAiIiIiBTGAIyIiIhIYQzAiIiIiBTGAEwpKsDa7kRNgx1WRxfAriFEREQpK2ZlKFKKCqiouYgXtn2GDme32Dx3XEEWkFpdlYiIiAicAVOEtc0pBl8A0OHsxgvbPoO1zRn
"text/plain": [
"<Figure size 720x576 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmAAAAHwCAYAAAAB5dMOAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9t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J8Si4CMK4wB+vumgGLvR25hixP8MUCfCIiSiMMwCj5CIA5WwNztkb8moiIKJ1wCZKIiIhIYQzAiIiIiBTGAIyIiIhIYQzAiIiIiBTGAIyIiIhIYQzAiIiIiBTGAIyIiIhIYQzAiIiIiBTGAIySlwqwtrlQ22CH1dEBqBI9ICIiothgJ3xKTiqgqvYSNmz/DE5Xp3gm5LjCHHbGJyKilMcMGCUla6tLDL4AwOnqxIbtn8Ha6krwyIiIiHqPARglJYutXQy+vJyuTljs7QkaERERUewwAKOklGvSQqvJ8PueVpOBXENWgkZEREQUOwzAKCmZszOxcuFkMQjz1oCZ9ZoEj4yIiKj3WIRPyUkAxhXmYN1dM2CxtyPXkOUJvliAT0REaYABGCUvATBna2DO1ohfExERpQMuQVLyYz8wIiJKM8yAUXJjPzAiIkpDDMAoqQX2AzMZNDhdb4M2KwP5OTqYszMZiBERUcphAEbJQ+UJuCy2duSatDBnZ/r1A8vP1eHGGSOxraKa2TAiIkppDMAoOcgsNQ4tMECryYDT1YnZUwvF4Avo7o6/7q4Z3YX6REREKYBF+JQU5I4eanN1YsWCSZ5+YCqwOz4REaUFBmCUFOS
"text/plain": [
"<Figure size 720x576 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# 2 clusters\n",
"X2, y2 = make_classification(n_samples=500, n_features=2, n_informative=2, n_redundant=0, n_repeated=0, n_classes=2,\n",
" n_clusters_per_class=1, class_sep=4, flip_y=0, weights=[0.5, 0.5], random_state=17)\n",
"print_sns_plot(X2)\n",
"\n",
"# 4 clusters\n",
"X3, y3 = make_classification(n_samples=500, n_features=2, n_informative=2, n_redundant=0, n_repeated=0, n_classes=2,\n",
" n_clusters_per_class=2, class_sep=3, flip_y=0, weights=[0.5, 0.5], random_state=17)\n",
"print_sns_plot(X3)"
]
},
{
"cell_type": "code",
2022-06-20 18:39:28 +02:00
"execution_count": 116,
2022-06-21 15:37:48 +02:00
"id": "f902c182",
2022-06-20 11:07:41 +02:00
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmMAAAHwCAYAAADq0mgNAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAABjR0lEQVR4nO3de3xU5Z0/8M9ckskFaGJMGO9tQ2Ukghh3kYCCugpBINVAf0UsUHHRVlkq7SIKtHStIF6qVivuQm2LSoo3FLA1oKKshmBWogUTIiVIleJADIlAyG1mzu8Peg5zObeZzJlzZubzfr32tZ3bmSc5pXx4nu/zfWyCIAggIiIiIlPYzR4AERERUTpjGCMiIiIyEcMYERERkYkYxoiIiIhMxDBGREREZCKGMSIiIiITMYwRJZGDBw/i0ksvDXnuL3/5Cy6//HLU1tYmZAz33XcfnnzySdX37N69G/PmzZN97fbbb8f69etj+u6DBw9i8ODBeOmll0Kef+aZZ3DPPffEdE0511xzDXbv3h2366k5ceIEpk2bhokTJ2LLli26PjNjxgxUV1fH9H3Hjx/HzJkzY/pstAKBAB566CFMnDgRkydPxty5c3H06NGEfDdRMmEYI0pi69atw4oVK/DHP/4RZWVlZg9HMnToUDzxxBOGXNtut+PBBx/E/v37Dbl+ou3Zswetra3485//jHHjxhn+fV9//XXCguYrr7yChoYGvPrqq9i0aRPOP/98rFixIiHfTZRMnGYPgIhis2rVKqxfvx5VVVU499xzZd/zwQcf4NFHH8VZZ52Fzz77DNnZ2bjtttvw3HPP4bPPPsO4ceOwaNEiAMDWrVvx9NNPo7e3F1lZWVi4cCEuvfRSnDhxAosXL0ZTUxOKiorgcDhw2WWXAQD+9re/4b777kN7eztsNhtmz56NG264AR988AF+9atf4fXXX8fhw4dxzz334MiRIzj77LPR2toqje+JJ57Am2++iYyMDOTn5+OBBx5AUVGR6s+dlZWFW265Bf/5n/+JdevWITMzM+T1e+65B9/5zndw6623Rjy+5pprMGnSJOzYsQNff/01/v3f/x319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73yyisATu2CnDVrFg4cOCC9PmDAAPT29mLfvn0AgD//+c/Sa4888ghWrlyJa6+9FosXL8agQYPwt7/9TQqVgiDgW9/6FrKysqQw9uWXX2LSpEnS7y9YVVUV7r33XlxxxRVYsGABrrjiCjQ2NqqOv6GhAXPnzsWDDz7IIEakgjNjREnMZrPhwQcfxI033ojHH38cP/3pT2O6zqBBg3Dffffhpz/9KQRBkIrZc3Nz8R//8R9YunQpJkyYgDPOOAMXXnghgFOzSitXrsT999+PJ598En6/H3feeSdGjhwpBS4AWLp0Ke69915MmDABbrdbWhb0eDyYMGECpkyZgpycHGRlZWHJkiUAgN/85jcAoCtQLlmyBDt37pQez5gxA//5n/+J8ePH49xzz8XIkSNj+p10d3fjxhtvRG9vL5YsWYJvfetbAKD4e1IzaNAgLF26FHPnzoXf70dWVhb++7//G/3791f93C9+8Qv88pe/xOTJkyEIAm6//XZcfPHF0uv9+/fHggULMGfOHJxxxhkoLy+XXps1axbuueceTJo0CZmZmRg8eDAmTpwIh8OBYcOGYeLEiVi7di1WrlyJZcuW4Xe/+x18Ph9+8pOf4LLLLgu5hwBwww03oK6uDtdffz2ys7Nx1llnYcaMGQCgWMD/6KOPQhAE/PrXv8avf/1rAKeWzZ966imN3z5RerEJwXPcRERERJRQXKYkIiIiMhHDGBEREZGJGMaIiIiITMQ
"text/plain": [
"<Figure size 720x576 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Sylwetka (ang.silhouette) dla metody k-medoid i dla k = 2 0.72\n"
]
}
],
"source": [
"model15 = TrainModel_medoids(X2, 2)"
]
},
{
"cell_type": "code",
2022-06-20 18:39:28 +02:00
"execution_count": 117,
2022-06-21 15:37:48 +02:00
"id": "c4675813",
2022-06-20 11:07:41 +02:00
"metadata": {},
"outputs": [
{
"data": {
2022-06-20 18:39:28 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmMAAAHwCAYAAADq0mgNAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAABibklEQVR4nO3deWBU1d0//vcsSUgCachGFBUFhAiCgi0mQUFtBVFATPBXxAKKglZ9UGsRhbT0sYKKtm4t9geoiIIrUUAtglJ8lCRGgYqyyC6KTlYgJGSZ5X7/iHec5d47d5Y7987M+/WXs5/MJfD2nM/5HJMgCAKIiIiISBdmvQdARERElMgYxoiIiIh0xDBGREREpCOGMSIiIiIdMYwRERER6YhhjIiIiEhHDGNEMeT777/HkCFDvO57//33cfHFF6OysjIqY3jooYfw7LPPKj7nq6++wqxZsyQfu+2221BeXh7SZ3///ffo378/3nzzTa/7n3/+eTzwwAMhvaeUK664Al999VXE3k9Jc3MzJk2ahGuuuQYbNmxQ9ZopU6Zg/fr1IX3eyZMnMXXq1JBeG44FCxbgtttui/rnEsUCq94DIKLQvfbaa1i8eDGWL1+O8847T+/huA0aNAjPPPOMJu9tNpvx2GOP4aKLLkLv3r01+Yxo2r17NxoaGrBx48aofN6JEyeiFjRF77//PtatW4cLLrggqp9LFCsYxohi1JIlS1BeXo5Vq1bhjDPOkHzOZ599hr///e847bTTcOjQIaSmpmLmzJl4+eWXcejQIYwaNQpz584FAGzatAnPPfcc7HY7unTpgjlz5mDIkCFobm7GvHnzsGfPHuTl5cFiseCiiy4CAOzbtw8PPfQQjh8/DpPJhOnTp2PChAn47LPP8Ne//hXvvvsuampq8MADD6C2thann346Ghoa3ON75plnsHHjRiQlJaF79+545JFHkJeXp/hzd+nSBTfffDP++Mc/4rXXXkNycrLX4w888ADOPfdc3HLLLX63r7jiCowdOxZVVVU4ceIEbr31Vmzbtg07d+6E1WrFc889hx49egAAVq1ahT179qCjowM333wzJk6cqPg9Pfvss/jvf/+L2tpa9O/fH0888YTXuD788EP84x//gMvlQnp6Oh588EF07doVc+fORU1NDa699lq8/vrr6NKli/s1dXV1m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o7MJvNePzxxzFhwgRccskl6r88wD3eM888Ezk5OSgoKHB/NydOnHA/b9KkSe5xDh8+HJWVlbBYLLLfEwBceOGFsFr9/1qtqqpCYWEhzjzzTABAUVERsrKy8PXXX8NkMsmOtaKiArNnzwYAdOvWDe+++67qn/PSSy/FzJkz8eOPP6K4uBj33XcfunXr5vUzHj58GEeOHHHPjgJAW1sbdu3ahT59+uC0005Dz549AQAXXXQRnnzySUyZMgXFxcWYNm0aevXqpTiGefPmYcqUKejXrx++/vpr1WMnSjQMY0QxpkuXLnjuueeQlJSE2267DXfddRfKy8uRmZmJp59+Gps2bQLQWYReWFjot4wnFRZcLheKiorw1FNPue/78ccf3UuGgscRthaLBQDgdDr9goQgCHA4HF73mUwmr9eLn282m/HKK6/gq6++QmVlJRYuXIhLL70U999/v6rv4bTTTsP//u//Ys6cOZgwYYLs59ntdq/XeX4fSUlJsu9vNv+8v8nlcsFqtcLpdMp+Txs3bkRaWprke7lcLtnvSmkMVqvV63Xfffcdunfv7r6t9LMOHjwYH330ESorK1FVVYXrr78eS5cuRWZmpvs5TqcT3bp1w5o1a9z31dfXo1u3bvjvf//r9fOceeaZ2LhxIz777DNUVVXh5ptvxkMPPYQrrrhCcuw2mw1ffPEFDh06hOXLl+PEiRM4efIkZsyYgaVLl8r+zESJiLspiWKM2Wx2/wM+c+ZM9O3bF/fddx9cLhfuvvturFmzBmvWrMHdd9+t+j2LioqwZcsWHDhwAADw8ccfY/z48Whra8Oll16Kt956Cy6XCydOnMBHH30EAOjduzesVqt7B2BNTQ0++OADFBcXe733pZdeitdffx0A8MMPP+Czzz4DAOzZswdjx45Fnz59cNttt+Gmm24KurD8qquuwogRI/DSSy+57+vevbt7FqampgbV1dVBvafo7bffdo+5srISRUVFit+TkqKiInz66af47rvvAACVlZX48ccfAxa0FxUVYfXq1QA6d0FOmzYNhw8fdj+ekZEBu92O/fv3AwDee+8992NPPPEEFi9ejN/85jeYN28e+vbti3379rlDpSAIOOecc9ClSxd3GPvxxx8xduxYyVmsVatW4cEHH8Qll1yC2bNn45JLLsGuXbtkx56fn49PP/3U/edx1qxZ+OUvf8kgRiSBM2NEMcxkMuGxxx7Dddddh6eeegp/+MMfQnqfvn374qGHHsIf/vAHCILgLmZPT0/H//zP/2D+/PkYM2YMsrKy0K9fPwCds0qLFy/Gww8/jGeffRZOpxN33nknCgsL3YELAObPn48HH3wQY8aMQX5+vntZsKCgAGPGjEFpaSnS0tLQpUsXlJWVAQCefvppAFAVKMvKyrB161b37SlTpuCPf/wjRo8ejTPOOAOFhYUhfSft7e247rrrYLfbUVZWhnPOOQcAZL8nJX379sX8+fNx1113wel0okuXLvjXv/6Fbt26Kb7uz3/+M/7yl79g3LhxEAQBt912G84//3z34926dcPs2bMxY8YMZGVl4aqrrnI/Nm3aNDzwwAMYO3YskpOT0b9/f1xzzTWwWCwYPHgwrrnmGqxcuRKLFy/GggULsGzZMjgcDtx999246KKLvK4hAEyYMAHV1dW4+uqrkZqaitNOOw1TpkwBAMUCfiIKzCR4znETERERUVRxmZKIiIhIRwxjRERERDpiGCMiIiLSEcMYERERkY4YxoiIiIh0FNOtLY4da4HLpd1m0OzsrmhoaNbs/Sk0vC7Gw2t
2022-06-20 11:07:41 +02:00
"text/plain": [
"<Figure size 720x576 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Sylwetka (ang.silhouette) dla metody k-medoid i dla k = 4 0.77\n"
]
}
],
"source": [
"model16 = TrainModel_medoids(X3, 4)"
]
}
],
"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
}