Добавлены параметры моделей, веса блоков и руководство по настройке

This commit is contained in:
2026-10-25 16:08:00 +03:00
parent 10e2444d23
commit 5a4a19e0df
7 changed files with 537 additions and 11 deletions

View File

@@ -15,6 +15,24 @@ seed = 42
preset = "stylometry_pos_lsa"
model = "logreg"
[model_params]
# Параметры конкретного классификатора. Раскомментируйте нужные.
# Для logreg:
# C = 1.0
# class_weight = "balanced"
# Для linear_svc:
# C = 1.0
# Для random_forest / extra_trees:
# n_estimators = 400
# max_depth = 30
# min_samples_leaf = 1
# Для multinomial_nb:
# alpha = 1.0
# fit_prior = true
# Для knn:
# n_neighbors = 5
# weights = "distance"
[features]
# Эти параметры описаны в stylometry/pipelines.py и могут переопределяться
# программно. В командной строке удобнее выбирать готовый preset.
@@ -25,3 +43,11 @@ pos_ngram_range = [1, 3]
lsa_components = 100
min_df = 3
stylo_scaler = "standard"
[features.block_weights]
# Веса блоков в FeatureUnion. Пусто — равные веса.
# stylo = 1.0
# char = 0.5
# pos = 0.5
# lsa_word = 0.5
# lsa_pos = 0.5