diff --git a/Reports/Thesis/sections/background.aux b/Reports/Thesis/sections/background.aux index 14fb6a4..559138d 100644 --- a/Reports/Thesis/sections/background.aux +++ b/Reports/Thesis/sections/background.aux @@ -14,8 +14,8 @@ \newlabel{tab:imbalance_price}{{2}{6}{Prices paid by the BRPs\relax }{table.caption.2}{}} \@writefile{toc}{\contentsline {section}{\numberline {3}Generative modeling}{7}{section.3}\protected@file@percent } \@writefile{toc}{\contentsline {subsection}{\numberline {3.1}Quantile Regression}{7}{subsection.3.1}\protected@file@percent } -\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Example of quantiles\relax }}{8}{figure.caption.3}\protected@file@percent } -\newlabel{fig:quantile_example}{{1}{8}{Example of quantiles\relax }{figure.caption.3}{}} +\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Example of a cumulative distribution function and some quantiles. The quantiles are the values below which a certain proportion of observations fall.\relax }}{8}{figure.caption.3}\protected@file@percent } +\newlabel{fig:quantile_example}{{1}{8}{Example of a cumulative distribution function and some quantiles. The quantiles are the values below which a certain proportion of observations fall.\relax }{figure.caption.3}{}} \@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces Example of quantile regression output for one-quarter of the NRV, showing interpolated values for quantiles at 1\%, 5\%, 10\%, 15\%, 30\%, 40\%, 50\%, 60\%, 70\%, 85\%, 90\%, 95\%, and 99\%. These quantiles are used to reconstruct the cumulative distribution function.\relax }}{9}{figure.caption.4}\protected@file@percent } \newlabel{fig:quantile_regression_example}{{2}{9}{Example of quantile regression output for one-quarter of the NRV, showing interpolated values for quantiles at 1\%, 5\%, 10\%, 15\%, 30\%, 40\%, 50\%, 60\%, 70\%, 85\%, 90\%, 95\%, and 99\%. These quantiles are used to reconstruct the cumulative distribution function.\relax }{figure.caption.4}{}} \@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Autoregressive vs Non-Autoregressive models}{10}{subsection.3.2}\protected@file@percent } @@ -31,7 +31,7 @@ \@writefile{lof}{\contentsline {figure}{\numberline {4}{\ignorespaces Example of the diffusion process. The image of a cat is generated by starting from noise and iteratively denoising the image.\relax }}{14}{figure.caption.6}\protected@file@percent } \newlabel{fig:diffusion_example}{{4}{14}{Example of the diffusion process. The image of a cat is generated by starting from noise and iteratively denoising the image.\relax }{figure.caption.6}{}} \@writefile{toc}{\contentsline {subsubsection}{\numberline {3.4.3}Generation process}{14}{subsubsection.3.4.3}\protected@file@percent } -\newlabel{fig:diffusion_process}{{\caption@xref {fig:diffusion_process}{ on input line 298}}{16}{Generation process}{figure.caption.7}{}} +\newlabel{fig:diffusion_process}{{\caption@xref {fig:diffusion_process}{ on input line 309}}{16}{Generation process}{figure.caption.7}{}} \@writefile{toc}{\contentsline {subsection}{\numberline {3.5}Evaluation}{16}{subsection.3.5}\protected@file@percent } \@writefile{lof}{\contentsline {figure}{\numberline {5}{\ignorespaces Visualization of the CRPS metric\relax }}{17}{figure.caption.8}\protected@file@percent } \newlabel{fig:crps_visualization}{{5}{17}{Visualization of the CRPS metric\relax }{figure.caption.8}{}} diff --git a/Reports/Thesis/sections/background.tex b/Reports/Thesis/sections/background.tex index c9f84b6..c46b6bb 100644 --- a/Reports/Thesis/sections/background.tex +++ b/Reports/Thesis/sections/background.tex @@ -100,11 +100,13 @@ TODO: Add more information about the imbalance price calculation, alpha? Given the bids of the BSPs for a certain quarter or day and knowing System Imbalance, the imbalance price can be reconstructed using the calculation provided by Elia. During this thesis, the system imbalance is assumed to be almost the same as the Net Regulation Volume. This is a simplification but it is a good approximation. The goal of this thesis is to model the Net Regulation Volume which can then be used to reconstruct the imbalance price and to make decisions on when to buy or sell electricity. \section{Generative modeling} -Simple forecasting of the NRV is often not accurate and defining a policy using this forecast will lead to wrong decisions. A better method would be to try to model the NRV and sample multiple generations of the NRV for a whole day. This can give a better understanding of the uncertainty of the NRV. Better decisions can then be made based on multiple generations of the NRV. +Forecasting the imbalance price is a difficult task. The price is influenced by many different factors like the weather, time of day, ... but also by the formulas used by the TSO to calculate the imbalance price. The formulas can change which results in a different imbalance price distribution. This makes it hard to train a model to forecast the imbalance price using historical data. Another method to forecast the imbalance price is to forecast the Net Regulation Volume (NRV) and then use the formulas provided by the TSO to calculate the imbalance price. This way, the model does not need to learn the imbalance price distribution but only the NRV distribution. -Generative modeling is a type of machine learning that is used to generate new data samples that look like the training data. The goal of generative modeling is to learn the true data distribution and use this distribution to generate new samples. Generative modeling is used in many different fields including image generation, text generation etc. +Another problem occurs when just forecasting the NRV. Forecasting a time series is a difficult task because of the uncertainty in the data and the many different factors that can influence the data. Simple forecasting of the NRV is often not accurate and defining a policy using this forecast will lead to wrong decisions. A better method would be to try to model the NRV and sample multiple full-day generations of the NRV. This can give a better understanding of the uncertainty of the NRV. Better decisions can then be made based on multiple generations of the NRV. -In this thesis, generative modeling can be used to model the NRV of the Belgian electricity market using different conditional input features like the weather, the load forecast etc. The model can then be used to generate new samples of the NRV. +Generative modeling is a type of machine learning that is used to generate new data samples that look like the training data. The goal of generative modeling is to learn the true data distribution and use this distribution to generate new samples. Generative modeling is used in many different fields including image generation, text generation, audio generation etc. + +In this thesis, generative modeling can be used to model the NRV of the Belgian electricity market using different conditional input features like the weather, the load forecast etc. The model can then be used to generate new full-day generations of the NRV that can be used to make better decisions on when to buy or sell electricity. There exist many different types of generative models. Some of the most popular ones are: \begin{itemize} @@ -115,18 +117,21 @@ There exist many different types of generative models. Some of the most popular \end{itemize} \subsection{Quantile Regression} -Another method can be used to use any feedforward neural network as a generative model. This method is called quantile regression. This method enables the model to output values to reconstruct the distribution of the target variable instead of a single value for a quarter. This distribution can then be used to sample the NRV value for a quarter. The sampling allows for multiple full-day generations of the NRV. +Any feedforward neural network can also be used to output distributions for the target values. For example, if the distribution is assumed to be normal, the model can output the mean and the variance of the target value. This way, the model can output a distribution for the target value instead of a single forecast value. The outputted distribution allows for multiple samples to be drawn from the distribution. This can be used to generate multiple full-day generations of the NRV. -When quantile regression is used, the model outputs the values for multiple quantiles for the target value of a certain quarter. A quantile is a statistical value of a random variable below which a certain proportion of observations fall. Figure \ref{fig:quantile_example} shows the cumulative distribution function of a normal distribution. The figure shows the 25th, 50th and 75th quantiles. The 25th quantile is the value below which 25\% of the observations fall. In the example, this value is -0.67. The other quantiles work in the same way. +This method requires that the distributions of the target values be known in advance, or at least assumed. However, it is common for these distributions to be unknown. Fortunately, there is an alternative approach that can estimate the distribution of the target values without prior knowledge of the distribution. This technique is known as quantile regression. + +Quantile regression is a method that uses feedforward neural networks to estimate multiple quantiles of the target values. A quantile is a statistical value of a random variable below which a certain proportion of observations fall. For example, the 25th quantile is the value below which 25\% of the observations fall. By estimating multiple quantiles using quantile regression, the distribution of the target values can be reconstructed. For each quarter of the day, the quantiles of the NRV are estimated by the model and used to reconstruct the distributions of the NRV. For each quarter of the day, a distribution can be reconstructed and samples can be drawn from this distribution. This way, multiple full-day generations of the NRV can be generated. \begin{figure}[H] \centering \includegraphics[width=0.8\textwidth]{images/quantile_regression/cdf_quantiles_example.png} - \caption{Example of quantiles} + \caption{Example of a cumulative distribution function and some quantiles. The quantiles are the values below which a certain proportion of observations fall.} \label{fig:quantile_example} \end{figure} -Using the outputted quantiles, the cumulative distribution function can be reconstructed and used to sample the NRV value for the quarter to predict. An example of the output of a quantile regression model is shown in figure \ref{fig:quantile_regression_example}. The output values of the different quantiles are plotted and these are interpolated to get the cumulative distribution function. In this thesis, the quantiles used are 1\%, 5\%, 10\%, 15\%, 30\%, 40\%, 50\%, 60\%, 70\%, 85\%, 90\%, 95\%, and 99\%. These are chosen to get a good approximation of the cumulative distribution function. More quantiles at the tails of the distribution are used because the edges of the distribution are more important for the imbalance price calculation. The outputted quantile values are then interpolated using cubic spline and samples can be drawn from the reconstructed cumulative distribution function. +The model outputs quantiles that can be used to reconstruct the cumulative distribution function of a target NRV value. This distribution can then be used to sample the NRV value for a quarter. An example of the output of a quantile regression model is shown in figure \ref{fig:quantile_regression_example}. The output values of the different quantiles are plotted and interpolated to get the cumulative distribution function. In this thesis, the quantiles used are 1\%, 5\%, 10\%, 15\%, 30\%, 40\%, 50\%, 60\%, 70\%, 85\%, 90\%, 95\%, and 99\%. These are chosen to get a good approximation of the cumulative distribution function. More quantiles at the tails of the distribution are used because the edges of the distribution are more important for the imbalance price calculation. +% TODO: edges important? TODO: figure goes under 0, maybe use other values or other interpolation? + inverse the values to real values \begin{figure}[H] @@ -138,7 +143,7 @@ TODO: figure goes under 0, maybe use other values or other interpolation? + inve The NRV value for a quarter can be sampled from the reconstructed cumulative distribution function. A full-day prediction for the NRV exists of 96 values. This means 96 cumulative distributions need to be reconstructed and samples need to be drawn from each of the distributions. -The quantile regression model is trained using the pinball loss function, also known as the quantile loss. The model outputs the quantile values for the NRV. The quantile values themselves are not available in the training data. Only the real NRV values are known. The loss function is defined as: +The model needs to learn the quantiles of the NRV values. These, however, are not available in the training data. Only the historical NRV values are known. A special loss function is needed to train the model to output the quantiles of the NRV values. This loss function is called the pinball loss function. The loss function is defined as: \\ \begin{equation} L_\tau(y, \hat{y}) = \begin{cases} \tau(y - \hat{y}) & \text{if } y \geq \hat{y} \\ @@ -151,7 +156,8 @@ The quantile regression model is trained using the pinball loss function, also k y & = \text{Actual observed value of NRV} \\ \hat{y} & = \text{Predicted quantile value of NRV} \\ \end{align*} -The loss function works by penalizing underestimation and overestimation differently. When a quantile is predicted that is lower than or equal to the actual value, the loss is calculated as the difference between the actual value and the predicted quantile value multiplied by the quantile of interest. This means that underestimations for high quantiles are penalized higher than for lower quantiles. + +The loss function works by penalizing underestimation and overestimation of the quantile predictions differently. When a predicted quantile is lower than or equal to the actual value, the loss is calculated as the difference between the actual value and the predicted quantile value multiplied by the quantile of interest. This implies that the underestimations for high quantiles are penalized more heavily than for lower quantiles, as $\tau$ is larger for higher quantiles. When the quantile value prediction is higher than the real NRV value, the loss is calculated as the difference between the predicted quantile value and the real NRV multiplied by $(1-\tau)$. This means that overestimations are penalized less for high quantiles of interest. @@ -167,16 +173,21 @@ When the quantile value prediction is higher than the real NRV value, the loss i \hat{y}_i & = \text{Predicted quantile value of NRV for sample i} \\ \end{align*} -To calculate the pinball loss, the mean over the quantiles of interest and samples need to be taken. This gives a scalar loss value which can be used to do backpropagation. The lower this value, the better the NRV distribution is modeled. +To calculate the pinball loss, the mean is taken over the quantiles of interest and the samples. This results in a scalar loss value that can be used for backpropagation. A lower pinball loss indicates a better modeling of the NRV distribution. \subsection{Autoregressive vs Non-Autoregressive models} -Two types of generative models exist, autoregressive and non-autoregressive models. Autoregressive models generate samples by sampling from the model one step at a time. The model generates the next value based on the previous values. This means that the model generates samples sequentially. Non-autoregressive models on the other hand generate samples in one step. The model generates the whole sample existing of multiple values at once. This means that the model can generate samples in parallel which can be done way faster than autoregressive models. The downside of non-autoregressive models is that the model itself is more complex and harder to train. It needs to predict all values at once which can be harder than predicting one value at a time. -The quantile regression method can be used with both types of models. The autoregressive model will only output the quantiles for the next quarter based on the given input features. The cumulative distribution function can be reconstructed from these and be used to sample the NRV value. To obtain a full-day sample, the model needs to be run 96 times sequentially. The sample for the next quarter depends on the sample of the previous quarter. +Generative models can be broadly classified into two types: autoregressive and non-autoregressive models. -The non-autoregressive model will output the quantiles for all quarters of the day based on the input features. The cumulative distribution functions all need to be reconstructed and samples can be drawn from each of the distributions. When sampling from the distributions at once, the samples are independent of each other. The sample for the next quarter does not depend on the sample of the previous quarter which can result in some unrealistic samples. +Autoregressive models generate samples sequentially, one step at a time. At each step, the model generates the next value based on the previously generated values. This sequential process ensures that the dependencies between values are naturally captured, but it also results in slower sample generation, as each value must be generated in order. -The input features for autoregressive and non-autoregressive also differ. When forecasted features are used, the autoregressive model only uses the forecasted values for the next quarter while the non-autoregressive model uses the forecasted values for all quarters of the day. In theory, the autoregressive model should also be able to use forecasted values for quarters further in the future but this makes it harder to use in practice. When the last quarter of a day needs to be predicted, the forecasted values for the next day are needed which are not available. For simplicity, during this thesis, the autoregressive model will only be provided with the forecasted values for the next quarter. +Non-autoregressive models, in contrast, generate the entire sample in a single step. Instead of generating values sequentially, these models produce all the values of the sample simultaneously, allowing for parallel generation. This significantly speeds up the sample generation process compared to autoregressive models. However, the complexity of non-autoregressive models is higher, making them more challenging to train. These models must accurately predict all values of the sample at once, which can be more difficult than predicting one value at a time. + +Quantile regression can be applied to both types of models. For autoregressive models, the model outputs the quantiles for the next time step based on the given input features. From these quantiles, the cumulative distribution function (CDF) can be reconstructed and used to sample the NRV value. To obtain a full-day sample, the model needs to run sequentially for each quarter-hour, resulting in 96 iterations per day. Each sample for the next quarter depends on the sample of the previous quarter. + +For non-autoregressive models, the model outputs the quantiles for all quarters of the day simultaneously based on the input features. The CDFs for each quarter are reconstructed, and samples are drawn from these distributions. Since the samples are generated in parallel, they are independent of each other. This independence can sometimes lead to unrealistic samples, as the sample for the next quarter does not depend on the sample of the previous quarter. + +The input features for autoregressive and non-autoregressive models also differ. When using forecasted features, the autoregressive model utilizes forecasted values for the next quarter only, while the non-autoregressive model uses forecasted values for all quarters of the day. Although, in theory, the autoregressive model could use forecasted values for further future quarters, this complicates practical application. For instance, predicting the last quarter of a day would require forecasted values for the next day, which may not be available. Therefore, in this thesis, the autoregressive model is provided only with forecasted values for the next quarter to simplify the approach. \subsection{Model Types} \subsubsection{Linear Model} diff --git a/Reports/Thesis/sections/results/policies/nrv_samples_policy.tex b/Reports/Thesis/sections/results/policies/nrv_samples_policy.tex index 338e051..5a92e1a 100644 --- a/Reports/Thesis/sections/results/policies/nrv_samples_policy.tex +++ b/Reports/Thesis/sections/results/policies/nrv_samples_policy.tex @@ -1,14 +1,16 @@ \subsection{Policy using generated NRV samples} The generated full-day samples can be used to improve the profit of the policy. For each day, the generated samples can be used to determine the buying and selling thresholds. Assume that there are 100 generated full-day NRV samples for the day for which the profit needs to be optimized. The thresholds are determined for each generated sample separately using a simple grid search. All these thresholds can then be reduced by taking the mean to get one value for the buying threshold and one value for the selling threshold. Again, the penalty parameter is optimized for the test set to make sure around 283 charge cycles are used for fair comparison. The policy is evaluated for the different types of models that were trained and discussed in the previous sections. To reduce the computational cost, the policy is only evaluated for the best-performing models based on the CRPS metric. -\begin{table} +\begin{table}[ht] \centering \begin{adjustbox}{max width=\textwidth} \begin{tabular}{lcccccc} \toprule Model & Type & CRPS & Profit (€) & Charge Cycles & Penalty \\ \midrule - \acs{AQR} & Non-Linear & & 189,717.74 & 282.06 & 566.4 \\ + \acs{AQR} & Non-Linear & 79.22 & 189,717.74 & 282.06 & 566.4 \\ + \acs{AQR} & GRU & 80.92 & 188,973.84 & 283.06 & 536.06 \\ + Diffusion & Non-Linear & 80.30 & 191,553.58 & 282.56 & 553.38 \\ \bottomrule \end{tabular} \end{adjustbox} diff --git a/Reports/Thesis/verslag 11.synctex.gz b/Reports/Thesis/verslag 11.synctex.gz index 56a3f19..aa2b1cf 100644 Binary files a/Reports/Thesis/verslag 11.synctex.gz and b/Reports/Thesis/verslag 11.synctex.gz differ diff --git a/Reports/Thesis/verslag 12.synctex.gz b/Reports/Thesis/verslag 12.synctex.gz index e898648..aa2b1cf 100644 Binary files a/Reports/Thesis/verslag 12.synctex.gz and b/Reports/Thesis/verslag 12.synctex.gz differ diff --git a/Reports/Thesis/verslag.aux b/Reports/Thesis/verslag.aux index 1b8461b..1859b53 100644 --- a/Reports/Thesis/verslag.aux +++ b/Reports/Thesis/verslag.aux @@ -111,8 +111,6 @@ \@writefile{toc}{\contentsline {subsection}{\numberline {7.1}Baselines}{44}{subsection.7.1}\protected@file@percent } \ACRO{recordpage}{NRV}{45}{1}{44} \ACRO{recordpage}{NRV}{45}{1}{44} -\@writefile{lot}{\contentsline {table}{\numberline {12}{\ignorespaces Comparison of the different models using the profit metric. The best-performing models for a certain type are selected based on the profit.\relax }}{45}{table.caption.30}\protected@file@percent } -\newlabel{tab:policy_comparison}{{12}{45}{Comparison of the different models using the profit metric. The best-performing models for a certain type are selected based on the profit.\relax }{table.caption.30}{}} \ACRO{recordpage}{NRV}{46}{1}{45} \ACRO{recordpage}{NRV}{46}{1}{45} \ACRO{recordpage}{NRV}{46}{1}{45} @@ -123,6 +121,8 @@ \@writefile{lot}{\contentsline {table}{\numberline {11}{\ignorespaces Results of the baseline policies on the test set. \relax }}{45}{table.caption.29}\protected@file@percent } \newlabel{tab:fixed_thresholds}{{11}{45}{Results of the baseline policies on the test set. \relax }{table.caption.29}{}} \@writefile{toc}{\contentsline {subsection}{\numberline {7.2}Policy using generated NRV samples}{45}{subsection.7.2}\protected@file@percent } +\@writefile{lot}{\contentsline {table}{\numberline {12}{\ignorespaces Comparison of the different models using the profit metric. The best-performing models for a certain type are selected based on the profit.\relax }}{45}{table.caption.30}\protected@file@percent } +\newlabel{tab:policy_comparison}{{12}{45}{Comparison of the different models using the profit metric. The best-performing models for a certain type are selected based on the profit.\relax }{table.caption.30}{}} \abx@aux@page{6}{48} \abx@aux@page{7}{48} \abx@aux@page{8}{48} @@ -147,8 +147,6 @@ \ACRO{usage}{aFRR=={1}} \ACRO{usage}{mFRR=={1}} \ACRO{usage}{MW=={0}} -\ACRO{pages}{SI=={5@1@4}} -\ACRO{pages}{MW=={6@1@5}} \ACRO{pages}{BRP=={4@1@3}} \ACRO{pages}{TSO=={3@1@2|5@1@4}} \ACRO{pages}{FCR=={6@1@5}} diff --git a/Reports/Thesis/verslag.log b/Reports/Thesis/verslag.log index d74309b..c112019 100644 --- a/Reports/Thesis/verslag.log +++ b/Reports/Thesis/verslag.log @@ -1,4 +1,4 @@ -This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdflatex 2023.9.17) 13 MAY 2024 12:36 +This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdflatex 2023.9.17) 15 MAY 2024 16:18 entering extended mode restricted \write18 enabled. file:line:error style messages enabled. @@ -1413,62 +1413,71 @@ Underfull \hbox (badness 10000) in paragraph at lines 92--97 [] [6] -Overfull \hbox (4.77582pt too wide) in paragraph at lines 109--111 +Overfull \hbox (4.77582pt too wide) in paragraph at lines 111--113 []\T1/LinuxLibertineT-TLF/m/n/12 There ex-ist many dif-fer-ent types of gen-er-a-tive mod-els. Some of the most pop-u-lar ones are: [] LaTeX Font Info: Font shape `T1/LinuxBiolinumT-TLF/m/n' will be -(Font) scaled to size 14.4pt on input line 117. - +(Font) scaled to size 14.4pt on input line 119. +[7] + File: images/quantile_regression/cdf_quantiles_example.png Graphic file (type png) -Package pdftex.def Info: images/quantile_regression/cdf_quantiles_example.png used on input line 124. +Package pdftex.def Info: images/quantile_regression/cdf_quantiles_example.png used on input line 128. (pdftex.def) Requested size: 364.19667pt x 218.51653pt. -[7] - + File: images/quantile_regression/reconstructed_cdf.png Graphic file (type png) -Package pdftex.def Info: images/quantile_regression/reconstructed_cdf.png used on input line 134. +Package pdftex.def Info: images/quantile_regression/reconstructed_cdf.png used on input line 139. (pdftex.def) Requested size: 364.19667pt x 218.51653pt. [8 <./images/quantile_regression/cdf_quantiles_example.png>] +Underfull \hbox (badness 10000) in paragraph at lines 146--147 + + [] + LaTeX Font Info: Font shape `T1/LinuxLibertineT-TLF/m/n' will be -(Font) scaled to size 8.0pt on input line 144. +(Font) scaled to size 8.0pt on input line 149. LaTeX Font Info: Font shape `T1/LinuxLibertineT-TLF/m/n' will be -(Font) scaled to size 6.0pt on input line 144. - [9{/usr/local/texlive/2023/texmf-dist/fonts/enc/dvips/libertinust1math/libusMR.enc}{/usr/local/texlive/2023/texmf-dist/fonts/enc/dvips/libertinust1math/libusEX.enc}{/usr/local/texlive/2023/texmf-dist/fonts/enc/dvips/libertinust1math/libusSYM.enc} <./images/quantile_regression/reconstructed_cdf.png>] [10] [11] - +(Font) scaled to size 6.0pt on input line 149. +[9{/usr/local/texlive/2023/texmf-dist/fonts/enc/dvips/libertinust1math/libusMR.enc}{/usr/local/texlive/2023/texmf-dist/fonts/enc/dvips/libertinust1math/libusEX.enc}{/usr/local/texlive/2023/texmf-dist/fonts/enc/dvips/libertinust1math/libusSYM.enc} <./images/quantile_regression/reconstructed_cdf.png>] +Overfull \hbox (17.3759pt too wide) in paragraph at lines 180--181 +\T1/LinuxLibertineT-TLF/m/n/12 Generative mod-els can be broadly clas-si-fied into two types: au-tore-gres-sive and non-autoregressive + [] + +[10] [11] [12] + File: images/quantile_regression/rnn/RNN_diagram.png Graphic file (type png) -Package pdftex.def Info: images/quantile_regression/rnn/RNN_diagram.png used on input line 223. +Package pdftex.def Info: images/quantile_regression/rnn/RNN_diagram.png used on input line 234. (pdftex.def) Requested size: 364.19667pt x 156.63872pt. - [12] [13 <./images/quantile_regression/rnn/RNN_diagram.png>] - + [13 <./images/quantile_regression/rnn/RNN_diagram.png>] + File: images/diffusion/Generation-with-Diffusion-Models.png Graphic file (type png) -Package pdftex.def Info: images/diffusion/Generation-with-Diffusion-Models.png used on input line 251. +Package pdftex.def Info: images/diffusion/Generation-with-Diffusion-Models.png used on input line 262. (pdftex.def) Requested size: 364.19667pt x 90.05513pt. [14 <./images/diffusion/Generation-with-Diffusion-Models.png>] [15{/usr/local/texlive/2023/texmf-dist/fonts/enc/dvips/libertinust1math/libusBMR.enc}{/usr/local/texlive/2023/texmf-dist/fonts/enc/dvips/libertinust1math/libusBB.enc}] -Package caption Warning: \label without proper reference on input line 298. +Package caption Warning: \label without proper reference on input line 309. See the caption package documentation for explanation. -LaTeX Warning: Reference `fig:diffusion_process' on page 16 undefined on input line 291. +LaTeX Warning: Reference `fig:diffusion_process' on page 16 undefined on input line 302. - + File: images/diffusion/diffusion_graphical_model.png Graphic file (type png) -Package pdftex.def Info: images/diffusion/diffusion_graphical_model.png used on input line 295. +Package pdftex.def Info: images/diffusion/diffusion_graphical_model.png used on input line 306. (pdftex.def) Requested size: 364.19667pt x 69.03145pt. [16 <./images/diffusion/diffusion_graphical_model.png>] -LaTeX Font Info: Trying to load font information for U+bbm on input line 324. +LaTeX Font Info: Trying to load font information for U+bbm on input line 335. (/usr/local/texlive/2023/texmf-dist/tex/latex/bbm-macros/ubbm.fd File: ubbm.fd 1999/03/15 V 1.2 Font definition for bbm font - TH ) - + File: images/quantile_regression/crps_visualization.png Graphic file (type png) -Package pdftex.def Info: images/quantile_regression/crps_visualization.png used on input line 342. +Package pdftex.def Info: images/quantile_regression/crps_visualization.png used on input line 353. (pdftex.def) Requested size: 364.19667pt x 235.4849pt. ) [17 <./images/quantile_regression/crps_visualization.png>] \openout2 = `sections/policies.aux'. @@ -1492,7 +1501,7 @@ LaTeX Warning: Citation 'rasul_autoregressive_2021' on page 20 undefined on inpu ] (./sections/results/models/linear.tex [23] [24] - + File: images/quantile_regression/nrv_mean_std_over_quarter.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/nrv_mean_std_over_quarter.png used on input line 42. @@ -1502,44 +1511,44 @@ Package pdftex.def Info: images/quantile_regression/nrv_mean_std_over_quarter.pn LaTeX Warning: Reference `fig:autoregressive_linear_model_samples' on page 26 undefined on input line 81. [26 <./images/quantile_regression/nrv_mean_std_over_quarter.png>] - + File: images/quantile_regression/aqr_linear_model_samples/AQR_NRV_Load_Wind_PV_NP_QE-Sample_864.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/aqr_linear_model_samples/AQR_NRV_Load_Wind_PV_NP_QE-Sample_864.png used on input line 86. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. - + File: images/quantile_regression/naqr_linear_model_samples/NAQR_NRV_Load_Wind_PV_NP-Sample_864.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/naqr_linear_model_samples/NAQR_NRV_Load_Wind_PV_NP-Sample_864.png used on input line 90. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. - + File: images/quantile_regression/aqr_linear_model_samples/AQR_NRV_Load_Wind_PV_NP_QE-Sample_4320.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/aqr_linear_model_samples/AQR_NRV_Load_Wind_PV_NP_QE-Sample_4320.png used on input line 93. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. - + File: images/quantile_regression/naqr_linear_model_samples/NAQR_NRV_Load_Wind_PV_NP-Sample_4320.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/naqr_linear_model_samples/NAQR_NRV_Load_Wind_PV_NP-Sample_4320.png used on input line 97. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. - + File: images/quantile_regression/aqr_linear_model_samples/AQR_NRV_Load_Wind_PV_NP_QE-Sample_6336.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/aqr_linear_model_samples/AQR_NRV_Load_Wind_PV_NP_QE-Sample_6336.png used on input line 100. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. - + File: images/quantile_regression/naqr_linear_model_samples/NAQR_NRV_Load_Wind_PV_NP-Sample_6336.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/naqr_linear_model_samples/NAQR_NRV_Load_Wind_PV_NP-Sample_6336.png used on input line 104. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. - + File: images/quantile_regression/aqr_linear_model_samples/AQR_NRV_Load_Wind_PV_NP_QE-Sample_7008.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/aqr_linear_model_samples/AQR_NRV_Load_Wind_PV_NP_QE-Sample_7008.png used on input line 107. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. LaTeX Font Info: Font shape `T1/LinuxLibertineT-TLF/m/n' will be (Font) scaled to size 10.95pt on input line 108. - + File: images/quantile_regression/naqr_linear_model_samples/NAQR_NRV_Load_Wind_PV_NP-Sample_7008.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/naqr_linear_model_samples/NAQR_NRV_Load_Wind_PV_NP-Sample_7008.png used on input line 112. @@ -1554,104 +1563,104 @@ Underfull \hbox (badness 10000) in paragraph at lines 122--123 [] - + File: images/quantile_regression/aqr_linear_model_samples/AQR_NRV_Load_Wind_PV_NP-QE-Example_864_samples.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/aqr_linear_model_samples/AQR_NRV_Load_Wind_PV_NP-QE-Example_864_samples.png used on input line 127. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. - + File: images/quantile_regression/naqr_linear_model_samples/NAQR_NRV_Load_Wind_PV_NP-Example_864_samples.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/naqr_linear_model_samples/NAQR_NRV_Load_Wind_PV_NP-Example_864_samples.png used on input line 131. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. - + File: images/quantile_regression/aqr_linear_model_samples/AQR_NRV_Load_Wind_PV_NP-QE-Example_4320_samples.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/aqr_linear_model_samples/AQR_NRV_Load_Wind_PV_NP-QE-Example_4320_samples.png used on input line 134. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. - + File: images/quantile_regression/naqr_linear_model_samples/NAQR_NRV_Load_Wind_PV_NP-Example_4320_samples.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/naqr_linear_model_samples/NAQR_NRV_Load_Wind_PV_NP-Example_4320_samples.png used on input line 139. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. - + File: images/quantile_regression/quantile_performance/AQR_Quantile_Performance_Training.jpeg Graphic file (type jpg) Package pdftex.def Info: images/quantile_regression/quantile_performance/AQR_Quantile_Performance_Training.jpeg used on input line 151. (pdftex.def) Requested size: 223.07211pt x 153.94125pt. - + File: images/quantile_regression/quantile_performance/AQR_Quantile_Performance_Test.jpeg Graphic file (type jpg) Package pdftex.def Info: images/quantile_regression/quantile_performance/AQR_Quantile_Performance_Test.jpeg used on input line 156. (pdftex.def) Requested size: 223.07211pt x 153.94125pt. - + File: images/quantile_regression/quantile_performance/NAQR_Quantile_Performance_Training.jpeg Graphic file (type jpg) Package pdftex.def Info: images/quantile_regression/quantile_performance/NAQR_Quantile_Performance_Training.jpeg used on input line 161. (pdftex.def) Requested size: 223.07211pt x 153.94125pt. - + File: images/quantile_regression/quantile_performance/NAQR_Quantile_Performance_Test.jpeg Graphic file (type jpg) Package pdftex.def Info: images/quantile_regression/quantile_performance/NAQR_Quantile_Performance_Test.jpeg used on input line 166. (pdftex.def) Requested size: 223.07211pt x 153.94125pt. [28 <./images/quantile_regression/aqr_linear_model_samples/AQR_NRV_Load_Wind_PV_NP-QE-Example_864_samples.png> <./images/quantile_regression/naqr_linear_model_samples/NAQR_NRV_Load_Wind_PV_NP-Example_864_samples.png> <./images/quantile_regression/aqr_linear_model_samples/AQR_NRV_Load_Wind_PV_NP-QE-Example_4320_samples.png> <./images/quantile_regression/naqr_linear_model_samples/NAQR_NRV_Load_Wind_PV_NP-Example_4320_samples.png>]) (./sections/results/models/non-linear.tex [29 <./images/quantile_regression/quantile_performance/AQR_Quantile_Performance_Training.jpeg> <./images/quantile_regression/quantile_performance/AQR_Quantile_Performance_Test.jpeg> <./images/quantile_regression/quantile_performance/NAQR_Quantile_Performance_Training.jpeg> <./images/quantile_regression/quantile_performance/NAQR_Quantile_Performance_Test.jpeg>] [30{/usr/local/texlive/2023/texmf-dist/fonts/enc/dvips/libertine/lbtn_7grukw.enc}] - + File: images/quantile_regression/aqr_non_linear_model_samples/AQR_NL_NRV_Load_Wind_PV_NP_QE-Sample_864.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/aqr_non_linear_model_samples/AQR_NL_NRV_Load_Wind_PV_NP_QE-Sample_864.png used on input line 78. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. - + File: images/quantile_regression/naqr_non_linear_model_samples/NAQR_NL_NRV_Load_Wind_PV_NP_QE-Sample_864.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/naqr_non_linear_model_samples/NAQR_NL_NRV_Load_Wind_PV_NP_QE-Sample_864.png used on input line 82. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. - + File: images/quantile_regression/aqr_non_linear_model_samples/AQR_NL_NRV_Load_Wind_PV_NP_QE-Sample_4320.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/aqr_non_linear_model_samples/AQR_NL_NRV_Load_Wind_PV_NP_QE-Sample_4320.png used on input line 85. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. - + File: images/quantile_regression/naqr_non_linear_model_samples/NAQR_NL_NRV_Load_Wind_PV_NP_QE-Sample_4320.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/naqr_non_linear_model_samples/NAQR_NL_NRV_Load_Wind_PV_NP_QE-Sample_4320.png used on input line 89. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. - + File: images/quantile_regression/aqr_non_linear_model_samples/AQR_NL_NRV_Load_Wind_PV_NP_QE-Sample_6336.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/aqr_non_linear_model_samples/AQR_NL_NRV_Load_Wind_PV_NP_QE-Sample_6336.png used on input line 92. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. - + File: images/quantile_regression/naqr_non_linear_model_samples/NAQR_NL_NRV_Load_Wind_PV_NP_QE-Sample_6336.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/naqr_non_linear_model_samples/NAQR_NL_NRV_Load_Wind_PV_NP_QE-Sample_6336.png used on input line 96. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. - + File: images/quantile_regression/aqr_non_linear_model_samples/AQR_NL_NRV_Load_Wind_PV_NP_QE-Sample_7008.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/aqr_non_linear_model_samples/AQR_NL_NRV_Load_Wind_PV_NP_QE-Sample_7008.png used on input line 99. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. - + File: images/quantile_regression/naqr_non_linear_model_samples/NAQR_NL_NRV_Load_Wind_PV_NP_QE-Sample_7008.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/naqr_non_linear_model_samples/NAQR_NL_NRV_Load_Wind_PV_NP_QE-Sample_7008.png used on input line 104. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. [31] - + File: images/quantile_regression/quantile_performance/AQR_NL_Quantile_Performance_Training.jpeg Graphic file (type jpg) Package pdftex.def Info: images/quantile_regression/quantile_performance/AQR_NL_Quantile_Performance_Training.jpeg used on input line 117. (pdftex.def) Requested size: 223.07211pt x 153.94125pt. - + File: images/quantile_regression/quantile_performance/AQR_NL_Quantile_Performance_Test.jpeg Graphic file (type jpg) Package pdftex.def Info: images/quantile_regression/quantile_performance/AQR_NL_Quantile_Performance_Test.jpeg used on input line 122. (pdftex.def) Requested size: 223.07211pt x 153.94125pt. - + File: images/quantile_regression/quantile_performance/NAQR_NL_Quantile_Performance_Training.jpeg Graphic file (type jpg) Package pdftex.def Info: images/quantile_regression/quantile_performance/NAQR_NL_Quantile_Performance_Training.jpeg used on input line 127. (pdftex.def) Requested size: 223.07211pt x 153.94125pt. - + File: images/quantile_regression/quantile_performance/NAQR_NL_Quantile_Performance_Test.jpeg Graphic file (type jpg) Package pdftex.def Info: images/quantile_regression/quantile_performance/NAQR_NL_Quantile_Performance_Test.jpeg used on input line 132. @@ -1662,63 +1671,63 @@ Underfull \hbox (badness 4582) in paragraph at lines 135--135 [] ) [32 <./images/quantile_regression/aqr_non_linear_model_samples/AQR_NL_NRV_Load_Wind_PV_NP_QE-Sample_864.png> <./images/quantile_regression/naqr_non_linear_model_samples/NAQR_NL_NRV_Load_Wind_PV_NP_QE-Sample_864.png> <./images/quantile_regression/aqr_non_linear_model_samples/AQR_NL_NRV_Load_Wind_PV_NP_QE-Sample_4320.png> <./images/quantile_regression/naqr_non_linear_model_samples/NAQR_NL_NRV_Load_Wind_PV_NP_QE-Sample_4320.png> <./images/quantile_regression/aqr_non_linear_model_samples/AQR_NL_NRV_Load_Wind_PV_NP_QE-Sample_6336.png> <./images/quantile_regression/naqr_non_linear_model_samples/NAQR_NL_NRV_Load_Wind_PV_NP_QE-Sample_6336.png> <./images/quantile_regression/aqr_non_linear_model_samples/AQR_NL_NRV_Load_Wind_PV_NP_QE-Sample_7008.png> <./images/quantile_regression/naqr_non_linear_model_samples/NAQR_NL_NRV_Load_Wind_PV_NP_QE-Sample_7008.png>] (./sections/results/models/gru.tex [33 <./images/quantile_regression/quantile_performance/AQR_NL_Quantile_Performance_Training.jpeg> <./images/quantile_regression/quantile_performance/AQR_NL_Quantile_Performance_Test.jpeg> <./images/quantile_regression/quantile_performance/NAQR_NL_Quantile_Performance_Training.jpeg> <./images/quantile_regression/quantile_performance/NAQR_NL_Quantile_Performance_Test.jpeg>] [34] - + File: images/quantile_regression/aqr_gru_model_examples/AQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_864.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/aqr_gru_model_examples/AQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_864.png used on input line 75. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. - + File: images/quantile_regression/naqr_gru_model_examples/NAQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_864.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/naqr_gru_model_examples/NAQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_864.png used on input line 79. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. - + File: images/quantile_regression/aqr_gru_model_examples/AQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_4320.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/aqr_gru_model_examples/AQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_4320.png used on input line 82. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. - + File: images/quantile_regression/naqr_gru_model_examples/NAQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_4320.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/naqr_gru_model_examples/NAQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_4320.png used on input line 86. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. - + File: images/quantile_regression/aqr_gru_model_examples/AQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_6336.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/aqr_gru_model_examples/AQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_6336.png used on input line 89. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. - + File: images/quantile_regression/naqr_gru_model_examples/NAQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_6336.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/naqr_gru_model_examples/NAQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_6336.png used on input line 93. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. - + File: images/quantile_regression/aqr_gru_model_examples/AQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_7008.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/aqr_gru_model_examples/AQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_7008.png used on input line 96. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. - + File: images/quantile_regression/naqr_gru_model_examples/NAQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_7008.png Graphic file (type png) Package pdftex.def Info: images/quantile_regression/naqr_gru_model_examples/NAQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_7008.png used on input line 101. (pdftex.def) Requested size: 223.07211pt x 112.49284pt. [35] - + File: images/quantile_regression/quantile_performance/AQR_GRU_QP_Train.jpeg Graphic file (type jpg) Package pdftex.def Info: images/quantile_regression/quantile_performance/AQR_GRU_QP_Train.jpeg used on input line 114. (pdftex.def) Requested size: 223.07211pt x 153.94125pt. - + File: images/quantile_regression/quantile_performance/AQR_GRU_QP_Test.jpeg Graphic file (type jpg) Package pdftex.def Info: images/quantile_regression/quantile_performance/AQR_GRU_QP_Test.jpeg used on input line 119. (pdftex.def) Requested size: 223.07211pt x 153.94125pt. - + File: images/quantile_regression/quantile_performance/NAQR_GRU_QP_Train.jpeg Graphic file (type jpg) Package pdftex.def Info: images/quantile_regression/quantile_performance/NAQR_GRU_QP_Train.jpeg used on input line 124. (pdftex.def) Requested size: 223.07211pt x 153.94125pt. - + File: images/quantile_regression/quantile_performance/NAQR_GRU_QP_Test.jpeg Graphic file (type jpg) Package pdftex.def Info: images/quantile_regression/quantile_performance/NAQR_GRU_QP_Test.jpeg used on input line 129. @@ -1729,22 +1738,22 @@ Underfull \hbox (badness 4582) in paragraph at lines 132--132 [] ) [36 <./images/quantile_regression/aqr_gru_model_examples/AQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_864.png> <./images/quantile_regression/naqr_gru_model_examples/NAQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_864.png> <./images/quantile_regression/aqr_gru_model_examples/AQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_4320.png> <./images/quantile_regression/naqr_gru_model_examples/NAQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_4320.png> <./images/quantile_regression/aqr_gru_model_examples/AQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_6336.png> <./images/quantile_regression/naqr_gru_model_examples/NAQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_6336.png> <./images/quantile_regression/aqr_gru_model_examples/AQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_7008.png> <./images/quantile_regression/naqr_gru_model_examples/NAQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_7008.png>] (./sections/results/models/diffusion.tex [37 <./images/quantile_regression/quantile_performance/AQR_GRU_QP_Train.jpeg> <./images/quantile_regression/quantile_performance/AQR_GRU_QP_Test.jpeg> <./images/quantile_regression/quantile_performance/NAQR_GRU_QP_Train.jpeg> <./images/quantile_regression/quantile_performance/NAQR_GRU_QP_Test.jpeg>] - + File: images/diffusion/results/intermediates/Testing Intermediates 864_Sample intermediate 1_00000000.jpeg Graphic file (type jpg) Package pdftex.def Info: images/diffusion/results/intermediates/Testing Intermediates 864_Sample intermediate 1_00000000.jpeg used on input line 20. (pdftex.def) Requested size: 204.85846pt x 102.04892pt. - + File: images/diffusion/results/intermediates/Testing Intermediates 864_Sample intermediate 2_00000000.jpeg Graphic file (type jpg) Package pdftex.def Info: images/diffusion/results/intermediates/Testing Intermediates 864_Sample intermediate 2_00000000.jpeg used on input line 22. (pdftex.def) Requested size: 204.85846pt x 102.04892pt. - + File: images/diffusion/results/intermediates/Testing Intermediates 864_Sample intermediate 3_00000000.jpeg Graphic file (type jpg) Package pdftex.def Info: images/diffusion/results/intermediates/Testing Intermediates 864_Sample intermediate 3_00000000.jpeg used on input line 27. (pdftex.def) Requested size: 204.85846pt x 102.04892pt. - + File: images/diffusion/results/intermediates/Testing Intermediates 864_Sample intermediate 4_00000000.jpeg Graphic file (type jpg) Package pdftex.def Info: images/diffusion/results/intermediates/Testing Intermediates 864_Sample intermediate 4_00000000.jpeg used on input line 29. @@ -1757,28 +1766,28 @@ LaTeX Warning: `h' float specifier changed to `ht'. Overfull \vbox (38.77904pt too high) has occurred while \output is active [] [39 <./images/diffusion/results/intermediates/Testing Intermediates 864_Sample intermediate 1_00000000.jpeg> <./images/diffusion/results/intermediates/Testing Intermediates 864_Sample intermediate 2_00000000.jpeg> <./images/diffusion/results/intermediates/Testing Intermediates 864_Sample intermediate 3_00000000.jpeg> <./images/diffusion/results/intermediates/Testing Intermediates 864_Sample intermediate 4_00000000.jpeg>] - + File: images/diffusion/results/samples/Diffusion_Test_Example_864.jpeg Graphic file (type jpg) Package pdftex.def Info: images/diffusion/results/samples/Diffusion_Test_Example_864.jpeg used on input line 90. (pdftex.def) Requested size: 223.07211pt x 111.11894pt. - + File: images/diffusion/results/samples/Diffusion_Test_Example_4320.jpeg Graphic file (type jpg) Package pdftex.def Info: images/diffusion/results/samples/Diffusion_Test_Example_4320.jpeg used on input line 94. (pdftex.def) Requested size: 223.07211pt x 111.11894pt. - + File: images/diffusion/results/samples/Diffusion_Test_Example_6336.jpeg Graphic file (type jpg) Package pdftex.def Info: images/diffusion/results/samples/Diffusion_Test_Example_6336.jpeg used on input line 98. (pdftex.def) Requested size: 223.07211pt x 111.11894pt. - + File: images/diffusion/results/samples/Diffusion_Test_Example_7008.jpeg Graphic file (type jpg) Package pdftex.def Info: images/diffusion/results/samples/Diffusion_Test_Example_7008.jpeg used on input line 102. (pdftex.def) Requested size: 223.07211pt x 111.11894pt. [40 <./images/diffusion/results/samples/Diffusion_Test_Example_864.jpeg> <./images/diffusion/results/samples/Diffusion_Test_Example_4320.jpeg> <./images/diffusion/results/samples/Diffusion_Test_Example_6336.jpeg> <./images/diffusion/results/samples/Diffusion_Test_Example_7008.jpeg>] - + File: images/diffusion/results/samples/Diffusion_Test_Example_864_Only_NRV.jpeg Graphic file (type jpg) Package pdftex.def Info: images/diffusion/results/samples/Diffusion_Test_Example_864_Only_NRV.jpeg used on input line 113. @@ -1787,7 +1796,7 @@ File: images/diffusion/results/samples/Diffusion_Test_Example_864.jpeg Graphic f Package pdftex.def Info: images/diffusion/results/samples/Diffusion_Test_Example_864.jpeg used on input line 117. (pdftex.def) Requested size: 223.07211pt x 111.11894pt. - + File: images/diffusion/results/samples/Diffusion_Test_Example_4320_Only_NRV.jpeg Graphic file (type jpg) Package pdftex.def Info: images/diffusion/results/samples/Diffusion_Test_Example_4320_Only_NRV.jpeg used on input line 121. @@ -1990,18 +1999,18 @@ Package logreq Info: Writing requests to 'verslag.run.xml'. ) Here is how much of TeX's memory you used: - 42817 strings out of 476025 - 909198 string characters out of 5790017 + 42813 strings out of 476025 + 909064 string characters out of 5790017 1884388 words of memory out of 5000000 - 62380 multiletter control sequences out of 15000+600000 + 62376 multiletter control sequences out of 15000+600000 609680 words of font info for 109 fonts, out of 8000000 for 9000 1141 hyphenation exceptions out of 8191 84i,16n,131p,2100b,5180s stack positions out of 10000i,1000n,20000p,200000b,200000s -Output written on verslag.pdf (51 pages, 8682452 bytes). +Output written on verslag.pdf (51 pages, 8683971 bytes). PDF statistics: - 673 PDF objects out of 1000 (max. 8388607) - 498 compressed objects within 5 object streams + 672 PDF objects out of 1000 (max. 8388607) + 497 compressed objects within 5 object streams 127 named destinations out of 1000 (max. 500000) 564 words of extra memory for PDF output out of 10000 (max. 10000000) diff --git a/Reports/Thesis/verslag.pdf b/Reports/Thesis/verslag.pdf index 47c7e2c..21388a3 100644 Binary files a/Reports/Thesis/verslag.pdf and b/Reports/Thesis/verslag.pdf differ diff --git a/Reports/Thesis/verslag.synctex.gz b/Reports/Thesis/verslag.synctex.gz index 1b1419c..7735ce4 100644 Binary files a/Reports/Thesis/verslag.synctex.gz and b/Reports/Thesis/verslag.synctex.gz differ diff --git a/src/data/preprocessing.py b/src/data/preprocessing.py index 8fe14b7..cc1eb13 100644 --- a/src/data/preprocessing.py +++ b/src/data/preprocessing.py @@ -49,6 +49,10 @@ class DataProcessor: -np.inf, datetime(year=2022, month=11, day=30, tzinfo=pytz.UTC), ) + self.val_range = ( + datetime(year=2022, month=10, day=1, tzinfo=pytz.UTC), + datetime(year=2022, month=11, day=30, tzinfo=pytz.UTC), + ) self.test_range = (datetime(year=2023, month=1, day=1, tzinfo=pytz.UTC), np.inf) self.update_range_str() @@ -227,14 +231,23 @@ class DataProcessor: transform: bool = True, predict_sequence_length: int = 96, shuffle: bool = True, + with_validation: bool = False, ): train_df = self.all_features.copy() + train_range = self.train_range + + if with_validation: + train_range = ( + self.train_range[0], + self.val_range[0] - pd.Timedelta(days=1), + ) + if self.train_range[0] != -np.inf: - train_df = train_df[(train_df["datetime"] >= self.train_range[0])] + train_df = train_df[(train_df["datetime"] >= train_range[0])] if self.train_range[1] != np.inf: - train_df = train_df[(train_df["datetime"] <= self.train_range[1])] + train_df = train_df[(train_df["datetime"] <= train_range[1])] if transform: train_df["nrv"] = self.nrv_scaler.fit_transform( @@ -276,6 +289,58 @@ class DataProcessor: ) return self.get_dataloader(train_dataset, shuffle=shuffle) + def get_val_dataloader( + self, + transform: bool = True, + predict_sequence_length: int = 96, + full_day_skip: bool = False, + ): + val_df = self.all_features.copy() + + if self.test_range[0] != -np.inf: + val_df = val_df[(val_df["datetime"] >= self.val_range[0])] + + if self.test_range[1] != np.inf: + val_df = val_df[(val_df["datetime"] <= self.val_range[1])] + + if transform: + val_df["nrv"] = self.nrv_scaler.transform( + val_df["nrv"].values.reshape(-1, 1) + ).reshape(-1) + val_df["load_forecast"] = self.load_forecast_scaler.transform( + val_df["load_forecast"].values.reshape(-1, 1) + ).reshape(-1) + val_df["total_load"] = self.load_forecast_scaler.transform( + val_df["total_load"].values.reshape(-1, 1) + ).reshape(-1) + + val_df["pv_forecast"] = self.pv_forecast_scaler.transform( + val_df["pv_forecast"].values.reshape(-1, 1) + ).reshape(-1) + + val_df["pv_history"] = self.pv_forecast_scaler.transform( + val_df["pv_history"].values.reshape(-1, 1) + ).reshape(-1) + + val_df["wind_forecast"] = self.wind_forecast_scaler.transform( + val_df["wind_forecast"].values.reshape(-1, 1) + ).reshape(-1) + val_df["wind_history"] = self.wind_forecast_scaler.transform( + val_df["wind_history"].values.reshape(-1, 1) + ).reshape(-1) + val_df["nominal_net_position"] = self.nominal_net_position_scaler.transform( + val_df["nominal_net_position"].values.reshape(-1, 1) + ).reshape(-1) + + val_dataset = NrvDataset( + val_df, + data_config=self.data_config, + full_day_skip=self.full_day_skip or full_day_skip, + predict_sequence_length=predict_sequence_length, + lstm=self.lstm, + ) + return self.get_dataloader(val_dataset, shuffle=False) + def get_test_dataloader( self, transform: bool = True, @@ -335,14 +400,35 @@ class DataProcessor: transform: bool = True, predict_sequence_length: int = 96, full_day_skip: bool = False, + validation: bool = False, ): - return self.get_train_dataloader( - transform=transform, predict_sequence_length=predict_sequence_length - ), self.get_test_dataloader( - transform=transform, - predict_sequence_length=predict_sequence_length, - full_day_skip=full_day_skip, - ) + + if not validation: + return self.get_train_dataloader( + transform=transform, predict_sequence_length=predict_sequence_length + ), self.get_test_dataloader( + transform=transform, + predict_sequence_length=predict_sequence_length, + full_day_skip=full_day_skip, + ) + else: + return ( + self.get_train_dataloader( + transform=transform, + predict_sequence_length=predict_sequence_length, + with_validation=True, + ), + self.get_val_dataloader( + transform=transform, + predict_sequence_length=predict_sequence_length, + full_day_skip=full_day_skip, + ), + self.get_test_dataloader( + transform=transform, + predict_sequence_length=predict_sequence_length, + full_day_skip=full_day_skip, + ), + ) def inverse_transform(self, input_data): try: diff --git a/src/trainers/diffusion_trainer.py b/src/trainers/diffusion_trainer.py index 302c51d..47bac48 100644 --- a/src/trainers/diffusion_trainer.py +++ b/src/trainers/diffusion_trainer.py @@ -202,8 +202,8 @@ class DiffusionTrainer: if task: self.init_clearml_task(task) - train_loader, test_loader = self.data_processor.get_dataloaders( - predict_sequence_length=self.ts_length + train_loader, val_loader, test_loader = self.data_processor.get_dataloaders( + predict_sequence_length=self.ts_length, validation=True ) train_sample_indices = self.random_samples(train=True, num_samples=5) @@ -230,7 +230,7 @@ class DiffusionTrainer: running_loss /= len(train_loader.dataset) if epoch % 75 == 0 and epoch != 0: - crps, _ = self.test(test_loader, epoch, task) + crps, _ = self.test(val_loader, epoch, task) if best_crps is None or crps < best_crps: best_crps = crps @@ -585,46 +585,48 @@ class DiffusionTrainer: if task: task.get_logger().report_scalar( - title="CRPS", series="test", value=mean_crps, iteration=epoch + title="CRPS", series="val", value=mean_crps, iteration=epoch ) - # if self.policy_evaluator: - # _, test_loader = self.data_processor.get_dataloaders( - # predict_sequence_length=self.ts_length, full_day_skip=True - # ) + if self.policy_evaluator: + _, val_loader, _ = self.data_processor.get_dataloaders( + predict_sequence_length=self.ts_length, + full_day_skip=True, + validation=True, + ) - # optimal_penalty, profit, charge_cycles = ( - # self.policy_evaluator.optimize_penalty_for_target_charge_cycles( - # idx_samples=generated_samples, - # test_loader=test_loader, - # initial_penalty=self.prev_optimal_penalty, - # target_charge_cycles=283, - # initial_learning_rate=1, - # max_iterations=50, - # tolerance=1, - # iteration=epoch, - # ) - # ) + optimal_penalty, profit, charge_cycles = ( + self.policy_evaluator.optimize_penalty_for_target_charge_cycles( + idx_samples=generated_samples, + test_loader=val_loader, + initial_penalty=self.prev_optimal_penalty, + target_charge_cycles=283, + initial_learning_rate=1, + max_iterations=50, + tolerance=1, + iteration=epoch, + ) + ) - # self.prev_optimal_penalty = optimal_penalty + self.prev_optimal_penalty = optimal_penalty - # task.get_logger().report_scalar( - # title="Optimal Penalty", - # series="test", - # value=optimal_penalty, - # iteration=epoch, - # ) + task.get_logger().report_scalar( + title="Optimal Penalty", + series="test", + value=optimal_penalty, + iteration=epoch, + ) - # task.get_logger().report_scalar( - # title="Optimal Profit", series="test", value=profit, iteration=epoch - # ) + task.get_logger().report_scalar( + title="Optimal Profit", series="test", value=profit, iteration=epoch + ) - # task.get_logger().report_scalar( - # title="Optimal Charge Cycles", - # series="test", - # value=charge_cycles, - # iteration=epoch, - # ) + task.get_logger().report_scalar( + title="Optimal Charge Cycles", + series="test", + value=charge_cycles, + iteration=epoch, + ) return mean_crps, generated_samples diff --git a/src/training_scripts/diffusion_training.py b/src/training_scripts/diffusion_training.py index 59eb3fc..0c80c94 100644 --- a/src/training_scripts/diffusion_training.py +++ b/src/training_scripts/diffusion_training.py @@ -71,6 +71,6 @@ policy_evaluator = PolicyEvaluator(baseline_policy, task) #### Trainer #### trainer = DiffusionTrainer( - model, data_processor, "cuda", policy_evaluator=policy_evaluator, noise_steps=100 + model, data_processor, "cuda", policy_evaluator=policy_evaluator, noise_steps=20 ) trainer.train(model_parameters["epochs"], model_parameters["learning_rate"], task) diff --git a/src/training_scripts/non_autoregressive_quantiles.py b/src/training_scripts/non_autoregressive_quantiles.py index 0268c6c..bcb3014 100644 --- a/src/training_scripts/non_autoregressive_quantiles.py +++ b/src/training_scripts/non_autoregressive_quantiles.py @@ -1,8 +1,12 @@ from src.utils.clearml import ClearMLHelper #### ClearML #### -clearml_helper = ClearMLHelper(project_name="Thesis/NAQR: GRU") -task = clearml_helper.get_task(task_name="NAQR: GRU (8 - 512) + Load + PV + Wind + NP") +clearml_helper = ClearMLHelper( + project_name="Thesis/NAQR: Non Linear (4 - 256) + Load + PV + Wind + NP" +) +task = clearml_helper.get_task( + task_name="NAQR: Non Linear (4 - 256) + Load + PV + Wind + NP" +) task.execute_remotely(queue_name="default", exit_process=True) from src.policies.PolicyEvaluator import PolicyEvaluator @@ -119,32 +123,32 @@ trainer.plot_every(20) trainer.train(task=task, epochs=epochs, remotely=True) ### Policy Evaluation ### -# idx_samples = trainer.test_set_samples -# _, test_loader = trainer.data_processor.get_dataloaders( -# predict_sequence_length=trainer.model.output_size, full_day_skip=False -# ) +idx_samples = trainer.test_set_samples +_, test_loader = trainer.data_processor.get_dataloaders( + predict_sequence_length=trainer.model.output_size, full_day_skip=False +) -# policy_evaluator.evaluate_test_set(idx_samples, test_loader) -# policy_evaluator.plot_profits_table() -# policy_evaluator.plot_thresholds_per_day() +policy_evaluator.evaluate_test_set(idx_samples, test_loader) +policy_evaluator.plot_profits_table() +policy_evaluator.plot_thresholds_per_day() -# optimal_penalty, profit, charge_cycles = ( -# policy_evaluator.optimize_penalty_for_target_charge_cycles( -# idx_samples=idx_samples, -# test_loader=test_loader, -# initial_penalty=1000, -# target_charge_cycles=283, -# learning_rate=15, -# max_iterations=150, -# tolerance=1, -# ) -# ) +optimal_penalty, profit, charge_cycles = ( + policy_evaluator.optimize_penalty_for_target_charge_cycles( + idx_samples=idx_samples, + test_loader=test_loader, + initial_penalty=1000, + target_charge_cycles=283, + learning_rate=15, + max_iterations=150, + tolerance=1, + ) +) -# print( -# f"Optimal Penalty: {optimal_penalty}, Profit: {profit}, Charge Cycles: {charge_cycles}" -# ) -# task.get_logger().report_single_value(name="Optimal Penalty", value=optimal_penalty) -# task.get_logger().report_single_value(name="Optimal Profit", value=profit) -# task.get_logger().report_single_value(name="Optimal Charge Cycles", value=charge_cycles) +print( + f"Optimal Penalty: {optimal_penalty}, Profit: {profit}, Charge Cycles: {charge_cycles}" +) +task.get_logger().report_single_value(name="Optimal Penalty", value=optimal_penalty) +task.get_logger().report_single_value(name="Optimal Profit", value=profit) +task.get_logger().report_single_value(name="Optimal Charge Cycles", value=charge_cycles) task.close()