{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "q0PjiV7v7aXC"
},
"source": [
"# \n",
"\n",
"# Машинное обучение. ВМК МГУ"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "uvZhhOzlKCMH"
},
"source": [
"# Практическое задание 3: Основы sklearn на примере KNN. Нормализация признаков и Кросс-валидация\n",
"\n",
"## Уровень: **Базовый (Base)**"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "uqAqpeYFxg5T"
},
"source": [
"# О формате сдачи\n",
"\n",
"🔷 **При решении ноутбука используйте данный шаблон**\n",
"\n",
" ✅ Можно добавлять новые ячейки любых типов\n",
" ❌ Не нужно удалять текстовые ячейки c разметкой частей ноутбука и формулировками заданий\n",
"\n",
"\n",
"🔷 **При оценивании задач учитывается код**\n",
"\n",
" ✅ Задания, в которых необходим код, обычно помечаются фразами \"Your code here\"/\"Ваш код\" и аналогичными\n",
" ❌ Ответы на вопросы без сопутствующего кода оцениваются в 0 баллов\n",
" ❌ Наличе работоспособного кода в ноутбуке, если на сказано иного, обязательно\n",
"\n",
"🔷 **При оценивании задач учитываются выводы**\n",
"\n",
" ✅ Задания, в которых необходимы выводы, обычно помечаются фразами Вывод\"/\"Ответ на вопрос\"/\"Ваш текст\" и аналогичными\n",
" ✅ Обычно выводы подразумевают под собой текстовый ответ (можно писать markdown, latex).\n",
" ✅ Сопутствующие изображения, графики, таблички - приветствуются!\n",
" ❌ При отсутствии выводов задание не засчитается на полный балл\n",
"\n",
"-----------\n",
"\n",
"\n",
"* Многие из заданий можно выполнить несколькими способами. Не существуют единственно верного, но попробуйте максимально задействовать арсенал pandas и ориентируйтесь на простоту и понятность вашего кода. Не забывайте, что можно гуглить и что-то искать на stackoverflow, например.\n",
"\n",
"\n",
"\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "exCE5gc27aXG"
},
"source": [
"**Примерное время выполнения (execution time/время выполнения, если нажать run all) всех ячеек ноутбука при правильной реализации: 10 минут **"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "ciHgl9KGlJua"
},
"source": [
"# Подготовка рабочей среды\n",
"\n",
"Сначала установим нужные нам версии библиотек. Мы гарантируем, что в данных версиях задание будет корректно отрабатывать.\n",
"\n",
"После установки нужных версий, **возможно,** нужно перезагрузить среду (runtime), но скорее всего вам это не понадобится\n",
"\n",
"\n",
"На скачивание файла и установку понадобится не более 5 минут.\n",
"\n",
"**Важно!**\n",
"\n",
"Устанавливать нужные версии нужно каждый раз, когда создается новый рантайм. Например, если вы 2 часа подряд делаете это задание, то подготовить библиотеки достаточно 1 раз. Но если вы, например, начали в понедельник, затем закрыли/выключили ноутбук, то при продолжении в среду, вам нужно будет запустить рантайм заново и следовательно заново установить библиотеки.\n",
"\n",
"**Важно!**\n",
"Если вы предпочитаете делать практические задания на своем личном ноутбуке, то проверьте, что вы установили рабочее окружение в [соответствии с гайдом](https://github.com/MSU-ML-COURSE/ML-COURSE-24-25/blob/main/tutorials/%D0%A2%D1%83%D1%82%D0%BE%D1%80%D0%B8%D0%B0%D0%BB%20%D0%BF%D0%BE%20%D1%83%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BA%D0%B5%20%D1%80%D0%B0%D0%B1%D0%BE%D1%87%D0%B5%D0%B3%D0%BE%20%D0%BE%D0%BA%D1%80%D1%83%D0%B6%D0%B5%D0%BD%D0%B8%D1%8F%20%D0%B2%20Python%20%D0%B4%D0%BB%D1%8F%20%D1%80%D0%B5%D1%88%D0%B5%D0%BD%D0%B8%D1%8F%20%D0%B7%D0%B0%D0%B4%D0%B0%D1%87%20(2).pdf)"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"id": "fMgnzKcqlIen"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" % Total % Received % Xferd Average Speed Time Time Time Current\n",
" Dload Upload Total Spent Left Speed\n",
"100 360 100 360 0 0 696 0 --:--:-- --:--:-- --:--:-- 697\n",
"Collecting catboost==1.2.8 (from -r ./requirements_2025_26_for_colab_small.txt (line 1))\n",
" Downloading catboost-1.2.8-cp312-cp312-manylinux2014_x86_64.whl.metadata (1.2 kB)\n",
"Collecting gdown==5.2.0 (from -r ./requirements_2025_26_for_colab_small.txt (line 2))\n",
" Downloading gdown-5.2.0-py3-none-any.whl.metadata (5.8 kB)\n",
"Collecting h5py==3.14.0 (from -r ./requirements_2025_26_for_colab_small.txt (line 3))\n",
" Downloading h5py-3.14.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.7 kB)\n",
"Collecting hyperopt==0.2.7 (from -r ./requirements_2025_26_for_colab_small.txt (line 4))\n",
" Downloading hyperopt-0.2.7-py2.py3-none-any.whl.metadata (1.7 kB)\n",
"Collecting ipympl==0.9.7 (from -r ./requirements_2025_26_for_colab_small.txt (line 5))\n",
" Downloading ipympl-0.9.7-py3-none-any.whl.metadata (8.7 kB)\n",
"Collecting ipywidgets==7.7.1 (from -r ./requirements_2025_26_for_colab_small.txt (line 6))\n",
" Downloading ipywidgets-7.7.1-py2.py3-none-any.whl.metadata (1.9 kB)\n",
"Collecting lightgbm==4.6.0 (from -r ./requirements_2025_26_for_colab_small.txt (line 7))\n",
" Downloading lightgbm-4.6.0-py3-none-manylinux_2_28_x86_64.whl.metadata (17 kB)\n",
"Requirement already satisfied: matplotlib-inline==0.1.7 in /nix/store/xll44q41bdn0i1zcphwj7p95j5arz356-python3.12-matplotlib-inline-0.1.7/lib/python3.12/site-packages (from -r ./requirements_2025_26_for_colab_small.txt (line 8)) (0.1.7)\n",
"Collecting matplotlib==3.10.0 (from -r ./requirements_2025_26_for_colab_small.txt (line 9))\n",
" Downloading matplotlib-3.10.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (11 kB)\n",
"Collecting numpy==2.0.2 (from -r ./requirements_2025_26_for_colab_small.txt (line 10))\n",
" Downloading numpy-2.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (60 kB)\n",
"Collecting pandas==2.2.2 (from -r ./requirements_2025_26_for_colab_small.txt (line 11))\n",
" Downloading pandas-2.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (19 kB)\n",
"Collecting pep8==1.7.1 (from -r ./requirements_2025_26_for_colab_small.txt (line 12))\n",
" Downloading pep8-1.7.1-py2.py3-none-any.whl.metadata (22 kB)\n",
"Collecting plotly==5.24.1 (from -r ./requirements_2025_26_for_colab_small.txt (line 13))\n",
" Downloading plotly-5.24.1-py3-none-any.whl.metadata (7.3 kB)\n",
"Collecting pycodestyle==2.14.0 (from -r ./requirements_2025_26_for_colab_small.txt (line 14))\n",
" Downloading pycodestyle-2.14.0-py2.py3-none-any.whl.metadata (4.5 kB)\n",
"Collecting pytest==8.4.1 (from -r ./requirements_2025_26_for_colab_small.txt (line 15))\n",
" Downloading pytest-8.4.1-py3-none-any.whl.metadata (7.7 kB)\n",
"Collecting scikit-image==0.25.2 (from -r ./requirements_2025_26_for_colab_small.txt (line 16))\n",
" Downloading scikit_image-0.25.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (14 kB)\n",
"Collecting scikit-learn==1.6.1 (from -r ./requirements_2025_26_for_colab_small.txt (line 17))\n",
" Downloading scikit_learn-1.6.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (18 kB)\n",
"Collecting scipy==1.16.1 (from -r ./requirements_2025_26_for_colab_small.txt (line 18))\n",
" Downloading scipy-1.16.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (61 kB)\n",
"Collecting seaborn==0.13.2 (from -r ./requirements_2025_26_for_colab_small.txt (line 19))\n",
" Downloading seaborn-0.13.2-py3-none-any.whl.metadata (5.4 kB)\n",
"Collecting tqdm==4.67.1 (from -r ./requirements_2025_26_for_colab_small.txt (line 20))\n",
" Downloading tqdm-4.67.1-py3-none-any.whl.metadata (57 kB)\n",
"Collecting umap-learn==0.5.9.post2 (from -r ./requirements_2025_26_for_colab_small.txt (line 21))\n",
" Downloading umap_learn-0.5.9.post2-py3-none-any.whl.metadata (25 kB)\n",
"Collecting xgboost==3.0.4 (from -r ./requirements_2025_26_for_colab_small.txt (line 22))\n",
" Downloading xgboost-3.0.4-py3-none-manylinux_2_28_x86_64.whl.metadata (2.1 kB)\n",
"Collecting graphviz (from catboost==1.2.8->-r ./requirements_2025_26_for_colab_small.txt (line 1))\n",
" Downloading graphviz-0.21-py3-none-any.whl.metadata (12 kB)\n",
"Requirement already satisfied: six in /nix/store/vfy6pmqhgw9kaxiqyhmlg8rmn2aaw6fd-python3.12-six-1.17.0/lib/python3.12/site-packages (from catboost==1.2.8->-r ./requirements_2025_26_for_colab_small.txt (line 1)) (1.17.0)\n",
"Requirement already satisfied: beautifulsoup4 in /nix/store/bwljsfpk78gbaq7rvm3wr3jyrqbwb8i9-python3.12-beautifulsoup4-4.12.3/lib/python3.12/site-packages (from gdown==5.2.0->-r ./requirements_2025_26_for_colab_small.txt (line 2)) (4.12.3)\n",
"Requirement already satisfied: filelock in /nix/store/zm1ag99a91zq3h525fbpka5s4yvnjx6c-python3.12-filelock-3.18.0/lib/python3.12/site-packages (from gdown==5.2.0->-r ./requirements_2025_26_for_colab_small.txt (line 2)) (3.18.0)\n",
"Requirement already satisfied: requests[socks] in /nix/store/7i5sy2qyz79gjkdlcrmdlgzmjlimq7sk-python3.12-requests-2.32.3/lib/python3.12/site-packages (from gdown==5.2.0->-r ./requirements_2025_26_for_colab_small.txt (line 2)) (2.32.3)\n",
"Collecting networkx>=2.2 (from hyperopt==0.2.7->-r ./requirements_2025_26_for_colab_small.txt (line 4))\n",
" Downloading networkx-3.5-py3-none-any.whl.metadata (6.3 kB)\n",
"Collecting future (from hyperopt==0.2.7->-r ./requirements_2025_26_for_colab_small.txt (line 4))\n",
" Downloading future-1.0.0-py3-none-any.whl.metadata (4.0 kB)\n",
"Collecting cloudpickle (from hyperopt==0.2.7->-r ./requirements_2025_26_for_colab_small.txt (line 4))\n",
" Downloading cloudpickle-3.1.2-py3-none-any.whl.metadata (7.1 kB)\n",
"Collecting py4j (from hyperopt==0.2.7->-r ./requirements_2025_26_for_colab_small.txt (line 4))\n",
" Downloading py4j-0.10.9.9-py2.py3-none-any.whl.metadata (1.3 kB)\n",
"Requirement already satisfied: ipython<10 in /nix/store/sx6qmhz6rv8fdx0z2jym3kg7pb4ihi9l-python3.12-ipython-9.2.0/lib/python3.12/site-packages (from ipympl==0.9.7->-r ./requirements_2025_26_for_colab_small.txt (line 5)) (9.2.0)\n",
"Collecting pillow (from ipympl==0.9.7->-r ./requirements_2025_26_for_colab_small.txt (line 5))\n",
" Downloading pillow-12.0.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (8.8 kB)\n",
"Requirement already satisfied: traitlets<6 in /nix/store/5fkvg2aiqnv0v6r3k9f4x41qbql50f78-python3.12-traitlets-5.14.3/lib/python3.12/site-packages (from ipympl==0.9.7->-r ./requirements_2025_26_for_colab_small.txt (line 5)) (5.14.3)\n",
"Requirement already satisfied: ipykernel>=4.5.1 in /nix/store/pzz4808nm0p3lmjpzxnfyb7d3xb6csby-python3.12-ipykernel-6.29.5/lib/python3.12/site-packages (from ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (6.29.5)\n",
"Collecting ipython-genutils~=0.2.0 (from ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6))\n",
" Downloading ipython_genutils-0.2.0-py2.py3-none-any.whl.metadata (755 bytes)\n",
"Collecting widgetsnbextension~=3.6.0 (from ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6))\n",
" Downloading widgetsnbextension-3.6.10-py2.py3-none-any.whl.metadata (1.3 kB)\n",
"Requirement already satisfied: jupyterlab-widgets>=1.0.0 in /home/krosh/Documents/Github/ML/.venv/lib/python3.12/site-packages (from ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (3.0.16)\n",
"Collecting contourpy>=1.0.1 (from matplotlib==3.10.0->-r ./requirements_2025_26_for_colab_small.txt (line 9))\n",
" Downloading contourpy-1.3.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (5.5 kB)\n",
"Collecting cycler>=0.10 (from matplotlib==3.10.0->-r ./requirements_2025_26_for_colab_small.txt (line 9))\n",
" Downloading cycler-0.12.1-py3-none-any.whl.metadata (3.8 kB)\n",
"Collecting fonttools>=4.22.0 (from matplotlib==3.10.0->-r ./requirements_2025_26_for_colab_small.txt (line 9))\n",
" Downloading fonttools-4.60.1-cp312-cp312-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl.metadata (112 kB)\n",
"Collecting kiwisolver>=1.3.1 (from matplotlib==3.10.0->-r ./requirements_2025_26_for_colab_small.txt (line 9))\n",
" Downloading kiwisolver-1.4.9-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (6.3 kB)\n",
"Requirement already satisfied: packaging>=20.0 in /nix/store/h1qsc2cb41r5iaix9n7s3gn4r5s2pdfw-python3.12-packaging-24.2/lib/python3.12/site-packages (from matplotlib==3.10.0->-r ./requirements_2025_26_for_colab_small.txt (line 9)) (24.2)\n",
"Collecting pyparsing>=2.3.1 (from matplotlib==3.10.0->-r ./requirements_2025_26_for_colab_small.txt (line 9))\n",
" Downloading pyparsing-3.2.5-py3-none-any.whl.metadata (5.0 kB)\n",
"Requirement already satisfied: python-dateutil>=2.7 in /nix/store/dn6x1maxc5cxyq84fc51z8pzjk2f4wq6-python3.12-python-dateutil-2.9.0.post0/lib/python3.12/site-packages (from matplotlib==3.10.0->-r ./requirements_2025_26_for_colab_small.txt (line 9)) (2.9.0.post0)\n",
"Collecting pytz>=2020.1 (from pandas==2.2.2->-r ./requirements_2025_26_for_colab_small.txt (line 11))\n",
" Downloading pytz-2025.2-py2.py3-none-any.whl.metadata (22 kB)\n",
"Collecting tzdata>=2022.7 (from pandas==2.2.2->-r ./requirements_2025_26_for_colab_small.txt (line 11))\n",
" Using cached tzdata-2025.2-py2.py3-none-any.whl.metadata (1.4 kB)\n",
"Collecting tenacity>=6.2.0 (from plotly==5.24.1->-r ./requirements_2025_26_for_colab_small.txt (line 13))\n",
" Downloading tenacity-9.1.2-py3-none-any.whl.metadata (1.2 kB)\n",
"Collecting iniconfig>=1 (from pytest==8.4.1->-r ./requirements_2025_26_for_colab_small.txt (line 15))\n",
" Downloading iniconfig-2.3.0-py3-none-any.whl.metadata (2.5 kB)\n",
"Collecting pluggy<2,>=1.5 (from pytest==8.4.1->-r ./requirements_2025_26_for_colab_small.txt (line 15))\n",
" Downloading pluggy-1.6.0-py3-none-any.whl.metadata (4.8 kB)\n",
"Requirement already satisfied: pygments>=2.7.2 in /nix/store/hdikjhn6cic0ibvb3j8cghy7lg3kv6yy-python3.12-pygments-2.19.1/lib/python3.12/site-packages (from pytest==8.4.1->-r ./requirements_2025_26_for_colab_small.txt (line 15)) (2.19.1)\n",
"Collecting imageio!=2.35.0,>=2.33 (from scikit-image==0.25.2->-r ./requirements_2025_26_for_colab_small.txt (line 16))\n",
" Downloading imageio-2.37.2-py3-none-any.whl.metadata (9.7 kB)\n",
"Collecting tifffile>=2022.8.12 (from scikit-image==0.25.2->-r ./requirements_2025_26_for_colab_small.txt (line 16))\n",
" Downloading tifffile-2025.10.16-py3-none-any.whl.metadata (31 kB)\n",
"Collecting lazy-loader>=0.4 (from scikit-image==0.25.2->-r ./requirements_2025_26_for_colab_small.txt (line 16))\n",
" Downloading lazy_loader-0.4-py3-none-any.whl.metadata (7.6 kB)\n",
"Collecting joblib>=1.2.0 (from scikit-learn==1.6.1->-r ./requirements_2025_26_for_colab_small.txt (line 17))\n",
" Downloading joblib-1.5.2-py3-none-any.whl.metadata (5.6 kB)\n",
"Collecting threadpoolctl>=3.1.0 (from scikit-learn==1.6.1->-r ./requirements_2025_26_for_colab_small.txt (line 17))\n",
" Downloading threadpoolctl-3.6.0-py3-none-any.whl.metadata (13 kB)\n",
"Collecting numba>=0.51.2 (from umap-learn==0.5.9.post2->-r ./requirements_2025_26_for_colab_small.txt (line 21))\n",
" Downloading numba-0.62.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (2.8 kB)\n",
"Collecting pynndescent>=0.5 (from umap-learn==0.5.9.post2->-r ./requirements_2025_26_for_colab_small.txt (line 21))\n",
" Downloading pynndescent-0.5.13-py3-none-any.whl.metadata (6.8 kB)\n",
"Collecting nvidia-nccl-cu12 (from xgboost==3.0.4->-r ./requirements_2025_26_for_colab_small.txt (line 22))\n",
" Downloading nvidia_nccl_cu12-2.28.7-py3-none-manylinux_2_18_x86_64.whl.metadata (2.0 kB)\n",
"Requirement already satisfied: comm>=0.1.1 in /nix/store/vav4k2c299vg67mk0x1pgzs50mv09p6q-python3.12-comm-0.2.2/lib/python3.12/site-packages (from ipykernel>=4.5.1->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (0.2.2)\n",
"Requirement already satisfied: jupyter-client>=6.1.12 in /nix/store/ii8mmw13zhpg4zdwx6c5sp3qi5g9g0iv-python3.12-jupyter-client-8.6.3/lib/python3.12/site-packages (from ipykernel>=4.5.1->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (8.6.3)\n",
"Requirement already satisfied: jupyter-core!=5.0.*,>=4.12 in /nix/store/ppsp7zdbnivzw04r8rrwr30rwkahxy6k-python3.12-jupyter-core-5.7.2/lib/python3.12/site-packages (from ipykernel>=4.5.1->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (5.7.2)\n",
"Requirement already satisfied: nest-asyncio in /nix/store/ah04qkf51fnsq76dkk86gzhm059lbaqr-python3.12-nest-asyncio-1.6.0/lib/python3.12/site-packages (from ipykernel>=4.5.1->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (1.6.0)\n",
"Requirement already satisfied: psutil in /nix/store/3hsnbwhiflh31c7b808nbai5bwm55ddj-python3.12-psutil-7.0.0/lib/python3.12/site-packages (from ipykernel>=4.5.1->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (7.0.0)\n",
"Requirement already satisfied: pyzmq>=24 in /nix/store/h9nq7xr7pfwdksqlx1givw25fiv1fflh-python3.12-pyzmq-26.3.0/lib/python3.12/site-packages (from ipykernel>=4.5.1->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (26.3.0)\n",
"Requirement already satisfied: tornado>=6.1 in /nix/store/ay14g4n81v3p75rdibn9ddp7m4idazgv-python3.12-tornado-6.5.1/lib/python3.12/site-packages (from ipykernel>=4.5.1->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (6.5.1)\n",
"Requirement already satisfied: decorator in /nix/store/gkh0fg3v2zs85v3h3cw1nh2d6ncdzki6-python3.12-decorator-5.2.1/lib/python3.12/site-packages (from ipython<10->ipympl==0.9.7->-r ./requirements_2025_26_for_colab_small.txt (line 5)) (5.2.1)\n",
"Requirement already satisfied: ipython-pygments-lexers in /nix/store/qqvbgszbfdlxpzfd41ggzxmh0p5wq0rj-python3.12-ipython-pygments-lexers-1.1.1/lib/python3.12/site-packages (from ipython<10->ipympl==0.9.7->-r ./requirements_2025_26_for_colab_small.txt (line 5)) (1.1.1)\n",
"Requirement already satisfied: jedi>=0.16 in /nix/store/0g96bmz4qlk00rd58lsivm7xir6ljg0m-python3.12-jedi-0.19.2/lib/python3.12/site-packages (from ipython<10->ipympl==0.9.7->-r ./requirements_2025_26_for_colab_small.txt (line 5)) (0.19.2)\n",
"Requirement already satisfied: pexpect>4.3 in /nix/store/hw5i2kd9750fndnb9gdl3x5prxx7mj5d-python3.12-pexpect-4.9.0/lib/python3.12/site-packages (from ipython<10->ipympl==0.9.7->-r ./requirements_2025_26_for_colab_small.txt (line 5)) (4.9.0)\n",
"Requirement already satisfied: prompt_toolkit<3.1.0,>=3.0.41 in /nix/store/wzmw3slxlzycs29w5hjjc6a1529d0s6d-python3.12-prompt-toolkit-3.0.50/lib/python3.12/site-packages (from ipython<10->ipympl==0.9.7->-r ./requirements_2025_26_for_colab_small.txt (line 5)) (3.0.50)\n",
"Requirement already satisfied: stack_data in /nix/store/61k17cinvnvwvyr0hxmf2c28407k9q2l-python3.12-stack-data-0.6.3/lib/python3.12/site-packages (from ipython<10->ipympl==0.9.7->-r ./requirements_2025_26_for_colab_small.txt (line 5)) (0.6.3)\n",
"Collecting llvmlite<0.46,>=0.45.0dev0 (from numba>=0.51.2->umap-learn==0.5.9.post2->-r ./requirements_2025_26_for_colab_small.txt (line 21))\n",
" Downloading llvmlite-0.45.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (4.9 kB)\n",
"Requirement already satisfied: notebook>=4.4.1 in /home/krosh/Documents/Github/ML/.venv/lib/python3.12/site-packages (from widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (7.4.7)\n",
"Requirement already satisfied: soupsieve>1.2 in /nix/store/j9ndbf8laq3gki56i3f748k0l66s7qzd-python3.12-soupsieve-2.6/lib/python3.12/site-packages (from beautifulsoup4->gdown==5.2.0->-r ./requirements_2025_26_for_colab_small.txt (line 2)) (2.6)\n",
"Requirement already satisfied: charset_normalizer<4,>=2 in /nix/store/znsiffn7xpr0bfmmbvh7j9dn0z815pf6-python3.12-charset-normalizer-3.4.1/lib/python3.12/site-packages (from requests[socks]->gdown==5.2.0->-r ./requirements_2025_26_for_colab_small.txt (line 2)) (3.4.1)\n",
"Requirement already satisfied: idna<4,>=2.5 in /nix/store/80zr7m04sb6a5kfaq55nd1rf2425gi7r-python3.12-idna-3.10/lib/python3.12/site-packages (from requests[socks]->gdown==5.2.0->-r ./requirements_2025_26_for_colab_small.txt (line 2)) (3.10)\n",
"Requirement already satisfied: urllib3<3,>=1.21.1 in /nix/store/d3n2v8v8m2874vn7gw7zrdggj86dincs-python3.12-urllib3-2.3.0/lib/python3.12/site-packages (from requests[socks]->gdown==5.2.0->-r ./requirements_2025_26_for_colab_small.txt (line 2)) (2.3.0)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /nix/store/bk8dgkmkprc9wc6wcwc75bdyjk1ndbjk-python3.12-certifi-2025.01.31/lib/python3.12/site-packages (from requests[socks]->gdown==5.2.0->-r ./requirements_2025_26_for_colab_small.txt (line 2)) (2025.1.31)\n",
"Collecting PySocks!=1.5.7,>=1.5.6 (from requests[socks]->gdown==5.2.0->-r ./requirements_2025_26_for_colab_small.txt (line 2))\n",
" Downloading PySocks-1.7.1-py3-none-any.whl.metadata (13 kB)\n",
"Requirement already satisfied: parso<0.9.0,>=0.8.4 in /nix/store/sw3hp8g6i6n5hcj0zk3dvdm8v7k67c6h-python3.12-parso-0.8.4/lib/python3.12/site-packages (from jedi>=0.16->ipython<10->ipympl==0.9.7->-r ./requirements_2025_26_for_colab_small.txt (line 5)) (0.8.4)\n",
"Requirement already satisfied: platformdirs>=2.5 in /nix/store/ay5c0v86xdaq1w2x8l8z88kkiwv7i2cl-python3.12-platformdirs-4.3.7/lib/python3.12/site-packages (from jupyter-core!=5.0.*,>=4.12->ipykernel>=4.5.1->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (4.3.7)\n",
"Requirement already satisfied: jupyter-server<3,>=2.4.0 in /nix/store/zj57c9yx8bkqg83xjxz6bjwnxg65dk5c-python3.12-jupyter-server-2.15.0/lib/python3.12/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (2.15.0)\n",
"Requirement already satisfied: jupyterlab-server<3,>=2.27.1 in /nix/store/pd8cbi214wii25llx5g2ismw6pmvgkf5-python3.12-jupyterlab-server-2.27.3/lib/python3.12/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (2.27.3)\n",
"Collecting jupyterlab<4.5,>=4.4.9 (from notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6))\n",
" Using cached jupyterlab-4.4.10-py3-none-any.whl.metadata (16 kB)\n",
"Requirement already satisfied: notebook-shim<0.3,>=0.2 in /nix/store/agvxbdh9lb9i7gm5v1qjx7a0bv22am8n-python3.12-notebook-shim-0.2.4/lib/python3.12/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (0.2.4)\n",
"Requirement already satisfied: ptyprocess>=0.5 in /nix/store/rz2ygcrnc8wx1n3pz0slcah47s71havg-python3.12-ptyprocess-0.7.0/lib/python3.12/site-packages (from pexpect>4.3->ipython<10->ipympl==0.9.7->-r ./requirements_2025_26_for_colab_small.txt (line 5)) (0.7.0)\n",
"Requirement already satisfied: wcwidth in /nix/store/82wc5sicriaacpnavd97c9b2b3l88d1j-python3.12-wcwidth-0.2.13/lib/python3.12/site-packages (from prompt_toolkit<3.1.0,>=3.0.41->ipython<10->ipympl==0.9.7->-r ./requirements_2025_26_for_colab_small.txt (line 5)) (0.2.13)\n",
"Requirement already satisfied: executing>=1.2.0 in /nix/store/vryr7qfzh6qp2v8whvc5357hz3f3xxpc-python3.12-executing-2.2.0/lib/python3.12/site-packages (from stack_data->ipython<10->ipympl==0.9.7->-r ./requirements_2025_26_for_colab_small.txt (line 5)) (2.2.0)\n",
"Requirement already satisfied: asttokens>=2.1.0 in /nix/store/lh5is09vgpvw5rnvm9bgcxiasm7pidw1-python3.12-asttokens-3.0.0/lib/python3.12/site-packages (from stack_data->ipython<10->ipympl==0.9.7->-r ./requirements_2025_26_for_colab_small.txt (line 5)) (3.0.0)\n",
"Requirement already satisfied: pure_eval in /nix/store/lab1jiw46l09zci0r8h1cl2wnb04w1s5-python3.12-pure-eval-0.2.3/lib/python3.12/site-packages (from stack_data->ipython<10->ipympl==0.9.7->-r ./requirements_2025_26_for_colab_small.txt (line 5)) (0.2.3)\n",
"Requirement already satisfied: anyio>=3.1.0 in /nix/store/slsfw31xlwaczcnqgg4r5qw3xpwm0nbq-python3.12-anyio-4.9.0/lib/python3.12/site-packages (from jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (4.9.0)\n",
"Requirement already satisfied: argon2-cffi>=21.1 in /nix/store/1clmzlxvasiidjs72h4vx4pqcrkwg3zf-python3.12-argon2-cffi-23.1.0/lib/python3.12/site-packages (from jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (23.1.0)\n",
"Requirement already satisfied: jinja2>=3.0.3 in /nix/store/svijzcfkrsxb8jripykx1d2krzi2q0fq-python3.12-jinja2-3.1.6/lib/python3.12/site-packages (from jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (3.1.6)\n",
"Requirement already satisfied: jupyter-events>=0.11.0 in /nix/store/4jydas1rslfay93x8h61s7a16023pcql-python3.12-jupyter-events-0.11.0/lib/python3.12/site-packages (from jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (0.11.0)\n",
"Requirement already satisfied: jupyter-server-terminals>=0.4.4 in /nix/store/ly5g70s9xpnm9piajwcmrlrd8maixfh4-python3.12-jupyter-server-terminals-0.5.3/lib/python3.12/site-packages (from jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (0.5.3)\n",
"Requirement already satisfied: nbconvert>=6.4.4 in /nix/store/5h2jqcxjgkyrp8yy28s1cxbmlps9llbr-python3.12-nbconvert-7.16.6/lib/python3.12/site-packages (from jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (7.16.6)\n",
"Requirement already satisfied: nbformat>=5.3.0 in /nix/store/mha5x4r94hi8278p347v2ig89r7pg37i-python3.12-nbformat-5.10.4/lib/python3.12/site-packages (from jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (5.10.4)\n",
"Requirement already satisfied: overrides>=5.0 in /nix/store/8hnr7s08x0zglraaqhsvxw9cxfb4m5vf-python3.12-overrides-7.7.0/lib/python3.12/site-packages (from jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (7.7.0)\n",
"Requirement already satisfied: prometheus-client>=0.9 in /nix/store/hi0lchzh5wd2mima5ryzxv1sp8avpixv-python3.12-prometheus-client-0.21.1/lib/python3.12/site-packages (from jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (0.21.1)\n",
"Requirement already satisfied: send2trash>=1.8.2 in /nix/store/qaybrn941lhzv68mmly22vml2bi9biln-python3.12-send2trash-1.8.3/lib/python3.12/site-packages (from jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (1.8.3)\n",
"Requirement already satisfied: terminado>=0.8.3 in /nix/store/r0c0p4ycha98vxggn3ib9bmrsma9a5gq-python3.12-terminado-0.18.1/lib/python3.12/site-packages (from jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (0.18.1)\n",
"Requirement already satisfied: websocket-client>=1.7 in /nix/store/maij4ca0hdq51yh6sc8ha0dbfksfvbs2-python3.12-websocket-client-1.8.0/lib/python3.12/site-packages (from jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (1.8.0)\n",
"Requirement already satisfied: async-lru>=1.0.0 in /nix/store/appfbz4pp2rq674miy7y35llz30382ab-python3.12-async-lru-2.0.5/lib/python3.12/site-packages (from jupyterlab<4.5,>=4.4.9->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (2.0.5)\n",
"Requirement already satisfied: httpx<1,>=0.25.0 in /nix/store/83krrvn5s26brnzqfqb9w7cvsa94b9w6-python3.12-httpx-0.28.1/lib/python3.12/site-packages (from jupyterlab<4.5,>=4.4.9->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (0.28.1)\n",
"Requirement already satisfied: jupyter-lsp>=2.0.0 in /nix/store/w0fm4viprsj0s6vdymp1grlgq9gg24pp-python3.12-jupyter-lsp-2.2.5/lib/python3.12/site-packages (from jupyterlab<4.5,>=4.4.9->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (2.2.5)\n",
"Requirement already satisfied: setuptools>=41.1.0 in /nix/store/jahiclal74yv1j7py0jnlm30ji3wa1wr-python3.12-setuptools-78.1.1/lib/python3.12/site-packages (from jupyterlab<4.5,>=4.4.9->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (78.1.1.post0)\n",
"Requirement already satisfied: babel>=2.10 in /nix/store/0k8xz970r9zwm7c0bbmnps9ppya32jyx-python3.12-babel-2.17.0/lib/python3.12/site-packages (from jupyterlab-server<3,>=2.27.1->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (2.17.0)\n",
"Requirement already satisfied: json5>=0.9.0 in /nix/store/m67k0bjvzldj8fg862y9jaqdn14fav0r-python3.12-json5-0.10.0/lib/python3.12/site-packages (from jupyterlab-server<3,>=2.27.1->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (0.10.0)\n",
"Requirement already satisfied: jsonschema>=4.18.0 in /nix/store/cbv4a3ncj97dj8a7sz4ldw5hpajhnrgd-python3.12-jsonschema-4.23.0/lib/python3.12/site-packages (from jupyterlab-server<3,>=2.27.1->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (4.23.0)\n",
"Requirement already satisfied: sniffio>=1.1 in /nix/store/6jdf3szr6xcvzdg3cdzrgvhy6dc6ppdp-python3.12-sniffio-1.3.1/lib/python3.12/site-packages (from anyio>=3.1.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (1.3.1)\n",
"Requirement already satisfied: typing_extensions>=4.5 in /nix/store/lpap2xy7m2z6qs3pjgx57whdvn0gmrld-python3.12-typing-extensions-4.13.2/lib/python3.12/site-packages (from anyio>=3.1.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (4.13.2)\n",
"Requirement already satisfied: argon2-cffi-bindings in /nix/store/xs11y0i84x084h3f9va5xn3vw71g9sn5-python3.12-argon2-cffi-bindings-21.2.0/lib/python3.12/site-packages (from argon2-cffi>=21.1->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (21.2.0)\n",
"Requirement already satisfied: httpcore==1.* in /nix/store/45mbjl9s9pv0libawf8ikmh588k831zz-python3.12-httpcore-1.0.9/lib/python3.12/site-packages (from httpx<1,>=0.25.0->jupyterlab<4.5,>=4.4.9->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (1.0.9)\n",
"Requirement already satisfied: h11>=0.16 in /nix/store/ndg6nlcirvbl8w5sdz49r0x28x4hnfr7-python3.12-h11-0.16.0/lib/python3.12/site-packages (from httpcore==1.*->httpx<1,>=0.25.0->jupyterlab<4.5,>=4.4.9->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (0.16.0)\n",
"Requirement already satisfied: MarkupSafe>=2.0 in /nix/store/s1s7cngw3wc3wm6ysqyjkwq8nq4cz4vl-python3.12-markupsafe-3.0.2/lib/python3.12/site-packages (from jinja2>=3.0.3->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (3.0.2)\n",
"Requirement already satisfied: attrs>=22.2.0 in /nix/store/aj8dzb2ampzwwmjy7i47ypbp9vdcb4zy-python3.12-attrs-25.3.0/lib/python3.12/site-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.27.1->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (25.3.0)\n",
"Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /nix/store/vd97fs6kjvygdndlsnh2c9166z4d0xh3-python3.12-jsonschema-specifications-2024.10.1/lib/python3.12/site-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.27.1->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (2024.10.1)\n",
"Requirement already satisfied: referencing>=0.28.4 in /nix/store/n7knhq0j8jmls8dckxyim8qhslw399ng-python3.12-referencing-0.36.2/lib/python3.12/site-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.27.1->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (0.36.2)\n",
"Requirement already satisfied: rpds-py>=0.7.1 in /nix/store/8a2h77svk68xqlhbp0bi2xk8rwj9j50j-python3.12-rpds-py-0.24.0/lib/python3.12/site-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.27.1->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (0.24.0)\n",
"Requirement already satisfied: python-json-logger>=2.0.4 in /nix/store/p56rsir3w5f044svipd9mpa6qqxgsa78-python3.12-python-json-logger-3.2.1/lib/python3.12/site-packages (from jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (3.2.1)\n",
"Requirement already satisfied: pyyaml>=5.3 in /nix/store/9ap0fph2ybcfnl0f1rsklj990n25ll84-python3.12-pyyaml-6.0.2/lib/python3.12/site-packages (from jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (6.0.2)\n",
"Requirement already satisfied: rfc3339-validator in /nix/store/14rqw00zqxk6jcslmab0skzzf3qcp5xw-python3.12-rfc3339-validator-0.1.4/lib/python3.12/site-packages (from jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (0.1.4)\n",
"Requirement already satisfied: rfc3986-validator>=0.1.1 in /nix/store/zqnambrrca5dzmfiizygsslmgakhiigc-python3.12-rfc3986-validator-0.1.1/lib/python3.12/site-packages (from jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (0.1.1)\n",
"Requirement already satisfied: bleach!=5.0.0 in /nix/store/0svbzbngdvar6sdz7p4iscpjhcp5i7aq-python3.12-bleach-6.2.0/lib/python3.12/site-packages (from bleach[css]!=5.0.0->nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (6.2.0)\n",
"Requirement already satisfied: defusedxml in /nix/store/4l429an1q3m5m7gbmr004zi4mzhbksn1-python3.12-defusedxml-0.8.0rc2/lib/python3.12/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (0.8.0rc2)\n",
"Requirement already satisfied: jupyterlab-pygments in /nix/store/fm0shwwm682kdk11hx331ya0axmx6357-python3.12-jupyterlab-pygments-0.3.0/lib/python3.12/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (0.3.0)\n",
"Requirement already satisfied: mistune<4,>=2.0.3 in /nix/store/9mln2k5sj8y5jr1mggmd55zbj6m5i4vb-python3.12-mistune-3.1.2/lib/python3.12/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (3.1.2)\n",
"Requirement already satisfied: nbclient>=0.5.0 in /nix/store/yhm4rkd5j81xfwmcr8s749m67z9099pa-python3.12-nbclient-0.10.2/lib/python3.12/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (0.10.2)\n",
"Requirement already satisfied: pandocfilters>=1.4.1 in /nix/store/n76h7wginvrsqaq8ngnmf259fagz6dyp-python3.12-pandocfilters-1.5.1/lib/python3.12/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (1.5.1)\n",
"Requirement already satisfied: fastjsonschema>=2.15 in /nix/store/yh2gsm8j4cnx422kxm69bx0k7c54n6b4-python3.12-fastjsonschema-2.21.1/lib/python3.12/site-packages (from nbformat>=5.3.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (2.21.1)\n",
"Requirement already satisfied: webencodings in /nix/store/n8jzk1lyamvlj6rw9pyx88ai0rhcmfgm-python3.12-webencodings-0.5.1/lib/python3.12/site-packages (from bleach!=5.0.0->bleach[css]!=5.0.0->nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (0.5.1)\n",
"Requirement already satisfied: tinycss2<1.5,>=1.1.0 in /nix/store/lrxfr5x30dinqpw0vg2zvdvh6jfy4kxn-python3.12-tinycss2-1.4.0/lib/python3.12/site-packages (from bleach[css]!=5.0.0->nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (1.4.0)\n",
"Requirement already satisfied: fqdn in /nix/store/c676msxyjp0k5r70s33p040rk6fxii8d-python3.12-fqdn-1.5.1/lib/python3.12/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (1.5.1)\n",
"Requirement already satisfied: isoduration in /nix/store/4mnklym4fix9xi1i4ppknqk5fcpljfga-python3.12-isoduration-20.11.0/lib/python3.12/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (20.11.0)\n",
"Requirement already satisfied: jsonpointer>1.13 in /nix/store/9lhd1pal6j928py2p7x6g5xs2fyqjfzf-python3.12-jsonpointer-3.0.0/lib/python3.12/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (3.0.0)\n",
"Requirement already satisfied: uri-template in /nix/store/g3g6pdfkd8xlnram70kml18wxdl1zyl2-python3.12-uri-template-1.3.0/lib/python3.12/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (1.3.0)\n",
"Requirement already satisfied: webcolors>=24.6.0 in /nix/store/vffapvc0y8z4y3x1kq1yahyrk203z60v-python3.12-webcolors-24.11.1/lib/python3.12/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (24.11.1)\n",
"Requirement already satisfied: cffi>=1.0.1 in /nix/store/xmrm1mvjf8kp4nl1im58apax0n0pgb81-python3.12-cffi-1.17.1/lib/python3.12/site-packages (from argon2-cffi-bindings->argon2-cffi>=21.1->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (1.17.1)\n",
"Requirement already satisfied: pycparser in /nix/store/zvrx9j7dsh4h5ryn9nn2vs9v7i7lslc0-python3.12-pycparser-2.22/lib/python3.12/site-packages (from cffi>=1.0.1->argon2-cffi-bindings->argon2-cffi>=21.1->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (2.22)\n",
"Requirement already satisfied: arrow>=0.15.0 in /nix/store/xkn28vnhxy42lz0039qqpxhf1dplifb6-python3.12-arrow-1.3.0/lib/python3.12/site-packages (from isoduration->jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (1.3.0)\n",
"Requirement already satisfied: types-python-dateutil>=2.8.10 in /nix/store/4rbnpq6m8shi5h2s2l3kjn86f157gh2d-python3.12-types-python-dateutil-2.9.0.20241206/lib/python3.12/site-packages (from arrow>=0.15.0->isoduration->jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets==7.7.1->-r ./requirements_2025_26_for_colab_small.txt (line 6)) (2.9.0.20241206)\n",
"Downloading catboost-1.2.8-cp312-cp312-manylinux2014_x86_64.whl (99.2 MB)\n",
"\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m99.2/99.2 MB\u001b[0m \u001b[31m486.6 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0mm eta \u001b[36m0:00:01\u001b[0m[36m0:00:06\u001b[0m\n",
"\u001b[?25hDownloading gdown-5.2.0-py3-none-any.whl (18 kB)\n",
"Downloading h5py-3.14.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.9 MB)\n",
"\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m4.9/4.9 MB\u001b[0m \u001b[31m314.9 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m kB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m:04\u001b[0m\n",
"\u001b[?25hDownloading hyperopt-0.2.7-py2.py3-none-any.whl (1.6 MB)\n",
"\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.6/1.6 MB\u001b[0m \u001b[31m544.6 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m kB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m:02\u001b[0m\n",
"\u001b[?25hDownloading ipympl-0.9.7-py3-none-any.whl (515 kB)\n",
"Downloading ipywidgets-7.7.1-py2.py3-none-any.whl (123 kB)\n",
"Downloading lightgbm-4.6.0-py3-none-manylinux_2_28_x86_64.whl (3.6 MB)\n",
"\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.6/3.6 MB\u001b[0m \u001b[31m636.2 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m kB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m:04\u001b[0m\n",
"\u001b[?25hDownloading matplotlib-3.10.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.6 MB)\n",
"\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m8.6/8.6 MB\u001b[0m \u001b[31m202.3 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m[36m0:00:02\u001b[0mm eta \u001b[36m0:00:03\u001b[0m\n",
"\u001b[?25hDownloading numpy-2.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (19.2 MB)\n",
"\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m19.2/19.2 MB\u001b[0m \u001b[31m465.2 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0mm eta \u001b[36m0:00:01\u001b[0m[36m0:00:02\u001b[0m\n",
"\u001b[?25hDownloading pandas-2.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.7 MB)\n",
"\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m12.7/12.7 MB\u001b[0m \u001b[31m314.6 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0mm eta \u001b[36m0:00:01\u001b[0m[36m0:00:02\u001b[0m\n",
"\u001b[?25hDownloading pep8-1.7.1-py2.py3-none-any.whl (41 kB)\n",
"Downloading plotly-5.24.1-py3-none-any.whl (19.1 MB)\n",
"\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m19.1/19.1 MB\u001b[0m \u001b[31m226.8 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0mm eta \u001b[36m0:00:01\u001b[0m[36m0:00:04\u001b[0m\n",
"\u001b[?25hDownloading pycodestyle-2.14.0-py2.py3-none-any.whl (31 kB)\n",
"Downloading pytest-8.4.1-py3-none-any.whl (365 kB)\n",
"Downloading scikit_image-0.25.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.0 MB)\n",
"\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m15.0/15.0 MB\u001b[0m \u001b[31m450.7 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0mm eta \u001b[36m0:00:01\u001b[0m0:02\u001b[0m:03\u001b[0m\n",
"\u001b[?25hDownloading scikit_learn-1.6.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.1 MB)\n",
"\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m13.1/13.1 MB\u001b[0m \u001b[31m569.2 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0mm eta \u001b[36m0:00:01\u001b[0m0:01\u001b[0m:02\u001b[0m\n",
"\u001b[?25hDownloading scipy-1.16.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (35.2 MB)\n",
"\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m35.2/35.2 MB\u001b[0m \u001b[31m943.1 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0mm eta \u001b[36m0:00:01\u001b[0m[36m0:00:02\u001b[0m\n",
"\u001b[?25hDownloading seaborn-0.13.2-py3-none-any.whl (294 kB)\n",
"Downloading tqdm-4.67.1-py3-none-any.whl (78 kB)\n",
"Downloading umap_learn-0.5.9.post2-py3-none-any.whl (90 kB)\n",
"Downloading xgboost-3.0.4-py3-none-manylinux_2_28_x86_64.whl (94.9 MB)\n",
"\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m94.9/94.9 MB\u001b[0m \u001b[31m650.9 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0mm eta \u001b[36m0:00:01\u001b[0m[36m0:00:05\u001b[0m\n",
"\u001b[?25hDownloading contourpy-1.3.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (362 kB)\n",
"Downloading cycler-0.12.1-py3-none-any.whl (8.3 kB)\n",
"Downloading fonttools-4.60.1-cp312-cp312-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl (4.9 MB)\n",
"\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m4.9/4.9 MB\u001b[0m \u001b[31m685.6 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m kB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m:02\u001b[0m\n",
"\u001b[?25hDownloading imageio-2.37.2-py3-none-any.whl (317 kB)\n",
"Downloading iniconfig-2.3.0-py3-none-any.whl (7.5 kB)\n",
"Downloading ipython_genutils-0.2.0-py2.py3-none-any.whl (26 kB)\n",
"Downloading joblib-1.5.2-py3-none-any.whl (308 kB)\n",
"Downloading kiwisolver-1.4.9-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (1.5 MB)\n",
"\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.5/1.5 MB\u001b[0m \u001b[31m1.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m[31m1.3 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\n",
"\u001b[?25hDownloading lazy_loader-0.4-py3-none-any.whl (12 kB)\n",
"Downloading networkx-3.5-py3-none-any.whl (2.0 MB)\n",
"\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.0/2.0 MB\u001b[0m \u001b[31m985.8 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0mB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m:01\u001b[0m\n",
"\u001b[?25hDownloading numba-0.62.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.8 MB)\n",
"\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.8/3.8 MB\u001b[0m \u001b[31m1.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m[31m1.4 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\n",
"\u001b[?25hDownloading pillow-12.0.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (7.0 MB)\n",
"\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.0/7.0 MB\u001b[0m \u001b[31m1.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m[31m1.2 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\n",
"\u001b[?25hDownloading pluggy-1.6.0-py3-none-any.whl (20 kB)\n",
"Downloading pynndescent-0.5.13-py3-none-any.whl (56 kB)\n",
"Downloading pyparsing-3.2.5-py3-none-any.whl (113 kB)\n",
"Downloading pytz-2025.2-py2.py3-none-any.whl (509 kB)\n",
"Downloading tenacity-9.1.2-py3-none-any.whl (28 kB)\n",
"Downloading threadpoolctl-3.6.0-py3-none-any.whl (18 kB)\n",
"Downloading tifffile-2025.10.16-py3-none-any.whl (231 kB)\n",
"Using cached tzdata-2025.2-py2.py3-none-any.whl (347 kB)\n",
"Downloading widgetsnbextension-3.6.10-py2.py3-none-any.whl (1.6 MB)\n",
"\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.6/1.6 MB\u001b[0m \u001b[31m1.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m[31m980.3 kB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\n",
"\u001b[?25hDownloading cloudpickle-3.1.2-py3-none-any.whl (22 kB)\n",
"Downloading future-1.0.0-py3-none-any.whl (491 kB)\n",
"Downloading graphviz-0.21-py3-none-any.whl (47 kB)\n",
"Downloading nvidia_nccl_cu12-2.28.7-py3-none-manylinux_2_18_x86_64.whl (296.8 MB)\n",
"\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m296.8/296.8 MB\u001b[0m \u001b[31m561.9 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0mm eta \u001b[36m0:00:01\u001b[0m[36m0:00:20\u001b[0m\n",
"\u001b[?25hDownloading py4j-0.10.9.9-py2.py3-none-any.whl (203 kB)\n",
"Downloading llvmlite-0.45.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (56.3 MB)\n",
"\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m56.3/56.3 MB\u001b[0m \u001b[31m551.0 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0mm eta \u001b[36m0:00:01\u001b[0m[36m0:00:03\u001b[0m\n",
"\u001b[?25hDownloading PySocks-1.7.1-py3-none-any.whl (16 kB)\n",
"Using cached jupyterlab-4.4.10-py3-none-any.whl (12.3 MB)\n",
"Installing collected packages: pytz, py4j, pep8, ipython-genutils, tzdata, tqdm, threadpoolctl, tenacity, PySocks, pyparsing, pycodestyle, pluggy, pillow, nvidia-nccl-cu12, numpy, networkx, llvmlite, lazy-loader, kiwisolver, joblib, iniconfig, graphviz, future, fonttools, cycler, cloudpickle, tifffile, scipy, pytest, plotly, pandas, numba, imageio, h5py, contourpy, xgboost, scikit-learn, scikit-image, matplotlib, lightgbm, hyperopt, gdown, seaborn, pynndescent, catboost, umap-learn, jupyterlab, widgetsnbextension, ipywidgets, ipympl\n",
" Attempting uninstall: jupyterlab\n",
" Found existing installation: jupyterlab 4.4.1\n",
" Not uninstalling jupyterlab at /nix/store/jzhscs6dw96a836cvv12s271j59a5lmv-python3.12-jupyterlab-4.4.1/lib/python3.12/site-packages, outside environment /home/krosh/Documents/Github/ML/.venv\n",
" Can't uninstall 'jupyterlab'. No files were found to uninstall.\n",
" Attempting uninstall: widgetsnbextension\n",
" Found existing installation: widgetsnbextension 4.0.15\n",
" Uninstalling widgetsnbextension-4.0.15:\n",
" Successfully uninstalled widgetsnbextension-4.0.15\n",
" Attempting uninstall: ipywidgets\n",
" Found existing installation: ipywidgets 8.1.8\n",
" Uninstalling ipywidgets-8.1.8:\n",
" Successfully uninstalled ipywidgets-8.1.8\n",
"Successfully installed PySocks-1.7.1 catboost-1.2.8 cloudpickle-3.1.2 contourpy-1.3.3 cycler-0.12.1 fonttools-4.60.1 future-1.0.0 gdown-5.2.0 graphviz-0.21 h5py-3.14.0 hyperopt-0.2.7 imageio-2.37.2 iniconfig-2.3.0 ipympl-0.9.7 ipython-genutils-0.2.0 ipywidgets-7.7.1 joblib-1.5.2 jupyterlab-4.4.10 kiwisolver-1.4.9 lazy-loader-0.4 lightgbm-4.6.0 llvmlite-0.45.1 matplotlib-3.10.0 networkx-3.5 numba-0.62.1 numpy-2.0.2 nvidia-nccl-cu12-2.28.7 pandas-2.2.2 pep8-1.7.1 pillow-12.0.0 plotly-5.24.1 pluggy-1.6.0 py4j-0.10.9.9 pycodestyle-2.14.0 pynndescent-0.5.13 pyparsing-3.2.5 pytest-8.4.1 pytz-2025.2 scikit-image-0.25.2 scikit-learn-1.6.1 scipy-1.16.1 seaborn-0.13.2 tenacity-9.1.2 threadpoolctl-3.6.0 tifffile-2025.10.16 tqdm-4.67.1 tzdata-2025.2 umap-learn-0.5.9.post2 widgetsnbextension-3.6.10 xgboost-3.0.4\n"
]
}
],
"source": [
"! curl https://raw.githubusercontent.com/MSU-ML-COURSE/ML-COURSE-25-26/refs/heads/master/requirements/requirements.txt -o ./requirements_2025_26_for_colab_small.txt\n",
"! pip install -r ./requirements_2025_26_for_colab_small.txt"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "-0DgvOqZix4h"
},
"source": [
"Проверим версию библиотеки:"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"id": "QwWXXElyiRYq"
},
"outputs": [],
"source": [
"import catboost\n",
"assert(catboost.__version__ == '1.2.8')"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "53PQKGPVizrv"
},
"source": [
"Теперь можно приступать к выполнению задания! :)"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "7Z8vzxJLyEDk"
},
"source": [
"-----------\n",
""
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "6MBU1hOZ7aXH"
},
"source": [
"# Часть 0. Знакомство с библиотекой scikit-learn"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "_ZjnB4VJJuR6"
},
"source": [
"`Scikit-learn` - это библиотека машинного обучения с открытым исходным кодом, которая предоставляет различные инструменты для предобработки данных и обучения моделей.\n",
"\n",
"Подробную документацию с обширным количеством теоретических и практических примеров можно найти на [сайте библиотеки](https://scikit-learn.org/stable/index.html)"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "m-BabH7eK9GP"
},
"source": [
"## Импорт библиотеки"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "Um1PZOAzLCyv"
},
"source": [
"Можно импортировать библиотеку целиком:"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"id": "U3dp8WbZLCG7"
},
"outputs": [],
"source": [
"import sklearn"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "sf0_wD24LBNE"
},
"source": [
"Однако, так как библиотека очень обширная и [содержит большое количество модулей](https://scikit-learn.org/stable/api/index.html), то импортируют либо модуль, либо классы/методы точечно и целенаправленно:"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"id": "DVpuJQwMLO2m"
},
"outputs": [],
"source": [
"from sklearn.neighbors import KNeighborsClassifier # класс, с помощью которого мы в дальнейшем будем обучать kNN"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "ALAVj82zLhrn"
},
"source": [
"**Подсказка** обычно по названию модуля интуитивно понятно, какие методы и функции в нем содержатся. С увеличением практики использования библиотеки вы сможете лучше и быстрее навигироваться в ней. Например, модуль neighbors содержит различные методы поиска ближайших соседей. Помните, что есть как версии для классификации, так и для задач регрессии? Вот версию для классификации мы выше как раз и импортировали. Однако если провалиться в [описание модуля](https://scikit-learn.org/stable/api/sklearn.neighbors.html) можно увидеть еще много разных классов и функций, которые так или иначе связаны с поиском соседей."
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "OsJ49yZjMXux"
},
"source": [
"## Общее устройство моделей\n",
"\n",
"Одним из несравненных плюсов библиотеки является то, что она предоставляет максимально общий и максимально понятный интерфейс взаимодействия с различными алгоритмами машинного обучения.\n",
"\n",
"Обычно, чтобы решить задачу машинного обучения, нам нужно (как минимум):\n",
"* Знать, какой моделью (алгоритмом) хотим воспользоваться\n",
"* Обучить ее на некоторое обучающей выборке\n",
"* Уметь узнавать предсказания модели на новой выборке\n",
"\n",
"Вам не нужно запоминать для каждой конкретной модели, а как она вообще обучается и как это написать: библиотека все делает за вас."
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "Gi32BlL6NFzJ"
},
"source": [
"\n",
"Каждая **модель машинного обучения** имеет два метода: `fit` - метод ответственный за обучения модели и `predict` - метод ответственный за предсказание целевой переменной.\n",
"* Как правило, метод `fit` принимает на вход два аргумента: $X_{train}$ - **обучающая** выборка, $y_{train}$ - значения целевых переменных на объектах обучающей выборки.\n",
"* Метод `predict` принимает на вход набор данных $X_{test}$ и выдает предсказанные значения целевых переменных $y_{test}$ на этом наборе данных.\n",
"* В моделях классификации бывает метод `predict_proba`, который принимает на вход набор данных и выдает вероятности принадлежности классам.\n",
"\n",
"\n",
"\n",
"- Если нами решается задача *классификации*, то вектор целевых переменных $y$ содержит целые числа (или другое множество дискретных величин).\n",
"- При решении задачи *регрессии* вектор $y$ содержит вещественные числа.\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "VSYINz7HN93c"
},
"source": [
"\n",
"**Выборка (данные)** $X$ представляется в виде матрицы размера `(n_samples, n_features)`, то есть каждому *объекту* соответствует отдельная строка, а каждому *признаку* - отдельный столбец.\n",
"\n",
" **Целевая переменная** обычно представляется одномерным вектором размера `(n_samples)` - предсказаниями для каждого объекта, в случае предсказания вероятностей классов - матрицей размера `(n_samples, n_classes)` - значения вероктностей принадлежности объекта к тому или иному классу\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "MzWYc7HPSFSh"
},
"source": [
"Приведем пример стандартной работы с библиотекой `scikit-learn`\n",
"\n",
"**Подсказка** Это совсем-совсем базовый способ обучения моделей, на практике используют много дополнительных приемов, постепенно которые мы будем с вами изучать"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "9LX98EkWRXDH",
"outputId": "3015ab1a-f0de-4e07-db2e-b69fd05c469f"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[0 1]\n"
]
}
],
"source": [
"#Создаем обучающую выборку\n",
"X_train = [[0], [1], [2], [3]] # матрица размера 4 x 1, 4 - объекта, 1 признак\n",
"y_train = [0, 0, 1, 1] # обучающий вектор целевых переменных\n",
"\n",
"#Создаем тестовую выборку\n",
"X_test = [[1.1], [2.8]] # матрица размера 2x1, 2 - объекта, 1 признак\n",
"\n",
"#Создаем объект класса 3-NN классификатора\n",
"neigh = KNeighborsClassifier(n_neighbors=3)\n",
"\n",
"#Обучаем классифкатора на созданной ранее выборке\n",
"neigh.fit(X_train, y_train)\n",
"\n",
"#Предсказываем метку класса нового объекта с помощью метода predict\n",
"y_test = neigh.predict(X_test)\n",
"print(y_test) # y_test - вектор размера 2 (в тестовой выборке 2 объекта)"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "XsYzlFYAQSY_"
},
"source": [
"## Общее устройство предобработки данных\n",
"\n",
"На практике почти никогда вы не встретите идеальных данных :) Вам всегда понадобится на них посмотреть, проанализировать, где-то почистить, где-то преобразовать и пр.\n",
"\n",
"Упрощая, все работу с данными можно проделать с помощью 2 библиотек:\n",
"\n",
"- `pandas` - с помощью этой библиотеки проанализировать данные, посмотреть на то, что в них хранится, принять решение о удалении мусора, замены каких-то значений и прочего. Данные техники вы совсем немного затронули в предыдущем домашнем задании, но подробнее мы к ним вернемся в следующем домашнем задании\n",
"\n",
"- `skelarn` - технические способы обработки данных, особенности которых связаны непосредственно с моделью или способом обучения\n",
"\n",
"**Пример** Данная библиотека поможет решить вопрос: а как нам признаки с типом строка (например, название видео) \"запихнуть\" в kNN? Он же только чиселки умеет понимать?\n",
"\n",
"**Пример**\n",
"Или на следующий вопрос: с лекции немного припоминаю, что для более хорошей работы метрических методов хорошо бы данные привести в один масштаб. Как это можно быстро и безболезненно сделать?\n",
"\n",
" Например, есть 2 признака:\n",
"- вероятность покупки $p$ - лежит на отрезке [0, 1]\n",
"- стоимость покупки $s$ - лежит на отрезке [0, 100000500000]\n",
"\n",
"Хотелось бы чтобы оба признака были на отрезке [0, 1], потому что покупка, кажется, может вносить гораздо больший вклад по расстоянию в обучении модели..\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "41UPaR_b7aXH"
},
"source": [
"\n",
"В `sklearn` способы обработки данных также предоставляются через различные классы, которые имеют одинаковый интерфейс:\n",
"\n",
"Каждый **модуль предобработки** данных имеет два метода: `fit` и `transform`.\n",
"\n",
"* Как правило, метод `fit` принимает на вход **обучающую** выборку $X_train$ и считает по ней необходимые для заданного типа преобразования статистики.\n",
"* Метод `transform` преобразует входные данные, используя статистики, посчитанные при вызове метода `fit` и возвращает преобразованные данные.\n",
"\n",
"\n",
"**Пояснение:** Когда не хватает `pandas` или `skelarn`, можно обратиться к другим библиотекам, например, `numpy` :) Sklearn обычно одинаково хорошо работает с данными, представленным как и pd.DataFrame, так и numpy-array или обычными вложенными питоновскими списками\n",
"\n",
"------\n"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "WHa66l-oSzgb",
"outputId": "7fa5b729-3a40-434f-94e6-6b6046352353"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[[0.000000e+00 0.000000e+00]\n",
" [5.000000e-01 1.000000e+02]\n",
" [1.000000e+00 1.000005e+09]]\n"
]
}
],
"source": [
"import numpy as np\n",
"X_train = np.array([[0, 0], [0.5, 100], [1, 1000005000]]) # numpy используем для удобства отображения\n",
"# выборка из 3 примеров, 1й признак - вероятность покупки p\n",
"# 2й признак - стоимость покупки s\n",
"\n",
"print(X_train)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 74
},
"id": "EHH79PIHTUI4",
"outputId": "a443bccd-5eb7-4dce-c9dc-e73311c861e4"
},
"outputs": [
{
"data": {
"text/html": [
"
MinMaxScaler()In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
MinMaxScaler()
GridSearchCV(cv=3,\n",
" estimator=Pipeline(steps=[('normalizer', 'passthrough'),\n",
" ('classifier', KNeighborsRegressor())]),\n",
" n_jobs=-1,\n",
" param_grid={'classifier__metric': ['euclidean', 'cosine'],\n",
" 'classifier__n_neighbors': [1, 5, 10],\n",
" 'classifier__weights': ['uniform', 'distance'],\n",
" 'normalizer': ['passthrough', MinMaxScaler(),\n",
" StandardScaler()]},\n",
" scoring='r2', verbose=10)In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. GridSearchCV(cv=3,\n",
" estimator=Pipeline(steps=[('normalizer', 'passthrough'),\n",
" ('classifier', KNeighborsRegressor())]),\n",
" n_jobs=-1,\n",
" param_grid={'classifier__metric': ['euclidean', 'cosine'],\n",
" 'classifier__n_neighbors': [1, 5, 10],\n",
" 'classifier__weights': ['uniform', 'distance'],\n",
" 'normalizer': ['passthrough', MinMaxScaler(),\n",
" StandardScaler()]},\n",
" scoring='r2', verbose=10)Pipeline(steps=[('normalizer', MinMaxScaler()),\n",
" ('classifier',\n",
" KNeighborsRegressor(metric='euclidean', n_neighbors=10,\n",
" weights='distance'))])MinMaxScaler()
KNeighborsRegressor(metric='euclidean', n_neighbors=10, weights='distance')