• 大小: 3KB
    文件类型: .m
    金币: 1
    下载: 0 次
    发布日期: 2021-05-12
  • 语言: Matlab
  • 标签: 神经网络  BP  

资源简介

代码通过MATLAB实现了电力负荷预测,代码使用BP网络模型

资源截图

代码片段和文件信息

%输入向量是一个15维的向量,每隔两个小时对电力负荷做一次测量,一天共有12组数据,加上最高气温、最低气温以及天气特征值(晴天0、阴天0.5、雨天1)
P=[0.2452 0.1466 0.1314 0.2243 0.5523 0.6642 0.7015 0.6981 0.6821 0.6945 0.7549 0.8215 0.2415...
   0.3027 0;
   0.2217 0.1581 0.1408 0.2304 0.5134 0.5312 0.6819 0.7125 0.7265 0.6847 0.7826 0.8325 0.2385...
   0.3125 0;
   0.2525 0.1627 0.1507 0.2406 0.5502 0.5636 0.7051 0.7352 0.7459 0.7015 0.8064 0.8156 0.2216...
   0.2701 1;
   0.2016 0.1105 0.1243 0.1978 0.5021 0.5232 0.6819 0.6952 0.7015 0.6825 0.7825 0.7895 0.2352...
   0.2506 0.5;
   0.2115 0.1201 0.1312 0.2019 0.5532 0.5736 0.7029 0.7032 0.7189 0.7019 0.7965 0.8025 0.2542...
   0.3125 0;
   0.2335 0.1322 0.1534 0.2214 0.5623 0.5827 0.7198 0.7276 0.7359 0.7506 0.8092 0.8221 0.2601...
   0.3198 0;
   0.2368 0.1432 0.1653 0.2205 0.5823 0.5971 0.7136 0.7129 0.7263 0.7153 0.8091 0.8217 0.2579...
   0.3099 0;
   0.2342 0.1368 0.1602 0.2131 0.5726 0.5822 0.7101 0.7098 0.7127 0.7121 0.7995 0.8126 0.2301...
   0.2857 0.5;
   0.2113 0.1212 0.1305 0.1819 0.4952 0.5312 0.6886 0.6898 0.6999 0.7323 0.7721 0.7956 0.2234...
   0.2799 1;
   0.2005 0.1121 0.1207 0.1605 0.4556 0.5022 0.6553 0.6673 0.6798 0.7023 0.7521 0.7756 0.2314...
   0.2977 0]‘;%P为输入向量,T为目标向量
T=[0.2217 0.1581 0.1408 0.2304 0.5134 0.5312 0.6819 0.7125 0.7265 0.6847 0.7826 0.8325;
   0.2525 0.1627 0.1507 0.2406 0.5502 0.5636 0.7051 0.7352 0.7459 0.7015 0.8064 0.8156;
   0.2016 0.1105 0.1243 0.1978 

评论

共有 条评论