You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123 lines
2.9 KiB
YAML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#---系统配置---#
system:
print_log: true
log_retention_days: 1
clean_dirs:
- "train_api"
- "inference_api"
- "evaluate_api"
host: "0.0.0.0"
port: 8088
device: "cpu" # 可选: "cpu", "cuda"
#---路径配置---#
paths:
model:
train: "/data/model/psychology.pth"
default: "model/psychology.pth"
normalizer:
train: "/data/model/normalizer.pkl"
default: "model/normalizer.pkl"
fonts:
chinese: "fonts/simhei.ttf"
#---训练配置---#
training:
n_epochs: 500
batch_size: 1024
learning_rate: 0.001
early_stop_patience: 100
scheduler:
gamma: 0.98
step_size: 20
regularization:
l1_lambda: 1e-6 # 默认1e-5, 降低L1因为特征已经通过权重控制
l2_lambda: 5e-4 # 默认1e-4, 增加L2加强过拟合控制
dropout_rate: 0.2
experimental_mode: true
experiments_count: 10
replace_model: true
data_mode: "train_val" # 可选: "train", "train_val", "all"
#---模型配置---#
model:
num_classes: 4 # nc
input_dim: 10
architecture: "transformer" # 可选: "mlp", "transformer"
mlp:
layers:
- output_dim: 32
activation: "relu"
- output_dim: 128
activation: "relu"
- output_dim: 32
activation: "relu"
output_dim: 4
#---特征配置---#
features:
label_name: "类别"
groups:
核心症状:
- "强迫症状数字化"
- "人际关系敏感数字化"
- "抑郁数字化"
父亲教养:
- "父亲教养方式数字化"
母亲教养:
- "母亲教养方式数字化"
家庭经济:
- "自评家庭经济条件数字化"
心理咨询:
- "有无心理治疗(咨询)史数字化"
多因子:
- "多因子症状"
出勤:
- "出勤情况数字化"
学业:
- "学业情况数字化"
feature_names:
- "强迫症状数字化"
- "人际关系敏感数字化"
- "抑郁数字化"
- "多因子症状"
- "母亲教养方式数字化"
- "父亲教养方式数字化"
- "自评家庭经济条件数字化"
- "有无心理治疗(咨询)史数字化"
- "学业情况数字化"
- "出勤情况数字化"
feature_weights:
- 0.135 # 强迫症状
- 0.085 # 人际关系敏感
- 0.08 # 抑郁
- 0.2 # 多因子症状
- 0.09 # 母亲教养
- 0.09 # 父亲教养
- 0.06 # 家庭经济
- 0.06 # 心理治疗史
- 0.08 # 学业情况
- 0.12 # 出勤情况
feature_mapping:
父亲教养方式:
1: 0.59 # 温暖与理解
0: 0.46 # 其他
母亲教养方式:
1: 0.69 # 温暖与理解
0: 0.56 # 其他
家庭经济条件:
2: 0.54 # 贫困
1: 0.54 # 较差
0: 0.47 # 其他
心理咨询史:
true: 0.21 # 有
false: 0.09 # 无
出勤情况:
true: 0.74 # 高于平均
false: 0.67 # 低于平均
学业情况:
true: 0.59 # 有预警
false: 0.50 # 无预警