Compare commits
4 Commits
c3769b1d4a
...
cursor_tes
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
79f51105fd | ||
|
|
84ae1c2408 | ||
|
|
b00e3c964e | ||
|
|
c131815fc7 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -8,9 +8,6 @@ __pycache__/
|
|||||||
lab1/nltk_data/
|
lab1/nltk_data/
|
||||||
lab1/data/processed/
|
lab1/data/processed/
|
||||||
lab1/features/
|
lab1/features/
|
||||||
lab1/exports/
|
|
||||||
lab1/results/*
|
lab1/results/*
|
||||||
!lab1/results/README.md
|
!lab1/results/README.md
|
||||||
|
|
||||||
*.tar.gz
|
|
||||||
*.tar.gz.sha256
|
|
||||||
|
|||||||
1
lab1/.gitignore
vendored
1
lab1/.gitignore
vendored
@@ -7,4 +7,3 @@ __pycache__/
|
|||||||
/features/
|
/features/
|
||||||
/results/*
|
/results/*
|
||||||
!/results/README.md
|
!/results/README.md
|
||||||
/exports/
|
|
||||||
|
|||||||
407
lab1/TUNING_EXPERIMENTS.md
Normal file
407
lab1/TUNING_EXPERIMENTS.md
Normal file
@@ -0,0 +1,407 @@
|
|||||||
|
# Серия настройки (T1–T11)
|
||||||
|
|
||||||
|
Документ описывает **дополнительные** эксперименты поверх полной серии
|
||||||
|
`scripts/run_all_experiments.sh`. Они не заменяют протокол E0–E16 из
|
||||||
|
`EXPERIMENTS.md` и не повторяют его запуски с теми же параметрами.
|
||||||
|
|
||||||
|
Полная серия измеряет качество на **значениях по умолчанию**. Эта серия
|
||||||
|
проверяет, меняется ли macro-F1, если изменить регуляризацию, состав
|
||||||
|
признаков, n-граммы, веса блоков, число компонент LSA или гиперпараметры
|
||||||
|
деревьев.
|
||||||
|
|
||||||
|
Справочник «где в коде лежит параметр» — `TUNING.md`. Здесь — что запускать,
|
||||||
|
зачем и как интерпретировать.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. Зачем эта серия
|
||||||
|
|
||||||
|
Исследовательский вопрос тот же: различимы ли 34 персонажа по одной реплике.
|
||||||
|
Базовый ответ даёт `stylometry_pos_lsa` + `logreg` из полной серии.
|
||||||
|
|
||||||
|
Дополнительно нужно понять:
|
||||||
|
|
||||||
|
- не слишком ли слабая или сильная регуляризация при 2005 объектах и 34 классах;
|
||||||
|
- не вредят ли нестабильные группы (`vocabulary`, `readability`) и признаки длины;
|
||||||
|
- не переобучаются ли широкие символьные n-граммы;
|
||||||
|
- не давит ли один блок признаков на остальные после L2-нормировки;
|
||||||
|
- не лучше ли другое число компонент LSA, чем `k=100`;
|
||||||
|
- не лучше ли более мелкие деревья, чем лес без ограничения глубины;
|
||||||
|
- даёт ли дельта Барроуза что-то на краях диапазона MFW (50 и 1000 слов).
|
||||||
|
|
||||||
|
Главная метрика по-прежнему **macro-F1** с бутстрэп-интервалом. Разница в
|
||||||
|
1–2 процентных пункта часто шум: сравнивайте запуски через `compare`
|
||||||
|
(Мак-Немар и бутстрэп-разница), а не «на глаз» по одному числу.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. Что нельзя путать с полной серией
|
||||||
|
|
||||||
|
| Полная серия (`run_all_experiments.sh`) | Эта серия |
|
||||||
|
|---|---|
|
||||||
|
| Базовые пресеты, абляции leave-one-out, LSA 50/100/200, benchmark моделей, nested CV | Перебор **внутри** лучшего пресета |
|
||||||
|
| Logreg/SVM с `C=1`, `class_weight="balanced"` | Другие `C`, отключение весов классов |
|
||||||
|
| Char `[2,5]` / 5000, POS `[1,3]` / 500, `min_df=3` | Узкие и широкие n-граммы |
|
||||||
|
| Равные веса блоков | Заданные веса |
|
||||||
|
| Дельта 100/200/500 MFW | Дельта 50 и 1000 MFW |
|
||||||
|
| Extra trees нет | Один контролируемый запуск extra trees |
|
||||||
|
|
||||||
|
Не запускайте эту серию вместо E0–E16. Сначала нужна база: каталог
|
||||||
|
`results/stylometry_pos_lsa_logreg_<timestamp>/` с 5 повторами (или хотя бы 3).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. Как запускать
|
||||||
|
|
||||||
|
Все команды — из каталога `lab1`. Схема CV та же, что в протоколе:
|
||||||
|
5 блоков, seed `42`. Для черновика достаточно 1 повтора, для отчёта — 3
|
||||||
|
(лучшие 1–2 конфигурации потом перепроверьте с 5).
|
||||||
|
|
||||||
|
### 3.1. Вся серия скриптом
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd lab1
|
||||||
|
bash scripts/run_tuning_experiments.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Быстрый прогон:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
REPEATS=1 bash scripts/run_tuning_experiments.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Другой интерпретатор:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
PYTHON=../.venv/bin/python bash scripts/run_tuning_experiments.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Лог: `results/logs/tune_<timestamp>.log`.
|
||||||
|
Каждый `run` создаёт **новый** каталог `results/<preset>_<model>_<timestamp>/`.
|
||||||
|
У двух запусков с одним пресетом имена отличаются только меткой времени;
|
||||||
|
какой это был вариант, смотрите в `run_metadata.json` (`model_params`,
|
||||||
|
`feature_config`).
|
||||||
|
|
||||||
|
### 3.2. Один эксперимент вручную
|
||||||
|
|
||||||
|
Конфиги лежат в `configs/tune_*.toml`. Каждый файл — **одна** точка перебора
|
||||||
|
признаков. Модель и пресет задаются в команде, не в имени файла.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python -m stylometry.cli run \
|
||||||
|
--config configs/tune_no_vocab_readability.toml \
|
||||||
|
--preset stylometry_pos_lsa \
|
||||||
|
--model logreg \
|
||||||
|
--repeats 3 \
|
||||||
|
--seed 42
|
||||||
|
```
|
||||||
|
|
||||||
|
Параметры классификатора toml не требуют — их передаёт `--model-params`.
|
||||||
|
|
||||||
|
### 3.3. Сравнение с базой
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python -m stylometry.cli compare \
|
||||||
|
--run-a results/stylometry_pos_lsa_logreg_<база> \
|
||||||
|
--run-b results/stylometry_pos_lsa_logreg_<тюнинг>
|
||||||
|
```
|
||||||
|
|
||||||
|
Оба запуска должны иметь одинаковые `--folds` и `--seed`. Иначе парное
|
||||||
|
сравнение некорректно.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. Конфиги признаков
|
||||||
|
|
||||||
|
Файлы не «включают серию целиком»: каждый подменяет только указанные поля
|
||||||
|
`FeatureConfig`. Остальное берётся из пресета `stylometry_pos_lsa`.
|
||||||
|
|
||||||
|
| Файл | Что меняет |
|
||||||
|
|---|---|
|
||||||
|
| `configs/tune_no_vocab_readability.toml` | группы без `vocabulary` и `readability` |
|
||||||
|
| `configs/tune_no_vocab_readability_length.toml` | ещё без `length` |
|
||||||
|
| `configs/tune_char_narrow.toml` | char `[2,4]`, 3000 признаков, POS 500, `min_df=5` |
|
||||||
|
| `configs/tune_char_wide.toml` | char `[2,6]`, 8000, POS `[1,4]` / 800, `min_df=2` |
|
||||||
|
| `configs/tune_block_weights.toml` | веса `stylo/char/pos/lsa_word/lsa_pos` |
|
||||||
|
| `configs/tune_lsa_k150.toml` | `lsa_components = 150` |
|
||||||
|
| `configs/tune_lsa_k300.toml` | `lsa_components = 300` |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. Эксперименты
|
||||||
|
|
||||||
|
Базовый пресет везде `stylometry_pos_lsa`, если не сказано иное.
|
||||||
|
Ориентир для сравнения — pooled macro-F1 базового logreg из полной серии.
|
||||||
|
|
||||||
|
### T1. Логистическая регрессия: `C`
|
||||||
|
|
||||||
|
**Зачем.** `C` — обратная сила L2-регуляризации. На широком признаковом
|
||||||
|
пространстве (ручные признаки + n-граммы + LSA) модель с `C=1` может
|
||||||
|
переобучаться или, наоборот, быть слишком простой. Нужно найти диапазон,
|
||||||
|
а не одно «магическое» число.
|
||||||
|
|
||||||
|
**Что меняется.** `C ∈ {0.03, 0.1, 0.3, 1, 3, 10}`. Остальное как в базе
|
||||||
|
(`class_weight="balanced"`). Значение `C=1` совпадает с полной серией;
|
||||||
|
его можно не гонять, если база уже есть.
|
||||||
|
|
||||||
|
**Как запускать.**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
for c in 0.03 0.1 0.3 1 3 10; do
|
||||||
|
python -m stylometry.cli run --preset stylometry_pos_lsa --model logreg \
|
||||||
|
--repeats 3 --seed 42 --model-params "{\"C\": $c}"
|
||||||
|
done
|
||||||
|
```
|
||||||
|
|
||||||
|
**Как читать.** Меньше `C` — проще модель. Если macro-F1 растёт при уменьшении
|
||||||
|
`C`, база переобучалась. Если растёт только при `C ≥ 3`, регуляризации в базе
|
||||||
|
было слишком много. Смотрите также log loss: он показывает калибровку, не
|
||||||
|
только точность меток.
|
||||||
|
|
||||||
|
### T2. Линейный SVM: `C`
|
||||||
|
|
||||||
|
**Зачем.** Та же логика, другой критерий (зазор вместо логистической потери).
|
||||||
|
SVM в полной серии тоже шёл с `C=1`. Если лучший `C` у SVM и logreg близки,
|
||||||
|
вывод про регуляризацию устойчив.
|
||||||
|
|
||||||
|
**Как запускать.**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
for c in 0.03 0.1 0.3 1 3 10; do
|
||||||
|
python -m stylometry.cli run --preset stylometry_pos_lsa --model linear_svc \
|
||||||
|
--repeats 3 --seed 42 --model-params "{\"C\": $c}"
|
||||||
|
done
|
||||||
|
```
|
||||||
|
|
||||||
|
**Ограничение.** У `linear_svc` нет вероятностей: log loss не считается,
|
||||||
|
top-k строится по решающей функции.
|
||||||
|
|
||||||
|
### T3. Logreg без балансировки классов
|
||||||
|
|
||||||
|
**Зачем.** В корпусе 15–139 реплик на персонажа. `class_weight="balanced"`
|
||||||
|
почти наверняка нужен, но это надо показать: иначе macro-F1 может казаться
|
||||||
|
низким «из-за модели», хотя виноват сдвиг к частым классам (Abigail и т.д.).
|
||||||
|
|
||||||
|
**Как запускать.**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python -m stylometry.cli run --preset stylometry_pos_lsa --model logreg \
|
||||||
|
--repeats 3 --seed 42 --model-params '{"class_weight": null}'
|
||||||
|
```
|
||||||
|
|
||||||
|
**Как читать.** Если accuracy почти не падает, а macro-F1 и balanced accuracy
|
||||||
|
падают, модель без весов игнорирует редких персонажей. Это аргумент в пользу
|
||||||
|
macro-F1 как основной метрики.
|
||||||
|
|
||||||
|
### T4. Без `vocabulary` и `readability`
|
||||||
|
|
||||||
|
**Зачем.** На репликах ~19 слов TTR, индексы Honore/Yule и формулы читаемости
|
||||||
|
нестабильны (`FEATURES.md`, гипотеза H2). Полная серия делает leave-one-out
|
||||||
|
(`ablate`): удаляет **по одной** группе. Здесь обе шумные группы снимаются
|
||||||
|
сразу — ближе к тому, как собирали бы «очищенный» основной набор.
|
||||||
|
|
||||||
|
**Конфиг.** `configs/tune_no_vocab_readability.toml`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python -m stylometry.cli run --config configs/tune_no_vocab_readability.toml \
|
||||||
|
--preset stylometry_pos_lsa --model logreg --repeats 3 --seed 42
|
||||||
|
```
|
||||||
|
|
||||||
|
**Как читать.** Рост или отсутствие падения macro-F1 значит, что эти группы
|
||||||
|
не несут устойчивого сигнала (или мешают). Сильное падение — в протоколе их
|
||||||
|
нельзя вычёркивать без оговорки.
|
||||||
|
|
||||||
|
### T5. Ещё без `length`
|
||||||
|
|
||||||
|
**Зачем.** Гипотеза H4: длинные реплики классифицируются лучше. Если качество
|
||||||
|
не падает после удаления length-признаков, различимость персонажей не сводится
|
||||||
|
к «кто говорит длиннее». Если падает — часть результата объясняется длиной,
|
||||||
|
это нужно явно написать в отчёте.
|
||||||
|
|
||||||
|
**Конфиг.** `configs/tune_no_vocab_readability_length.toml`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python -m stylometry.cli run --config configs/tune_no_vocab_readability_length.toml \
|
||||||
|
--preset stylometry_pos_lsa --model logreg --repeats 3 --seed 42
|
||||||
|
```
|
||||||
|
|
||||||
|
Имеет смысл сопоставить с `length-report` по базовому запуску.
|
||||||
|
|
||||||
|
### T6. Символьные и POS n-граммы: узкие vs широкие
|
||||||
|
|
||||||
|
**Зачем.** В полной серии фиксированы char 2–5 / 5000 и POS 1–3 / 500.
|
||||||
|
Узкий вариант (короче n-граммы, выше `min_df`) проверяет переобучение на
|
||||||
|
редких орфографических шаблонах. Широкий (2–6, больше признаков, `min_df=2`)
|
||||||
|
проверяет, не теряем ли морфологию и пунктуационные привычки.
|
||||||
|
|
||||||
|
**Конфиги.** `tune_char_narrow.toml`, `tune_char_wide.toml`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python -m stylometry.cli run --config configs/tune_char_narrow.toml \
|
||||||
|
--preset stylometry_pos_lsa --model logreg --repeats 3 --seed 42
|
||||||
|
|
||||||
|
python -m stylometry.cli run --config configs/tune_char_wide.toml \
|
||||||
|
--preset stylometry_pos_lsa --model logreg --repeats 3 --seed 42
|
||||||
|
```
|
||||||
|
|
||||||
|
**Как читать.** Если wide лучше на обучении блоков, но pooled macro-F1 не выше
|
||||||
|
базы (или хуже на редких классах) — переобучение. Если narrow не хуже базы —
|
||||||
|
лишняя размерность не нужна.
|
||||||
|
|
||||||
|
### T7. Веса блоков
|
||||||
|
|
||||||
|
**Зачем.** После L2-нормировки каждый блок имеет единичную норму и конкурирует
|
||||||
|
наравне, даже если один из них шумный. В базе веса равны. Здесь ослабляются
|
||||||
|
char и особенно `lsa_word` (тематический риск, гипотеза H3), POS и стилометрия
|
||||||
|
остаются сильнее.
|
||||||
|
|
||||||
|
**Конфиг.** `configs/tune_block_weights.toml`
|
||||||
|
|
||||||
|
```text
|
||||||
|
stylo = 1.0
|
||||||
|
char = 0.5
|
||||||
|
pos = 0.7
|
||||||
|
lsa_word = 0.3
|
||||||
|
lsa_pos = 0.5
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python -m stylometry.cli run --config configs/tune_block_weights.toml \
|
||||||
|
--preset stylometry_pos_lsa --model logreg --repeats 3 --seed 42
|
||||||
|
```
|
||||||
|
|
||||||
|
**Как читать.** Веса — такой же гиперпараметр, как `C`. Один удачный набор не
|
||||||
|
доказывает оптимум. Если macro-F1 вырос и `lsa_word` при этом ослаблен, это
|
||||||
|
дополнительный довод, что тема мешала стилю.
|
||||||
|
|
||||||
|
### T8. Число компонент LSA: 150 и 300
|
||||||
|
|
||||||
|
**Зачем.** В полной серии `lsa-sweep` смотрит `k ∈ {50, 100, 200}` по
|
||||||
|
**отдельным** вариантам LSA. В основном пресете всегда `k=100` сразу для
|
||||||
|
`word` и `pos`. Здесь проверяется, помогает ли больше компонент **в
|
||||||
|
объединённом** наборе, плюс недостающие точки 150 и 300 в переборе вариантов.
|
||||||
|
|
||||||
|
**Конфиги.** `tune_lsa_k150.toml`, `tune_lsa_k300.toml`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python -m stylometry.cli run --config configs/tune_lsa_k150.toml \
|
||||||
|
--preset stylometry_pos_lsa --model logreg --repeats 3 --seed 42
|
||||||
|
|
||||||
|
python -m stylometry.cli run --config configs/tune_lsa_k300.toml \
|
||||||
|
--preset stylometry_pos_lsa --model logreg --repeats 3 --seed 42
|
||||||
|
|
||||||
|
python -m stylometry.cli lsa-sweep \
|
||||||
|
--variants word,content,fw,char,pos \
|
||||||
|
--components 150,300 \
|
||||||
|
--model logreg --repeats 1 --seed 42
|
||||||
|
```
|
||||||
|
|
||||||
|
**Как читать.** Рост `k` без роста macro-F1 — лишние компоненты ловят шум.
|
||||||
|
Сравнивайте `word`/`content` с `pos`/`fw`: если выигрыш только у word-LSA,
|
||||||
|
это снова тема, а не стиль.
|
||||||
|
|
||||||
|
### T9. Случайный лес: глубина и лист
|
||||||
|
|
||||||
|
**Зачем.** В `benchmark` лес идёт с дефолтами (`n_estimators=400`,
|
||||||
|
`max_depth=None`, `min_samples_leaf=1`). На 2005×34 такая модель легко
|
||||||
|
запоминает обучающие блоки. Сначала ограничивают глубину и увеличивают лист,
|
||||||
|
а не число деревьев.
|
||||||
|
|
||||||
|
**Как запускать.**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
for depth in 10 20 30; do
|
||||||
|
for leaf in 2 3 5; do
|
||||||
|
python -m stylometry.cli run --preset stylometry_pos_lsa --model random_forest \
|
||||||
|
--repeats 3 --seed 42 \
|
||||||
|
--model-params "{\"max_depth\": $depth, \"min_samples_leaf\": $leaf}"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
python -m stylometry.cli run --preset stylometry_pos_lsa --model random_forest \
|
||||||
|
--repeats 3 --seed 42 \
|
||||||
|
--model-params '{"max_depth": 20, "min_samples_leaf": 3, "max_features": 0.1}'
|
||||||
|
```
|
||||||
|
|
||||||
|
**Как читать.** Если мелкие деревья не хуже (или лучше) дефолтного леса из
|
||||||
|
benchmark, сложность в базе была лишней. Сравнивайте с logreg, а не только
|
||||||
|
друг с другом: лес может выигрывать accuracy и проигрывать macro-F1.
|
||||||
|
|
||||||
|
### T10. Сверхслучайные деревья
|
||||||
|
|
||||||
|
**Зачем.** Extra trees не входили в `benchmark` полной серии. Случайные пороги
|
||||||
|
обычно снижают дисперсию относительно RF. Один контролируемый запуск
|
||||||
|
(не полный перебор) проверяет, есть ли смысл включать модель в сравнение.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python -m stylometry.cli run --preset stylometry_pos_lsa --model extra_trees \
|
||||||
|
--repeats 3 --seed 42 \
|
||||||
|
--model-params '{"max_depth": 20, "min_samples_leaf": 3}'
|
||||||
|
```
|
||||||
|
|
||||||
|
Если результат заметно хуже logreg, модель достаточно упомянуть как проверку,
|
||||||
|
не раздувая сетку.
|
||||||
|
|
||||||
|
### T11. Дельта Барроуза: 50 и 1000 MFW
|
||||||
|
|
||||||
|
**Зачем.** Классическая стилометрия на самых частотных словах. Полная серия
|
||||||
|
уже смотрит 100/200/500. Края диапазона: 50 слов — очень компактный профиль,
|
||||||
|
1000 — больше лексики и больше темы. На коротких репликах дельта обычно
|
||||||
|
слабее ML; это независимая нижняя граница, не конкурент основному пресету.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python -m stylometry.cli delta \
|
||||||
|
--features 50,1000 --metrics manhattan,cosine --repeats 2 --seed 42
|
||||||
|
```
|
||||||
|
|
||||||
|
`zscore` в CLI не переключается (в коде по умолчанию включён), поэтому его
|
||||||
|
здесь нет.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 6. Рекомендуемый порядок, если запускаете вручную
|
||||||
|
|
||||||
|
Не гоните все циклы сразу, если времени мало. Порядок совпадает с `TUNING.md`:
|
||||||
|
|
||||||
|
1. T4, T5 — состав групп (дешево и часто полезно).
|
||||||
|
2. T6 — n-граммы.
|
||||||
|
3. T8 — `k` LSA в объединённом наборе.
|
||||||
|
4. T7 — веса, если после T4–T6 остался шумный блок.
|
||||||
|
5. T1, затем T2 — `C`.
|
||||||
|
6. T3 — один раз, для отчёта про дисбаланс.
|
||||||
|
7. T9, T10 — только если линейные модели уже сняты.
|
||||||
|
8. T11 — короткая классическая проверка.
|
||||||
|
|
||||||
|
После отбора 1–2 лучших конфигураций:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python -m stylometry.cli run --preset stylometry_pos_lsa --model logreg \
|
||||||
|
--repeats 5 --seed 42 --nested
|
||||||
|
```
|
||||||
|
|
||||||
|
Вложенная CV с расширенной сеткой честнее, чем выбор `C` по тем же OOF,
|
||||||
|
что потом публикуете. Узкая сетка `{0.1, 1, 10}` уже есть в полной серии;
|
||||||
|
имеет смысл `--nested` только если T1 сдвинул разумный диапазон (например,
|
||||||
|
к `{0.03, 0.1, 0.3}`). Для этого нужно изменить `PARAM_GRIDS` в
|
||||||
|
`stylometry/pipelines.py` — это уже правка кода, не конфиг.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 7. Как фиксировать и чего не делать
|
||||||
|
|
||||||
|
Для каждого запуска сохраняются стандартные файлы: `run_metadata.json`,
|
||||||
|
`pooled_metrics.csv`, `bootstrap_ci.json`, `per_class_report.csv`,
|
||||||
|
матрица ошибок. Перед сравнением откройте `run_metadata.json` и убедитесь,
|
||||||
|
что отличаются только задуманные поля.
|
||||||
|
|
||||||
|
Нельзя:
|
||||||
|
|
||||||
|
- выбирать победителя по тестовой выборке вне CV;
|
||||||
|
- менять `--folds` или `--seed` «чтобы стало лучше»;
|
||||||
|
- сравнивать `QUICK=1` / `REPEATS=1` с финальными 5 повторами как равные;
|
||||||
|
- объявлять улучшение без интервала и `compare`;
|
||||||
|
- подменять macro-F1 долей правильных ответов.
|
||||||
|
|
||||||
|
Ограничения корпуса те же, что в `EXPERIMENTS.md`: короткие реплики, один
|
||||||
|
автор, ручная фильтрация, дисбаланс 15–139. Настройка модели эти ограничения
|
||||||
|
не снимает.
|
||||||
13
lab1/configs/tune_block_weights.toml
Normal file
13
lab1/configs/tune_block_weights.toml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# Ослабить потенциально шумные блоки после L2-нормировки.
|
||||||
|
|
||||||
|
[cv]
|
||||||
|
folds = 5
|
||||||
|
repeats = 3
|
||||||
|
seed = 42
|
||||||
|
|
||||||
|
[features.block_weights]
|
||||||
|
stylo = 1.0
|
||||||
|
char = 0.5
|
||||||
|
pos = 0.7
|
||||||
|
lsa_word = 0.3
|
||||||
|
lsa_pos = 0.5
|
||||||
13
lab1/configs/tune_char_narrow.toml
Normal file
13
lab1/configs/tune_char_narrow.toml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# Более короткие char n-граммы, меньше признаков, строже min_df.
|
||||||
|
|
||||||
|
[cv]
|
||||||
|
folds = 5
|
||||||
|
repeats = 3
|
||||||
|
seed = 42
|
||||||
|
|
||||||
|
[features]
|
||||||
|
char_ngram_range = [2, 4]
|
||||||
|
char_max_features = 3000
|
||||||
|
pos_ngram_range = [1, 3]
|
||||||
|
pos_max_features = 500
|
||||||
|
min_df = 5
|
||||||
13
lab1/configs/tune_char_wide.toml
Normal file
13
lab1/configs/tune_char_wide.toml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# Более длинные n-граммы и больше признаков: риск переобучения.
|
||||||
|
|
||||||
|
[cv]
|
||||||
|
folds = 5
|
||||||
|
repeats = 3
|
||||||
|
seed = 42
|
||||||
|
|
||||||
|
[features]
|
||||||
|
char_ngram_range = [2, 6]
|
||||||
|
char_max_features = 8000
|
||||||
|
pos_ngram_range = [1, 4]
|
||||||
|
pos_max_features = 800
|
||||||
|
min_df = 2
|
||||||
7
lab1/configs/tune_lsa_k150.toml
Normal file
7
lab1/configs/tune_lsa_k150.toml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
[cv]
|
||||||
|
folds = 5
|
||||||
|
repeats = 3
|
||||||
|
seed = 42
|
||||||
|
|
||||||
|
[features]
|
||||||
|
lsa_components = 150
|
||||||
7
lab1/configs/tune_lsa_k300.toml
Normal file
7
lab1/configs/tune_lsa_k300.toml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
[cv]
|
||||||
|
folds = 5
|
||||||
|
repeats = 3
|
||||||
|
seed = 42
|
||||||
|
|
||||||
|
[features]
|
||||||
|
lsa_components = 300
|
||||||
20
lab1/configs/tune_no_vocab_readability.toml
Normal file
20
lab1/configs/tune_no_vocab_readability.toml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# Без нестабильных групп на коротких репликах.
|
||||||
|
# Остальные поля пресета (n-граммы, LSA) не переопределяются.
|
||||||
|
|
||||||
|
[cv]
|
||||||
|
folds = 5
|
||||||
|
repeats = 3
|
||||||
|
seed = 42
|
||||||
|
|
||||||
|
[features]
|
||||||
|
groups = [
|
||||||
|
"length",
|
||||||
|
"lexical",
|
||||||
|
"characters",
|
||||||
|
"punctuation",
|
||||||
|
"function_words",
|
||||||
|
"pronouns",
|
||||||
|
"pos",
|
||||||
|
"syntax",
|
||||||
|
"dialogue",
|
||||||
|
]
|
||||||
18
lab1/configs/tune_no_vocab_readability_length.toml
Normal file
18
lab1/configs/tune_no_vocab_readability_length.toml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# То же + без length: проверка, не объясняется ли сигнал длиной реплики.
|
||||||
|
|
||||||
|
[cv]
|
||||||
|
folds = 5
|
||||||
|
repeats = 3
|
||||||
|
seed = 42
|
||||||
|
|
||||||
|
[features]
|
||||||
|
groups = [
|
||||||
|
"lexical",
|
||||||
|
"characters",
|
||||||
|
"punctuation",
|
||||||
|
"function_words",
|
||||||
|
"pronouns",
|
||||||
|
"pos",
|
||||||
|
"syntax",
|
||||||
|
"dialogue",
|
||||||
|
]
|
||||||
BIN
lab1/exports/nlp_lab1_results_20261025_210212.tar.gz
Normal file
BIN
lab1/exports/nlp_lab1_results_20261025_210212.tar.gz
Normal file
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
5f48946e4ecf6b1888df5bd99796457b9f49dacffd4da835ce8b6ed69895e2c4 /home/folen/homework/NLP/lab1/exports/nlp_lab1_results_20261025_210212.tar.gz
|
||||||
389
lab1/exports/nlp_lab1_results_20261025_210212_manifest.txt
Normal file
389
lab1/exports/nlp_lab1_results_20261025_210212_manifest.txt
Normal file
@@ -0,0 +1,389 @@
|
|||||||
|
Дата: Вс 25 окт 2026 21:02:12 MSK
|
||||||
|
Каталог: /home/folen/homework/NLP/lab1
|
||||||
|
Интерпретатор: python
|
||||||
|
|
||||||
|
=== Проверка окружения ===
|
||||||
|
Python: 3.11.2 (/home/folen/homework/NLP/lab1/.venv/bin/python)
|
||||||
|
Каталог проекта: /home/folen/homework/NLP/lab1
|
||||||
|
Версии библиотек:
|
||||||
|
numpy: 2.4.6
|
||||||
|
pandas: 3.1.0
|
||||||
|
scipy: 1.17.1
|
||||||
|
sklearn: 1.9.1
|
||||||
|
nltk: 3.10.4
|
||||||
|
matplotlib: 3.11.2
|
||||||
|
Корпус:
|
||||||
|
файл: /home/folen/homework/NLP/lab1/data/dialogues.csv
|
||||||
|
SHA-256: 8946f08159daddb9d89c9d323205d4a7fb4bc617d16e300ff6c7606cb05030f7
|
||||||
|
реплик: 2005
|
||||||
|
персонажей: 34
|
||||||
|
словоупотреблений: 38207
|
||||||
|
NLTK:
|
||||||
|
токенизатор: NLTK
|
||||||
|
POS-теггер: доступен
|
||||||
|
пример токенов: ['Oh', ',', 'that', "'s", 'right', '...', 'I', 'heard']
|
||||||
|
пример POS: ['INTJ', 'PUNCT', 'DET', 'AUX', 'ADJ', 'PUNCT', 'PRON', 'VERB']
|
||||||
|
|
||||||
|
Окружение готово.
|
||||||
|
{"versions": {"numpy": "2.4.6", "pandas": "3.1.0", "scipy": "1.17.1", "sklearn": "1.9.1", "nltk": "3.10.4", "matplotlib": "3.11.2"}, "n_lines": 2005}
|
||||||
|
|
||||||
|
Git commit: c131815fc7b4c941d64d9ca7c7a00ea15df20df3
|
||||||
|
|
||||||
|
Содержимое results:
|
||||||
|
results/ablation_stylometry_pos_lsa_20261025_185002/ablation.csv
|
||||||
|
results/delta_20261025_201339/delta_sweep.csv
|
||||||
|
results/length_logreg_20261025_172732/bootstrap_ci.json
|
||||||
|
results/length_logreg_20261025_172732/confusion_matrix.csv
|
||||||
|
results/length_logreg_20261025_172732/confusion_matrix_normalized.csv
|
||||||
|
results/length_logreg_20261025_172732/fold_metrics.csv
|
||||||
|
results/length_logreg_20261025_172732/fold_summary.csv
|
||||||
|
results/length_logreg_20261025_172732/oof_predictions.csv
|
||||||
|
results/length_logreg_20261025_172732/per_class_report.csv
|
||||||
|
results/length_logreg_20261025_172732/pooled_metrics.csv
|
||||||
|
results/length_logreg_20261025_172732/run_metadata.json
|
||||||
|
results/length_logreg_20261025_172732/summary.md
|
||||||
|
results/length_logreg_20261025_172732/top_confusions.csv
|
||||||
|
results/logs/tune_20261025_191658.log
|
||||||
|
results/lsa_sweep_20261025_195217/lsa_sweep.csv
|
||||||
|
results/README.md
|
||||||
|
results/stylometry_pos_lsa_extra_trees_20261025_201326/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_extra_trees_20261025_201326/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_extra_trees_20261025_201326/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_extra_trees_20261025_201326/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_extra_trees_20261025_201326/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_extra_trees_20261025_201326/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_extra_trees_20261025_201326/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_extra_trees_20261025_201326/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_extra_trees_20261025_201326/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_extra_trees_20261025_201326/summary.md
|
||||||
|
results/stylometry_pos_lsa_extra_trees_20261025_201326/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_192936/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_192936/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_192936/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_192936/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_192936/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_192936/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_192936/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_192936/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_192936/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_192936/summary.md
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_192936/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193051/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193051/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193051/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193051/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193051/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193051/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193051/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193051/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193051/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193051/summary.md
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193051/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193207/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193207/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193207/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193207/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193207/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193207/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193207/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193207/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193207/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193207/summary.md
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193207/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193328/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193328/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193328/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193328/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193328/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193328/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193328/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193328/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193328/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193328/summary.md
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193328/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193455/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193455/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193455/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193455/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193455/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193455/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193455/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193455/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193455/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193455/summary.md
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193455/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193625/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193625/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193625/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193625/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193625/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193625/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193625/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193625/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193625/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193625/summary.md
|
||||||
|
results/stylometry_pos_lsa_linear_svc_20261025_193625/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_191805/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_191805/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_191805/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_191805/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_191805/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_191805/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_191805/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_191805/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_191805/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_191805/summary.md
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_191805/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_191938/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_191938/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_191938/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_191938/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_191938/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_191938/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_191938/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_191938/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_191938/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_191938/summary.md
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_191938/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192116/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192116/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192116/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192116/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192116/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192116/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192116/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192116/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192116/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192116/summary.md
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192116/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192311/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192311/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192311/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192311/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192311/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192311/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192311/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192311/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192311/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192311/summary.md
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192311/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192535/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192535/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192535/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192535/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192535/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192535/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192535/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192535/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192535/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192535/summary.md
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192535/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192822/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192822/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192822/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192822/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192822/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192822/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192822/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192822/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192822/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192822/summary.md
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_192822/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_193844/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_193844/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_193844/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_193844/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_193844/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_193844/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_193844/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_193844/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_193844/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_193844/summary.md
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_193844/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194037/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194037/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194037/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194037/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194037/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194037/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194037/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194037/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194037/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194037/summary.md
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194037/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194222/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194222/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194222/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194222/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194222/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194222/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194222/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194222/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194222/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194222/summary.md
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194222/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194415/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194415/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194415/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194415/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194415/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194415/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194415/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194415/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194415/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194415/summary.md
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194415/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194613/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194613/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194613/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194613/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194613/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194613/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194613/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194613/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194613/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194613/summary.md
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194613/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194802/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194802/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194802/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194802/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194802/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194802/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194802/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194802/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194802/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194802/summary.md
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194802/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194959/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194959/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194959/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194959/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194959/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194959/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194959/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194959/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194959/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194959/summary.md
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_194959/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_195203/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_195203/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_195203/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_195203/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_195203/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_195203/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_195203/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_195203/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_195203/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_195203/summary.md
|
||||||
|
results/stylometry_pos_lsa_logreg_20261025_195203/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_195744/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_195744/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_195744/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_195744/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_195744/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_195744/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_195744/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_195744/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_195744/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_195744/summary.md
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_195744/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_195906/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_195906/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_195906/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_195906/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_195906/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_195906/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_195906/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_195906/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_195906/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_195906/summary.md
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_195906/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200028/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200028/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200028/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200028/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200028/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200028/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200028/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200028/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200028/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200028/summary.md
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200028/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200155/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200155/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200155/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200155/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200155/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200155/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200155/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200155/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200155/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200155/summary.md
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200155/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200320/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200320/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200320/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200320/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200320/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200320/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200320/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200320/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200320/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200320/summary.md
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200320/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200445/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200445/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200445/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200445/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200445/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200445/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200445/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200445/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200445/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200445/summary.md
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200445/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200617/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200617/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200617/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200617/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200617/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200617/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200617/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200617/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200617/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200617/summary.md
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200617/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200748/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200748/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200748/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200748/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200748/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200748/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200748/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200748/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200748/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200748/summary.md
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200748/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200916/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200916/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200916/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200916/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200916/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200916/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200916/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200916/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200916/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200916/summary.md
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_200916/top_confusions.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_201210/bootstrap_ci.json
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_201210/confusion_matrix.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_201210/confusion_matrix_normalized.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_201210/fold_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_201210/fold_summary.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_201210/oof_predictions.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_201210/per_class_report.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_201210/pooled_metrics.csv
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_201210/run_metadata.json
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_201210/summary.md
|
||||||
|
results/stylometry_pos_lsa_random_forest_20261025_201210/top_confusions.csv
|
||||||
140
lab1/scripts/run_tuning_experiments.sh
Executable file
140
lab1/scripts/run_tuning_experiments.sh
Executable file
@@ -0,0 +1,140 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Тюнинг поверх полной серии scripts/run_all_experiments.sh.
|
||||||
|
# Не повторяет E0–E16: только гиперпараметры, состав признаков, веса, k LSA.
|
||||||
|
#
|
||||||
|
# Запуск из каталога lab1:
|
||||||
|
# bash scripts/run_tuning_experiments.sh
|
||||||
|
#
|
||||||
|
# Быстрый черновик:
|
||||||
|
# REPEATS=1 bash scripts/run_tuning_experiments.sh
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
||||||
|
cd "${PROJECT_ROOT}"
|
||||||
|
|
||||||
|
PYTHON="${PYTHON:-python}"
|
||||||
|
REPEATS="${REPEATS:-3}"
|
||||||
|
SEED="${SEED:-42}"
|
||||||
|
PRESET="${PRESET:-stylometry_pos_lsa}"
|
||||||
|
|
||||||
|
LOG_DIR="${PROJECT_ROOT}/results/logs"
|
||||||
|
mkdir -p "${LOG_DIR}"
|
||||||
|
RUN_ID="${RUN_ID:-$(date +%Y%m%d_%H%M%S)}"
|
||||||
|
LOG_FILE="${LOG_DIR}/tune_${RUN_ID}.log"
|
||||||
|
exec > >(tee -a "${LOG_FILE}") 2>&1
|
||||||
|
|
||||||
|
step() {
|
||||||
|
echo
|
||||||
|
echo "============================================================"
|
||||||
|
echo "== $*"
|
||||||
|
echo "============================================================"
|
||||||
|
}
|
||||||
|
|
||||||
|
run() {
|
||||||
|
echo
|
||||||
|
echo ">>> $*"
|
||||||
|
"$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "Тюнинг: $(date)"
|
||||||
|
echo "Интерпретатор: ${PYTHON}"
|
||||||
|
echo "Повторы: ${REPEATS}, seed: ${SEED}, пресет: ${PRESET}"
|
||||||
|
echo "Лог: ${LOG_FILE}"
|
||||||
|
|
||||||
|
step "T1. Logreg: C"
|
||||||
|
for c in 0.03 0.1 0.3 1 3 10; do
|
||||||
|
run "${PYTHON}" -m stylometry.cli run \
|
||||||
|
--preset "${PRESET}" --model logreg \
|
||||||
|
--repeats "${REPEATS}" --seed "${SEED}" \
|
||||||
|
--model-params "{\"C\": ${c}}"
|
||||||
|
done
|
||||||
|
|
||||||
|
step "T2. Linear SVM: C"
|
||||||
|
for c in 0.03 0.1 0.3 1 3 10; do
|
||||||
|
run "${PYTHON}" -m stylometry.cli run \
|
||||||
|
--preset "${PRESET}" --model linear_svc \
|
||||||
|
--repeats "${REPEATS}" --seed "${SEED}" \
|
||||||
|
--model-params "{\"C\": ${c}}"
|
||||||
|
done
|
||||||
|
|
||||||
|
step "T3. Logreg без балансировки классов"
|
||||||
|
run "${PYTHON}" -m stylometry.cli run \
|
||||||
|
--preset "${PRESET}" --model logreg \
|
||||||
|
--repeats "${REPEATS}" --seed "${SEED}" \
|
||||||
|
--model-params '{"class_weight": null}'
|
||||||
|
|
||||||
|
step "T4. Без vocabulary и readability"
|
||||||
|
run "${PYTHON}" -m stylometry.cli run \
|
||||||
|
--config configs/tune_no_vocab_readability.toml \
|
||||||
|
--preset "${PRESET}" --model logreg \
|
||||||
|
--repeats "${REPEATS}" --seed "${SEED}"
|
||||||
|
|
||||||
|
step "T5. Без vocabulary, readability и length"
|
||||||
|
run "${PYTHON}" -m stylometry.cli run \
|
||||||
|
--config configs/tune_no_vocab_readability_length.toml \
|
||||||
|
--preset "${PRESET}" --model logreg \
|
||||||
|
--repeats "${REPEATS}" --seed "${SEED}"
|
||||||
|
|
||||||
|
step "T6. Char/POS n-граммы"
|
||||||
|
run "${PYTHON}" -m stylometry.cli run \
|
||||||
|
--config configs/tune_char_narrow.toml \
|
||||||
|
--preset "${PRESET}" --model logreg \
|
||||||
|
--repeats "${REPEATS}" --seed "${SEED}"
|
||||||
|
run "${PYTHON}" -m stylometry.cli run \
|
||||||
|
--config configs/tune_char_wide.toml \
|
||||||
|
--preset "${PRESET}" --model logreg \
|
||||||
|
--repeats "${REPEATS}" --seed "${SEED}"
|
||||||
|
|
||||||
|
step "T7. Веса блоков"
|
||||||
|
run "${PYTHON}" -m stylometry.cli run \
|
||||||
|
--config configs/tune_block_weights.toml \
|
||||||
|
--preset "${PRESET}" --model logreg \
|
||||||
|
--repeats "${REPEATS}" --seed "${SEED}"
|
||||||
|
|
||||||
|
step "T8. LSA k=150 и k=300 (в полной серии были 50/100/200)"
|
||||||
|
run "${PYTHON}" -m stylometry.cli run \
|
||||||
|
--config configs/tune_lsa_k150.toml \
|
||||||
|
--preset "${PRESET}" --model logreg \
|
||||||
|
--repeats "${REPEATS}" --seed "${SEED}"
|
||||||
|
run "${PYTHON}" -m stylometry.cli run \
|
||||||
|
--config configs/tune_lsa_k300.toml \
|
||||||
|
--preset "${PRESET}" --model logreg \
|
||||||
|
--repeats "${REPEATS}" --seed "${SEED}"
|
||||||
|
run "${PYTHON}" -m stylometry.cli lsa-sweep \
|
||||||
|
--variants word,content,fw,char,pos \
|
||||||
|
--components 150,300 \
|
||||||
|
--model logreg --repeats 1 --seed "${SEED}"
|
||||||
|
|
||||||
|
step "T9. Случайный лес: глубина и лист"
|
||||||
|
for depth in 10 20 30; do
|
||||||
|
for leaf in 2 3 5; do
|
||||||
|
run "${PYTHON}" -m stylometry.cli run \
|
||||||
|
--preset "${PRESET}" --model random_forest \
|
||||||
|
--repeats "${REPEATS}" --seed "${SEED}" \
|
||||||
|
--model-params "{\"max_depth\": ${depth}, \"min_samples_leaf\": ${leaf}}"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
run "${PYTHON}" -m stylometry.cli run \
|
||||||
|
--preset "${PRESET}" --model random_forest \
|
||||||
|
--repeats "${REPEATS}" --seed "${SEED}" \
|
||||||
|
--model-params '{"max_depth": 20, "min_samples_leaf": 3, "max_features": 0.1}'
|
||||||
|
|
||||||
|
step "T10. Extra trees (не было в benchmark полной серии)"
|
||||||
|
run "${PYTHON}" -m stylometry.cli run \
|
||||||
|
--preset "${PRESET}" --model extra_trees \
|
||||||
|
--repeats "${REPEATS}" --seed "${SEED}" \
|
||||||
|
--model-params '{"max_depth": 20, "min_samples_leaf": 3}'
|
||||||
|
|
||||||
|
step "T11. Дельта: 50 и 1000 MFW (100/200/500 уже в полной серии)"
|
||||||
|
run "${PYTHON}" -m stylometry.cli delta \
|
||||||
|
--features 50,1000 --metrics manhattan,cosine \
|
||||||
|
--repeats 2 --seed "${SEED}"
|
||||||
|
|
||||||
|
step "Готово"
|
||||||
|
echo "Конец тюнинга: $(date)"
|
||||||
|
echo "Лог: ${LOG_FILE}"
|
||||||
|
echo
|
||||||
|
echo "Сравнить два каталога:"
|
||||||
|
echo " python -m stylometry.cli compare --run-a results/<A> --run-b results/<B>"
|
||||||
Reference in New Issue
Block a user