From 92bc054265dde216b61395be1208c2461c6c8bef Mon Sep 17 00:00:00 2001 From: haotian <2421912570@qq.com> Date: Tue, 8 Apr 2025 10:53:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9--=E6=95=B0=E6=8D=AE=E9=9B=86?= =?UTF-8?q?=E5=88=92=E5=88=86=E6=97=B6=E5=8F=AF=E4=BB=A5=E8=AE=BE=E5=AE=9A?= =?UTF-8?q?=E9=9A=8F=E6=9C=BA=E7=A7=8D=E5=AD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/config.yaml | 2 +- doc/各领域应用(附带数据集).txt | 10 ++++++++++ function/data_manager.py | 5 +++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/config/config.yaml b/config/config.yaml index 9d11c9b..e2bb86e 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -16,7 +16,7 @@ dataset: model: save_dir: "models" batch_size: 32 - num_workers: 4 + num_workers: 1 # 系统监控配置 monitor: diff --git a/doc/各领域应用(附带数据集).txt b/doc/各领域应用(附带数据集).txt index c37cd89..5523c48 100644 --- a/doc/各领域应用(附带数据集).txt +++ b/doc/各领域应用(附带数据集).txt @@ -30,6 +30,16 @@ 测试集真值: 暂无 注: 不同训练集文件对应不同的现场情况, 不要混用. + 测试结果: + train_FD001.txt + 训练集: + mae: 16.xx + 验证集: + mae: 30.xx + 结果分析: + 对于存在时序信息的数据,只用随机森林来拟合,效果不好. + 虽然数据有26列特征,但有的数据完全一致根本没有参考价值. + 2.能源行业-风电功率预测 (1)基于天气与历史数据预测风力发电量 (2)XGBoost,LSTM,Prophet时间序列模型 diff --git a/function/data_manager.py b/function/data_manager.py index cb987de..6be6719 100644 --- a/function/data_manager.py +++ b/function/data_manager.py @@ -424,7 +424,8 @@ class DataManager: self, df: pd.DataFrame, test_size: float = 0, - val_size: float = 0 + val_size: float = 0, + random_state: int = 42 ) -> Tuple[pd.DataFrame, pd.DataFrame, pd.DataFrame]: """划分数据集""" try: @@ -433,7 +434,7 @@ class DataManager: train_val_data, test_data = train_test_split( df, test_size=test_size, - random_state=42 + random_state=random_state ) else: train_val_data = df