{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "initial_id", "metadata": { "jupyter": { "is_executing": true } }, "outputs": [], "source": [ "import pandas as pd\n", "from sklearn.preprocessing import MinMaxScaler, StandardScaler\n", "from sklearn.model_selection import KFold\n", "from sklearn import decomposition" ] }, { "cell_type": "code", "execution_count": 2, "id": "67503952-9074-4cdb-9d7e-d9142f7c319c", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | age | \n", "trestbps | \n", "chol | \n", "thalach | \n", "oldpeak | \n", "sex_0 | \n", "sex_1 | \n", "cp_1 | \n", "cp_2 | \n", "cp_3 | \n", "... | \n", "slope_1 | \n", "slope_2 | \n", "slope_3 | \n", "thal_3.0 | \n", "thal_6.0 | \n", "thal_7.0 | \n", "ca_0.0 | \n", "ca_1.0 | \n", "ca_2.0 | \n", "ca_3.0 | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "0.708333 | \n", "0.481132 | \n", "0.244292 | \n", "0.603053 | \n", "0.370968 | \n", "False | \n", "True | \n", "True | \n", "False | \n", "False | \n", "... | \n", "False | \n", "False | \n", "True | \n", "False | \n", "True | \n", "False | \n", "True | \n", "False | \n", "False | \n", "False | \n", "
1 | \n", "0.791667 | \n", "0.622642 | \n", "0.365297 | \n", "0.282443 | \n", "0.241935 | \n", "False | \n", "True | \n", "False | \n", "False | \n", "False | \n", "... | \n", "False | \n", "True | \n", "False | \n", "True | \n", "False | \n", "False | \n", "False | \n", "False | \n", "False | \n", "True | \n", "
2 | \n", "0.791667 | \n", "0.245283 | \n", "0.235160 | \n", "0.442748 | \n", "0.419355 | \n", "False | \n", "True | \n", "False | \n", "False | \n", "False | \n", "... | \n", "False | \n", "True | \n", "False | \n", "False | \n", "False | \n", "True | \n", "False | \n", "False | \n", "True | \n", "False | \n", "
3 | \n", "0.166667 | \n", "0.339623 | \n", "0.283105 | \n", "0.885496 | \n", "0.564516 | \n", "False | \n", "True | \n", "False | \n", "False | \n", "True | \n", "... | \n", "False | \n", "False | \n", "True | \n", "True | \n", "False | \n", "False | \n", "True | \n", "False | \n", "False | \n", "False | \n", "
4 | \n", "0.250000 | \n", "0.339623 | \n", "0.178082 | \n", "0.770992 | \n", "0.225806 | \n", "True | \n", "False | \n", "False | \n", "True | \n", "False | \n", "... | \n", "True | \n", "False | \n", "False | \n", "True | \n", "False | \n", "False | \n", "True | \n", "False | \n", "False | \n", "False | \n", "
5 rows × 28 columns
\n", "KMeans(n_clusters=2, random_state=42)In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
KMeans(n_clusters=2, random_state=42)