lab2 + lab3 done

This commit is contained in:
sofiaivv 2024-12-07 14:23:49 +04:00
parent 1093dde20a
commit fffa050d79
9 changed files with 226959 additions and 211 deletions

8037
data/Coffe.csv Normal file

File diff suppressed because it is too large Load Diff

53944
data/Diamonds.csv Normal file

File diff suppressed because it is too large Load Diff

1719
data/Gold.csv Normal file

File diff suppressed because it is too large Load Diff

162314
data/jio_mart_items.csv Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 27,
"execution_count": 1,
"metadata": {},
"outputs": [
{
@ -32,7 +32,6 @@
"Date_numeric 0.000505\n",
"dtype: float64\n",
"Сильно смещенные столбцы: ['Open', 'High', 'Low', 'Close', 'Adj Close', 'Volume']\n",
"Данные за последние 25 лет\n",
"Выбросы в столбце 'Open':\n",
"Series([], Name: Open, dtype: float64)\n",
"\n",
@ -115,60 +114,60 @@
" dtype='object')\n",
"Обучающая выборка: (4821, 11)\n",
"Close\n",
"0.765625 14\n",
"0.750000 12\n",
"0.789063 11\n",
"0.882813 10\n",
"0.750000 16\n",
"0.753906 13\n",
"0.835938 11\n",
"0.773438 10\n",
"0.703125 10\n",
" ..\n",
"91.949997 1\n",
"48.685001 1\n",
"103.870003 1\n",
"2.414063 1\n",
"4.280000 1\n",
"Name: count, Length: 3678, dtype: int64\n",
"5.953125 1\n",
"12.355000 1\n",
"105.040001 1\n",
"11.882500 1\n",
"74.870003 1\n",
"Name: count, Length: 3632, dtype: int64\n",
"Контрольная выборка: (1607, 11)\n",
"Close\n",
"0.750000 6\n",
"0.796875 5\n",
"3.320313 4\n",
"0.835938 4\n",
"0.601563 4\n",
" ..\n",
"0.414063 1\n",
"111.070000 1\n",
"11.790000 1\n",
"59.610001 1\n",
"2.472656 1\n",
"Name: count, Length: 1438, dtype: int64\n",
"0.796875 5\n",
"0.765625 5\n",
"0.835938 4\n",
"3.156250 4\n",
"0.738281 4\n",
" ..\n",
"25.184999 1\n",
"5.882813 1\n",
"58.320000 1\n",
"0.753906 1\n",
"66.430000 1\n",
"Name: count, Length: 1454, dtype: int64\n",
"Тестовая выборка: (1607, 11)\n",
"Close\n",
"0.750000 6\n",
"0.765625 6\n",
"3.000000 4\n",
"0.601563 4\n",
"0.707031 4\n",
"2.562500 5\n",
"0.750000 5\n",
"0.781250 5\n",
"0.710938 4\n",
" ..\n",
"98.599998 1\n",
"56.110001 1\n",
"0.621094 1\n",
"21.740000 1\n",
"98.000000 1\n",
"Name: count, Length: 1444, dtype: int64\n",
"54.189999 1\n",
"18.625000 1\n",
"3.468750 1\n",
"12.452500 1\n",
"91.650002 1\n",
"Name: count, Length: 1440, dtype: int64\n",
"Обучающая выборка после undersampling: (4773, 11)\n",
"Close\n",
"0.765625 14\n",
"0.750000 12\n",
"0.789063 11\n",
"0.882813 10\n",
"0.703125 10\n",
" ..\n",
"98.230003 1\n",
"27.315001 1\n",
"8.995000 1\n",
"81.930000 1\n",
"12.357500 1\n",
"Name: count, Length: 3641, dtype: int64\n"
"0.750000 16\n",
"0.753906 13\n",
"0.835938 11\n",
"0.765625 10\n",
"0.703125 10\n",
" ..\n",
"107.209999 1\n",
"50.419998 1\n",
"93.730003 1\n",
"115.160004 1\n",
"9.365000 1\n",
"Name: count, Length: 3589, dtype: int64\n"
]
}
],
@ -305,7 +304,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": ".venv",
"language": "python",
"name": "python3"
},

File diff suppressed because one or more lines are too long

792
lab3.ipynb Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,55 +1,2 @@
## Окружение и примеры для выполнения лабораторных работ по дисциплине "Методы ИИ"
# PIbd-33_Ivanova_S.V._MAI
### Python
Используется Python версии 3.12
Установщик https://www.python.org/ftp/python/3.12.5/python-3.12.5-amd64.exe
### Poetry
Для создания и настройки окружения проекта необходимо установить poetry
**Для Windows (Powershell)**
```
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -
```
**Linux, macOS, Windows (WSL)**
```
curl -sSL https://install.python-poetry.org | python3 -
```
**Добавление poetry в PATH**
1. Открыть настройки переменных среды \
\
<img src="docs/path1.png" width="300"> \
\
<img src="docs/path2.png" width="400"> \
2. Изменить переменную Path текущего пользователя \
\
<img src="docs/path3.png" width="500"> \
3. Добавление пути `%APPDATA%\Python\Scripts` до исполняемого файла poetry \
\
<img src="docs/path4.png" width="400">
### Создание окружения
```
poetry install
```
### Запуск тестового сервиса
Запустить тестовый сервис можно с помощью VSCode (см. launch.json в каталоге .vscode).
Также запустить тестовый сервис можно с помощью командной строки:
1. Активация виртуального окружения -- `poetry shell`
2. Запуск сервиса -- `python run.py`
Для выходы из виртуального окружения используется команду `exit`