完成作业评论
This commit is contained in:
BIN
05陈屿豪.xlsx
Normal file
BIN
05陈屿豪.xlsx
Normal file
Binary file not shown.
BIN
__pycache__/config.cpython-38.pyc
Normal file
BIN
__pycache__/config.cpython-38.pyc
Normal file
Binary file not shown.
BIN
__pycache__/dataset.cpython-38.pyc
Normal file
BIN
__pycache__/dataset.cpython-38.pyc
Normal file
Binary file not shown.
BIN
__pycache__/model_numpy.cpython-38.pyc
Normal file
BIN
__pycache__/model_numpy.cpython-38.pyc
Normal file
Binary file not shown.
BIN
__pycache__/train.cpython-38.pyc
Normal file
BIN
__pycache__/train.cpython-38.pyc
Normal file
Binary file not shown.
@@ -13,7 +13,7 @@ MAX_SEQ_LEN = 100 # 句子最大长度(词数)
|
|||||||
VECTORIZER_TYPE = 'tfidf' # 'tfidf' 或 'bow'(向量化方式)
|
VECTORIZER_TYPE = 'tfidf' # 'tfidf' 或 'bow'(向量化方式)
|
||||||
|
|
||||||
# ==================== 模型相关 ====================
|
# ==================== 模型相关 ====================
|
||||||
MODEL_TYPE = 'mlp' # 'mlp' 或 'lr'(模型类型)
|
MODEL_TYPE = 'lr' # 'mlp' 或 'lr'(模型类型)
|
||||||
HIDDEN_SIZE = 64 # MLP隐藏层大小(LR忽略)
|
HIDDEN_SIZE = 64 # MLP隐藏层大小(LR忽略)
|
||||||
NUM_CLASSES = 2 # 类别数(正面/负面二分类)
|
NUM_CLASSES = 2 # 类别数(正面/负面二分类)
|
||||||
KEEP_PROB = 1.0 # Dropout保留概率(LR忽略,设为1即可)
|
KEEP_PROB = 1.0 # Dropout保留概率(LR忽略,设为1即可)
|
||||||
@@ -27,8 +27,8 @@ BATCH_SIZE = 64 # 批次大小
|
|||||||
USE_CLASS_WEIGHT = True # True=启用类别权重, False=不启用(对比用)
|
USE_CLASS_WEIGHT = True # True=启用类别权重, False=不启用(对比用)
|
||||||
# 权重计算公式: n_samples / (n_classes * n_class_i)
|
# 权重计算公式: n_samples / (n_classes * n_class_i)
|
||||||
# 正面评论多所以权重小,负面评论少所以权重大
|
# 正面评论多所以权重小,负面评论少所以权重大
|
||||||
CLASS_WEIGHT_POS = 0.73 # 正面类权重(自动计算)
|
CLASS_WEIGHT_POS = 0.88 # 正面类权重(自动计算)
|
||||||
CLASS_WEIGHT_NEG = 1.58 # 负面类权重(自动计算)
|
CLASS_WEIGHT_NEG = 1.5 # 负面类权重(自动计算)
|
||||||
|
|
||||||
# ==================== 实验相关 ====================
|
# ==================== 实验相关 ====================
|
||||||
RUN_COMPARISON = False # True=运行对比实验, False=运行单个模型
|
RUN_COMPARISON = False # True=运行对比实验, False=运行单个模型
|
||||||
|
|||||||
7767
data/ChnSentiCorp/ChnSentiCorp_htl_all.csv
Normal file
7767
data/ChnSentiCorp/ChnSentiCorp_htl_all.csv
Normal file
File diff suppressed because one or more lines are too long
BIN
model_lr_tfidf_weighted_0430_153735_W.npy
Normal file
BIN
model_lr_tfidf_weighted_0430_153735_W.npy
Normal file
Binary file not shown.
BIN
model_lr_tfidf_weighted_0430_153735_b.npy
Normal file
BIN
model_lr_tfidf_weighted_0430_153735_b.npy
Normal file
Binary file not shown.
BIN
model_lr_tfidf_weighted_0430_154116_W.npy
Normal file
BIN
model_lr_tfidf_weighted_0430_154116_W.npy
Normal file
Binary file not shown.
BIN
model_lr_tfidf_weighted_0430_154116_b.npy
Normal file
BIN
model_lr_tfidf_weighted_0430_154116_b.npy
Normal file
Binary file not shown.
BIN
model_lr_tfidf_weighted_0430_154315_W.npy
Normal file
BIN
model_lr_tfidf_weighted_0430_154315_W.npy
Normal file
Binary file not shown.
BIN
model_lr_tfidf_weighted_0430_154315_b.npy
Normal file
BIN
model_lr_tfidf_weighted_0430_154315_b.npy
Normal file
Binary file not shown.
BIN
model_lr_tfidf_weighted_0430_154857_W.npy
Normal file
BIN
model_lr_tfidf_weighted_0430_154857_W.npy
Normal file
Binary file not shown.
BIN
model_lr_tfidf_weighted_0430_154857_b.npy
Normal file
BIN
model_lr_tfidf_weighted_0430_154857_b.npy
Normal file
Binary file not shown.
BIN
model_mlp_tfidf_weighted_0430_145748_W1.npy
Normal file
BIN
model_mlp_tfidf_weighted_0430_145748_W1.npy
Normal file
Binary file not shown.
BIN
model_mlp_tfidf_weighted_0430_145748_W2.npy
Normal file
BIN
model_mlp_tfidf_weighted_0430_145748_W2.npy
Normal file
Binary file not shown.
BIN
model_mlp_tfidf_weighted_0430_145748_b1.npy
Normal file
BIN
model_mlp_tfidf_weighted_0430_145748_b1.npy
Normal file
Binary file not shown.
BIN
model_mlp_tfidf_weighted_0430_145748_b2.npy
Normal file
BIN
model_mlp_tfidf_weighted_0430_145748_b2.npy
Normal file
Binary file not shown.
BIN
model_mlp_tfidf_weighted_0430_145842_W1.npy
Normal file
BIN
model_mlp_tfidf_weighted_0430_145842_W1.npy
Normal file
Binary file not shown.
BIN
model_mlp_tfidf_weighted_0430_145842_W2.npy
Normal file
BIN
model_mlp_tfidf_weighted_0430_145842_W2.npy
Normal file
Binary file not shown.
BIN
model_mlp_tfidf_weighted_0430_145842_b1.npy
Normal file
BIN
model_mlp_tfidf_weighted_0430_145842_b1.npy
Normal file
Binary file not shown.
BIN
model_mlp_tfidf_weighted_0430_145842_b2.npy
Normal file
BIN
model_mlp_tfidf_weighted_0430_145842_b2.npy
Normal file
Binary file not shown.
Reference in New Issue
Block a user