1 Star 3 Fork 0

guox66 / wind_prediction

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

风场短期预测

对风场数据进行预处理,多元线性回归分析,并使用LSTM、CNN+LSTM、Seq2Seq对风场进行短期预测,数据保存在database文件夹的csv文件中

分析和预测结果已经上传至analysis和result中

环境部署

首先需安装 python>=3.10.2,然后安装torch>=2.1.1,torchaudio>=2.1.1 torchvision>=0.16.1

在有nvidia服务的设备上,使用以下命令安装

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

在没有nvidia服务的设备上,使用以下命令安装

pip3 install torch torchvision torchaudio

安装后可使用以下命令依次查看torch,cuda版本

python -c "import torch;print(torch.__version__);print(torch.version.cuda)"

安装其他环境依赖

pip install -r requirements.txt

数据处理

数据已经保存在database文件夹的csv文件中,数据来源:https://www.industrial-bigdata.com

--wind_prediction
    --database
        --2019-01-01.csv
        --2019-01-02.csv
        ...
        --2019-01-10.csv

运行数据处理程序,处理过程保存在analysis文件夹中,处理后的数据将保存在analysis-data.npz中

python deal.py

多元线性回归分析

经过数据处理步骤,用matlab运行Linear.m文件即可

模型训练

模型可选择 LSTM 、 CNN_LSTM 、 Seq2Seq 输出可选x 、y ,训练得到的模型保存在models文件夹中

python train.py --model LSTM --output x --epochs 50 --batch_size 128 --val_rate 0.2 --test_rate 0.1 --lr 0.001 --step_size 1 --gamma 0.95 --hidden_size 256 --num_layers 1

模型测试

python t_model.py --model LSTM --output x

训练过程和测试结果均保存在result文件夹中

空文件

简介

该项目用于短期风场预测 展开 收起
Python 等 2 种语言
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/guox66/wind_prediction.git
git@gitee.com:guox66/wind_prediction.git
guox66
wind_prediction
wind_prediction
main

搜索帮助