{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "C:\\Users\\asus\\AppData\\Roaming\\Python\\Python39\\site-packages\\pandas\\core\\computation\\expressions.py:21: UserWarning: Pandas requires version '2.8.4' or newer of 'numexpr' (version '2.8.3' currently installed).\n", " from pandas.core.computation.check import NUMEXPR_INSTALLED\n", "C:\\Users\\asus\\AppData\\Roaming\\Python\\Python39\\site-packages\\pandas\\core\\arrays\\masked.py:60: UserWarning: Pandas requires version '1.3.6' or newer of 'bottleneck' (version '1.3.5' currently installed).\n", " from pandas.core import (\n" ] } ], "source": [ "from math import sqrt\n", "from numpy import concatenate\n", "from matplotlib import pyplot\n", "import pandas as pd\n", "import numpy as np\n", "from sklearn.preprocessing import MinMaxScaler\n", "from sklearn.preprocessing import LabelEncoder\n", "from sklearn.metrics import mean_squared_error\n", "from tensorflow.keras import Sequential\n", "\n", "from tensorflow.keras.layers import Dense\n", "from tensorflow.keras.layers import LSTM\n", "from tensorflow.keras.layers import Dropout\n", "from sklearn.model_selection import train_test_split\n", "import matplotlib.pyplot as plt" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [], "source": [ "# 加载数据\n", "path1 = r\"D:\\project\\小论文1-基于ICEEMDAN分解的时序高维变化的短期光伏功率预测模型\\CEEMAN-PosConv1dbiLSTM-LSTM\\模型代码流程\\完整的模型代码流程\\低频_forecast.csv\"#数据所在路径\n", "#我的数据是excel表,若是csv文件用pandas的read_csv()函数替换即可。\n", "f_low= pd.DataFrame(pd.read_csv(path1))" ] }, { "cell_type": "code", "execution_count": 25, "metadata": {}, "outputs": [], "source": [ "# 加载数据\n", "path2 = r\"D:\\project\\小论文1-基于ICEEMDAN分解的时序高维变化的短期光伏功率预测模型\\CEEMAN-PosConv1dbiLSTM-LSTM\\模型代码流程\\完整的模型代码流程\\高频re_forecast.csv\"#数据所在路径\n", "#我的数据是excel表,若是csv文件用pandas的read_csv()函数替换即可。\n", "f_high= pd.DataFrame(pd.read_csv(path2))" ] }, { "cell_type": "code", "execution_count": 30, "metadata": {}, "outputs": [], "source": [ "path3= r\"D:\\project\\小论文1-基于ICEEMDAN分解的时序高维变化的短期光伏功率预测模型\\CEEMAN-PosConv1dbiLSTM-LSTM\\模型代码流程\\完整的模型代码流程\\低频_test.csv\"#数据所在路径\n", "#我的数据是excel表,若是csv文件用pandas的read_csv()函数替换即可。\n", "true_low= pd.DataFrame(pd.read_csv(path3))" ] }, { "cell_type": "code", "execution_count": 31, "metadata": {}, "outputs": [], "source": [ "path4= r\"D:\\project\\小论文1-基于ICEEMDAN分解的时序高维变化的短期光伏功率预测模型\\CEEMAN-PosConv1dbiLSTM-LSTM\\模型代码流程\\完整的模型代码流程\\高频re_test.csv\"#数据所在路径\n", "#我的数据是excel表,若是csv文件用pandas的read_csv()函数替换即可。\n", "true_high= pd.DataFrame(pd.read_csv(path4))" ] }, { "cell_type": "code", "execution_count": 32, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | column_name | \n", "
---|---|
0 | \n", "2.104709 | \n", "
1 | \n", "2.144592 | \n", "
2 | \n", "1.375800 | \n", "
3 | \n", "1.751718 | \n", "
4 | \n", "1.977364 | \n", "
... | \n", "... | \n", "
20826 | \n", "0.012646 | \n", "
20827 | \n", "0.012262 | \n", "
20828 | \n", "0.011389 | \n", "
20829 | \n", "0.014322 | \n", "
20830 | \n", "0.011895 | \n", "
20831 rows × 1 columns
\n", "\n", " | column_name | \n", "
---|---|
0 | \n", "2.186333e+00 | \n", "
1 | \n", "1.377467e+00 | \n", "
2 | \n", "1.452000e+00 | \n", "
3 | \n", "1.846867e+00 | \n", "
4 | \n", "2.793334e+00 | \n", "
... | \n", "... | \n", "
20826 | \n", "6.661338e-16 | \n", "
20827 | \n", "0.000000e+00 | \n", "
20828 | \n", "2.220446e-16 | \n", "
20829 | \n", "2.220446e-16 | \n", "
20830 | \n", "4.440892e-16 | \n", "
20831 rows × 1 columns
\n", "