Electricity price prediction method based on automatic hyper-parameter and feature optimization and related device
By integrating feature engineering, model design, and hyperparameter tuning into a unified mathematical optimization space, and using an automated optimization algorithm to find the globally optimal configuration, the problem of low efficiency and reliance on human experience in DNN electricity price prediction model construction is solved, achieving efficient and accurate electricity price prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAN THERMAL POWER RES INST CO LTD
- Filing Date
- 2026-02-06
- Publication Date
- 2026-05-15
AI Technical Summary
Existing technologies for DNN electricity price prediction models suffer from inefficiency in construction, high dependence on human experience, suboptimal configuration combinations, fragmented optimization processes, and difficulty in maximizing prediction accuracy.
By employing automated hyperparameter and feature optimization methods, feature engineering, model design, and hyperparameter tuning are integrated into a unified mathematical optimization space. Guided iterative optimization search is conducted through Bayesian optimization and TPE algorithms to find the globally optimal model configuration.
It improves model building efficiency, reduces reliance on manual intervention, enhances prediction accuracy, ensures reproducibility and objectivity, and reduces computational costs.
Smart Images

Figure CN122048433A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of interdisciplinary technology of artificial intelligence and power system, and specifically relates to a method and related device for electricity price prediction based on automated hyperparameter and feature optimization. Background Technology
[0002] Electricity price forecasting is a core component of the market-oriented operation of electricity, and its forecast results directly affect the production and operation plans and economic benefits of market participants such as power generation companies, electricity sales companies, users, and energy storage operators.
[0003] With the global energy transition, the penetration rate of intermittent energy sources, such as wind and solar power, in the power grid is constantly increasing, leading to unprecedented volatility, strong randomness, and complex nonlinear characteristics in electricity prices. Given this situation, traditional statistical models (such as autoregressive moving average models and exponential smoothing methods), based on the assumption of stationary time series, are no longer sufficient to capture the complex dynamics of the modern electricity market. Therefore, machine learning methods, represented by deep neural networks (DNNs), have become the mainstream technology for solving the problem of high-precision electricity price forecasting due to their powerful capabilities in fitting nonlinear data and extracting features.
[0004] Currently, conventional technical solutions for electricity price forecasting using DNNs are essentially "manual" processes that rely heavily on manual intervention and expert experience. To illustrate, a typical existing technical solution usually includes the following steps: (1) Data collection and preliminary processing: Collect historical electricity price time series, as well as data on various exogenous variables that are considered to be potentially relevant, such as total system load forecast, regional load forecast, wind power generation forecast, photovoltaic power generation forecast, natural gas price, coal price, weather (temperature, humidity), etc.
[0005] (2) Feature engineering and screening: Algorithm engineers or domain experts manually design and screen a set of fixed features as input to the model based on their understanding of the electricity market and data analysis experience. For example, experts may judge that “the price of the previous day’s 24 points”, “the price of the same day of the previous week”, and “the system load forecast of the day” are strongly correlated features and select them. This process is full of subjectivity and uncertainty.
[0006] (3) Manual design of model structure: Technicians manually design a fixed DNN model structure based on experience; for example, they decide to use a fully connected network with 3 hidden layers, each with 256, 128, and 64 neurons, and select ReLU as the activation function for all layers.
[0007] (4) Manual or semi-automatic tuning of hyperparameters: Based on a fixed feature set and model structure, the hyperparameters (such as learning rate, Dropout ratio, batch size, etc.) during the training process are tuned. Interpretably, the most commonly used methods are "grid search" or "random search". Grid search finds the optimal solution by traversing predefined parameter combinations, but when the parameter dimension is slightly high, it will encounter the "curse of dimensionality", and the computational cost will increase exponentially, making it impossible to perform a comprehensive search. Although random search is slightly more efficient, its search process lacks directionality and it is also difficult to guarantee finding the optimal solution. Once the above process is completed, the selected feature combination and model configuration are usually fixed in subsequent daily predictions, and only the weight parameters of the model are updated using the latest data.
[0008] Accordingly, the conventional technical solutions for electricity price prediction using DNNs have the following drawbacks: (1) Highly dependent on human experience, highly subjective, and poor reproducibility: The final performance of the model depends heavily on the personal ability and "parameter tuning intuition" of the technicians; from choosing which historical prices to use as lag terms to deciding how deep and wide the network should be, every step is full of subjective judgment; this not only leads to low efficiency in model development, but also makes the whole process difficult to standardize, and the results are difficult to be stably reproduced on different people or different datasets.
[0009] (2) Suboptimal configuration combination makes it difficult to maximize model performance: There are extremely complex nonlinear coupling relationships among the four major elements of feature selection, data preprocessing method, model architecture and training hyperparameters. For example, an input set containing more features may require a deeper and more complex network structure and stronger regularization (such as a higher Dropout ratio) to match it. The traditional "step-by-step" and "trial and error" optimization methods are essentially exploring the huge combination space in a blind-man-and-error manner, and it is almost impossible to find the globally optimal configuration, which leads to the model's prediction accuracy being far from its theoretical upper limit.
[0010] (3) The optimization process is fragmented and lacks integrity: Existing technologies artificially separate steps such as feature selection and model parameter tuning. For example, a set of features is selected first using a certain method (such as the Filter or Wrapper method), and then hyperparameter tuning is performed on this fixed feature set. This fragmented process ignores the inherent relationship between elements, resulting in the final solution being only a local optimal solution under certain constraints, rather than the global optimal solution in the entire problem space.
[0011] (4) The process is cumbersome and the time and computation costs are high: Manual parameter tuning and grid search are extremely time-consuming and labor-intensive. In order to test the effectiveness of a new feature or adjust a network parameter, technicians may need to spend several hours or even several days to retrain and evaluate the model. This high time and computation costs make comprehensive and detailed optimization impractical in actual engineering. Summary of the Invention
[0012] The purpose of this invention is to provide an electricity price prediction method and related apparatus based on automated hyperparameter and feature optimization, so as to solve the technical problems in the existing technology, such as low efficiency in the construction process of DNN electricity price prediction model, high dependence on human experience, suboptimal configuration combination, fragmented optimization process, and difficulty in maximizing prediction accuracy.
[0013] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, this invention provides a method for predicting electricity prices based on automated hyperparameter and feature optimization, comprising the following steps: Based on the acquired electricity price prediction model, obtain the prediction input data for the selected time period that meets the input requirements; Based on the input data for the selected time period, the electricity price prediction model is used to predict the electricity price and obtain the electricity price prediction result for the selected time period. The electricity price prediction model is defined, constructed, and trained based on the optimal model configuration scheme. The process of obtaining the optimal model configuration scheme includes: obtaining the target prediction variables for model construction and the selected input features useful for target prediction to form a structured dataset; based on the structured dataset, parameterizing all variable elements in the model construction process and defining them as a mathematical optimization space; within the mathematical optimization space, using the selected optimization algorithm to perform guided iterative optimization search, and obtaining the optimal model configuration scheme after reaching the preset stopping condition. In the process of conducting guided iterative optimization search, the optimization problem that guides the iterative optimization search is expressed as: ; In the formula, To find the optimal model configuration; The black-box objective function represents the model configuration scheme used. The model's performance on the validation set; To optimize the space for mathematics.
[0014] A further improvement of the technical solution of the present invention is that the selected input features useful for target prediction include: time and calendar features, historical price features, exogenous variable features, and derived statistical features.
[0015] A further improvement to the technical solution of this invention lies in the mathematical optimization space. Represented as: ; In the formula, It is a feature selection subspace; It is the data preprocessing subspace; It is the model architecture subspace; It is the training hyperparameter subspace; Among them, mathematical optimization space Each point in the diagram represents a model configuration scheme.
[0016] A further improvement of the technical solution of the present invention is that the selected optimization algorithm is a Bayesian optimization algorithm, a TPE algorithm, a genetic algorithm, a particle swarm optimization algorithm, a simulated annealing algorithm, or a neural network structure search strategy.
[0017] A further improvement of the technical solution of the present invention is that the electricity price prediction model adopts a deep neural network, a long short-term memory network, a gated recurrent unit, a Transformer network, or a gradient boosting decision tree architecture.
[0018] A further improvement to the technical solution of this invention lies in that the process of performing guided iterative optimization search using a selected optimization algorithm specifically includes: Sampling and Evaluation: In the t-th iteration, based on the historical observation dataset, the next most promising evaluation point is selected by maximizing the collection function; based on the selected evaluation point, the corresponding model is built and trained using the training set; the trained model is evaluated on the validation set and a performance score is obtained. Construct a proxy model and provide feedback: The evaluation points and their corresponding performance scores are used as new data points and added to the historical observation dataset to form an updated dataset; a probabilistic proxy model about the "configuration-performance" relationship is maintained, and the updated dataset is used to update the probabilistic proxy model to more accurately fit the configuration-performance relationship; Repeat the sampling and evaluation steps and the surrogate model construction and feedback steps until the preset number of iterations is reached or the set convergence condition is met, and obtain the iterative optimization search results.
[0019] In a second aspect, the present invention provides an electricity price prediction system based on automated hyperparameter and feature optimization, comprising: The data acquisition module is used to acquire forecast input data for a selected time period that meets the input requirements based on the acquired electricity price forecasting model. The electricity price prediction module is used to predict the electricity price based on the input data for the selected time period, and to use the electricity price prediction model to predict the electricity price for the selected time period. The electricity price prediction model is defined, constructed, and trained based on the optimal model configuration scheme. The process of obtaining the optimal model configuration scheme includes: obtaining the target prediction variables for model construction and the selected input features useful for target prediction to form a structured dataset; based on the structured dataset, parameterizing all variable elements in the model construction process and defining them as a mathematical optimization space; within the mathematical optimization space, using the selected optimization algorithm to perform guided iterative optimization search, and obtaining the optimal model configuration scheme after reaching the preset stopping condition. In the process of conducting guided iterative optimization search, the optimization problem that guides the iterative optimization search is expressed as: ; In the formula, To find the optimal model configuration; The black-box objective function represents the model configuration scheme used. The model's performance on the validation set; To optimize the space for mathematics.
[0020] In a third aspect, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the electricity price prediction method based on automated hyperparameter and feature optimization as described in any one of the first aspects of the present invention.
[0021] In a fourth aspect, the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the electricity price prediction method based on automated hyperparameter and feature optimization as described in any one of the first aspects of the present invention.
[0022] In a fifth aspect, the present invention provides a computer program product comprising computer instructions which, when executed by a processor, implement the steps of the electricity price prediction method based on automated hyperparameter and feature optimization as described in any one of the first aspects of the present invention.
[0023] Compared with the prior art, the present invention has the following beneficial effects: The technical solution disclosed in this invention presents a novel electricity price prediction method based on automated hyperparameter and feature optimization. Its core improvement lies in the fact that the electricity price prediction model is constructed and trained according to the definition of the optimal model configuration scheme. The process of obtaining the optimal model configuration scheme adopts a fully automated and integrated construction and optimization method, which integrates all aspects such as feature engineering, model design, and hyperparameter tuning into a unified framework. Through systematic and efficient automated search, the globally optimal model configuration scheme is directly found, thereby maximizing prediction performance with minimal human cost. Specifically, addressing the problems of high dependence on human experience, strong subjectivity, and poor reproducibility, the technical solution of this invention parameterizes all variable elements in the model construction process and defines them as a mathematical optimization space. This measure transforms the process that originally relied on the subjective judgment of technical personnel into an operation within a mathematical framework, greatly reducing the subjective influence of human experience. To address the problem of suboptimal configuration combinations and difficulty in maximizing model performance, this invention employs a selected optimization algorithm within a mathematical optimization space for guided iterative optimization. Due to the complex nonlinear coupling relationships between elements such as feature selection and data preprocessing, traditional methods struggle to find the globally optimal configuration. This invention, however, comprehensively explores the vast combinatorial space through optimization algorithms, avoiding a piecemeal approach and increasing the likelihood of finding the globally optimal configuration, thus bringing the model's prediction accuracy close to the theoretical upper limit. Regarding the fragmented and unholistic nature of the optimization process, this invention integrates all variable elements into the mathematical optimization space, rather than manually separating feature selection and model parameter tuning steps. This fully considers the inherent relationships between elements, avoiding local optima and instead seeking the globally optimal solution across the entire problem space. Addressing the issues of cumbersome processes and high time and computational costs, this invention automates hyperparameter and feature optimization, eliminating the need for manual parameter tuning and grid searches. This saves significant time and computational resources for retraining and evaluating the model, making comprehensive and detailed optimization feasible in practical engineering. Ultimately, this effectively solves the problems of existing technologies, achieving improved model building efficiency, reduced reliance on manual intervention, and increased prediction accuracy. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0025] Figure 1 This is a flowchart illustrating an electricity price prediction method based on automated hyperparameter and feature optimization in an embodiment of the present invention. Figure 2This is a schematic diagram of the overall process of the automated electricity price forecasting method in an embodiment of the present invention; Figure 3 This is a schematic diagram of NP electricity price visualization in an embodiment of the present invention; Figure 4 This is a schematic diagram comparing the weekly electricity price forecasts in the NP market in an embodiment of the present invention; Figure 5 This is a schematic diagram comparing 24-hour electricity price forecasts in the NP market, as described in an embodiment of the present invention. Figure 6 This is a schematic diagram of an electricity price prediction system based on automated hyperparameter and feature optimization in an embodiment of the present invention. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention; obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0027] Based on the technical solutions disclosed in the embodiments of this invention, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this invention. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices.
[0028] Please see Figure 1 This invention provides a method for predicting electricity prices based on automated hyperparameter and feature optimization, comprising the following steps: Step 1: Based on the acquired electricity price prediction model, obtain the prediction input data for the selected time period that meets the input requirements; Step 2: Based on the input data for the selected time period, use the electricity price prediction model to predict the electricity price and obtain the electricity price prediction result for the selected time period; The electricity price prediction model is defined, constructed, and trained based on the optimal model configuration scheme. The process of obtaining the optimal model configuration scheme includes: obtaining the target prediction variables for model construction and the selected input features useful for target prediction to form a structured dataset; based on the structured dataset, parameterizing all variable elements in the model construction process and defining them as a mathematical optimization space; within the mathematical optimization space, using the selected optimization algorithm to perform guided iterative optimization search, and obtaining the optimal model configuration scheme after reaching the preset stopping condition. In the process of conducting guided iterative optimization search, the optimization problem that guides the iterative optimization search is expressed as: ; In the formula, To find the optimal model configuration; The black-box objective function represents the model configuration scheme used. The model's performance on the validation set; To optimize the space for mathematics.
[0029] This invention proposes a new paradigm that integrates traditionally fragmented processes such as feature engineering, model architecture design, and hyperparameter setting into a unified optimization space for global optimization. Specifically, this invention first constructs a "unified optimization space" encompassing feature selection, model structure, and hyperparameters, then employs advanced automated optimization algorithms (such as Bayesian optimization and TPE) to perform efficient and guided searches within this space. Finally, it automatically generates the final prediction model based on the optimal configuration. This framework is universal; its scope is not limited to specific optimization algorithms (such as TPE) or specific prediction models (such as DNN), but should cover other functionally equivalent global optimization algorithms (such as genetic algorithms and reinforcement learning strategies) and other complex machine learning models (such as LSTM and gradient boosting trees).
[0030] Please see Figure 2 The present invention provides an electricity price prediction method based on automated hyperparameter and feature optimization, comprising the following steps: Step 1: Data preparation and candidate feature pool construction.
[0031] In this step of the present invention, all relevant historical data for model building are collected and integrated by a computer program to form a structured dataset. This dataset includes the target predictor variable (such as hourly electricity price) and all potential input features that may be useful for the target prediction. These input features are pooled together to form a "candidate feature pool", which should be as comprehensive as possible.
[0032] In a specific exemplary technical solution, the candidate feature pool includes: Historical price characteristics: hourly electricity prices for the past 1, 2, 3, ..., 7 days.
[0033] Exogenous variable characteristics: total system load forecast, regional load forecast, wind power generation forecast, photovoltaic power generation forecast, natural gas price, coal price, available capacity of different types of generating units, etc.
[0034] Time and calendar features: What day of the week is the current forecast (Monday, Tuesday, ...), which month does it fall in, whether it is a public holiday, whether it is a long weekend, etc.
[0035] Derived statistical features: such as the moving average and moving standard deviation of prices over the past 24 hours.
[0036] Step 2: Unify and optimize space construction.
[0037] This step in the technical solution of this invention is a core improvement method. It parameterizes all variable elements of the model construction through preset program logic and defines them as a unified, high-dimensional mathematical optimization space, denoted as H. Explained, this mathematical optimization space is the set of all possible model configurations, which can be formally represented as the Cartesian product of multiple subspaces, specifically as follows: ; In the formula, This is the feature selection subspace. If the candidate feature pool has N features, then this space can be represented as... Each dimension corresponds to a feature switch; It is the data preprocessing subspace, which includes a variety of optional data scaling methods; It is the model architecture subspace, which defines the search range of network structure parameters of the DNN model, such as the number of hidden layers, the number of neurons per layer, and the type of activation function; It is the training hyperparameter subspace, which defines the search range of key hyperparameters during the training process, such as learning rate, Dropout ratio, regularization type and strength, etc.
[0038] Further illustrative examples include a specific model configuration. That is, the higher-dimensional space One of the points, namely .
[0039] Step 3: Automated iterative optimization.
[0040] In this step of the present invention, within the mathematical optimization space defined in the previous step, an efficient and guided search is performed using advanced automated optimization algorithms (such as Bayesian optimization based on Gaussian processes, or the tree-structured Parzen estimation algorithm TPE, which is more suitable for handling conditional parameters). Its mathematical essence is to solve the following optimization problem, which can be specifically expressed as: ; In the formula, It is a "black box" objective function, representing the use of configuration. The model's performance on the validation set (e.g., mean absolute error, MAE). That is, the optimal configuration that we hope to find.
[0041] In further exemplary technical solutions of this invention, besides Bayesian optimization and the TPE algorithm, other advanced global optimization algorithms can also be used to drive the search process, such as genetic algorithms (simulating biological evolution through crossover, mutation, etc.), particle swarm optimization, simulated annealing, or reinforcement learning-based neural network architecture search (NAS) strategies. Although these algorithms have different specific implementations, they can all accomplish the core task of automated optimization in a unified space. Furthermore, the objective function (i.e., performance scoring criterion) of the optimization algorithm is not limited to a single validation set error (such as MAE). More complex objective functions that are closer to business needs can be designed, such as multi-objective optimization, which simultaneously optimizes multiple metrics, such as minimizing both MAE and MAPE, or balancing prediction accuracy and model inference speed (complexity). Additionally, a penalty term can be added to the error term; for example, a larger penalty (Gda) can be applied to predicting extremely high or negative prices, making the model more consistent with common business sense.
[0042] The specific principle explanation of the technical solution of the embodiments of the present invention is as follows: (1) Sampling and evaluation: In the t-th iteration, the optimizer uses historical information to evaluate the samples. By maximizing a "sampling function" To select the next most promising assessment point The system is based on this configuration. The corresponding DNN model is dynamically and instantly constructed, trained using the training set, and evaluated on an independent validation set to obtain a performance score. .
[0043] (2) Constructing a proxy model and providing feedback: The optimizer will use new data points Add to historical observation dataset Internally, it maintains a probabilistic surrogate model regarding the "configuration-performance" relationship and uses... Update this model to more accurately fit the configuration-performance relationship. .
[0044] (3) Iteration: Repeat steps (1) and (2) until the preset number of iterations (e.g., 1500 times) is reached or other set convergence conditions are met. Compared with undirected random search and costly grid search, the technical solution disclosed in this embodiment of the invention can converge to the optimal region more quickly.
[0045] Step 4: Optimal configuration output.
[0046] In this step of the present invention embodiment, after the automated optimization process in the previous step is completed, the system selects the complete configuration scheme with the highest performance score (i.e., the smallest verification error) from all the evaluated configurations. The solution is stored in the form of a structured file (such as JSON or pickle file), serving as the core intermediate result of the technical solution of the present invention.
[0047] Step 5: Final model generation and application.
[0048] In this step of the present invention embodiment, the system loads the optimal configuration scheme output in the previous step. Based on its definition, the final electricity price prediction model is constructed and trained. The model can then be deployed in real-world forecasting applications for daily rolling forecasts.
[0049] In a specific exemplary technical solution, one is composed of The defined L-layer DNN model can be represented as: ; in, It is by The input data is determined by the feature selection part, while the number of network layers L and the weight matrix are... Bias vector and activation function All structures and parameters are provided by definition.
[0050] To further explain, the core idea of the technical solution of this invention is an "automatic optimization framework". The prediction model is not limited to fully connected DNNs. It can be replaced by other complex machine learning models that are more suitable for processing time series, such as Long Short-Term Memory Networks (LSTM), Gated Recurrent Units (GRU), Transformer Networks, or gradient boosting decision trees (such as LightGBM, XGBoost) that have excellent performance in certain scenarios. The framework of the technical solution of this invention is also applicable to the integrated optimization of the features, structure and hyperparameters of these models.
[0051] In this embodiment of the invention, for the final model that has been deployed, a periodic (e.g., every six months or one year) full-process re-optimization mechanism can be added; that is, the system automatically triggers and re-executes steps (2) and (3) in the complete explanation of the principle, and uses the latest data to find a new optimal model configuration under the current market environment. This enables the method of the present invention to adapt to long-term, structural changes that may occur in the power market (such as new policies, large-scale energy storage grid connection, etc.), and ensure the long-term effectiveness and optimality of the model configuration.
[0052] The technical solution disclosed in this invention compresses the traditionally weeks- or even months-long process of manual feature engineering, model design, and parameter tuning into a single, automatically executable computational task, resulting in the following significant advantages: (1) It achieves end-to-end automation, greatly improves R&D efficiency, significantly improves modeling efficiency, and reduces reliance on the skills of senior algorithm engineers.
[0053] (2) Significantly improves prediction accuracy and approaches the theoretical upper limit: By performing integrated and global systematic optimization of all variable factors, the method of this invention can explore the "optimal configuration combination" that is difficult for the human brain to conceive and verify and is highly coupled between elements, thereby discovering a better solution than manual optimization and significantly improving the final prediction accuracy of the model.
[0054] (3) Ensure objectivity and reproducibility: The entire model building process is driven by deterministic algorithms and predefined search space, which completely eliminates the subjectivity and randomness brought about by manual selection, and ensures that as long as the initial data and random seed are the same, the optimization results are reproducible.
[0055] (4) Lowering the threshold for model development and maintenance: Once the optimization task is defined once, the machine can automatically complete the heavy optimization work. Even when facing a new dataset or market environment, it is only necessary to rerun this automated process without a lot of manual intervention, which greatly reduces the development and long-term maintenance costs of the model.
[0056] (5) The method has high versatility: The core idea of the "unified optimization space" and "automated optimization" proposed in this invention is a general framework that is not only applicable to DNN, but also has the potential to be directly extended to other complex machine learning models (such as gradient boosting trees, recurrent neural networks, etc.), and has a wide range of applications.
[0057] Please see Figure 3 In a specific embodiment of the present invention, in order to more intuitively verify the effectiveness of the new method of the present invention, two publicly available electricity market datasets (taking the Nordic electricity market 'NP' and the US PJM market 'PJM' as examples) were selected for comparative experiments.
[0058] In this embodiment of the invention, the comparison models include: ARIMA, which is a classic statistical time series prediction model; manually tuned DNN, which represents a deep neural network model in the prior art that relies on expert experience for feature selection and parameter setting; and the new method of this invention, which uses a DNN model constructed using the automated integrated optimization framework proposed above.
[0059] This invention uses the industry-standard mean absolute error (MAE) and symmetric mean absolute percentage error (sMAPE) as evaluation indicators. The lower the error value, the higher the prediction accuracy. The comparison results are shown in Table 1.
[0060] Table 1. Comparison of prediction errors of different models on various datasets
[0061] As can be seen from the data in Table 1, the method of this invention significantly outperforms the traditional ARIMA model and the manually tuned DNN model in both the NP and PJM markets. For example, on the NP dataset, the MAE (2.12) of the method of this invention is reduced by approximately 38.5% compared to the manually tuned DNN (3.45), and the sMAPE metric also shows a similar improvement, demonstrating the powerful ability of this method to discover the optimal model configuration.
[0062] Please see Figure 4 and Figure 5 , Figure 4 and Figure 5 The comparisons of the predicted curves of the method of this invention and the manually tuned DNN model with the actual electricity prices are shown for a specific week (December 27, 2024 to January 2, 2025) and a 24-hour period in the NP market. From... Figure 4 and Figure 5 It can be clearly observed that the orange dashed line (the method of this invention) closely matches the blue solid line (the actual value), especially at the peaks and troughs of drastic electricity price fluctuations, where the method of this invention demonstrates higher accuracy and stronger tracking. In contrast, while the green dotted line (manually tuned DNN) can capture the general trend, it deviates significantly in predicting key points. This fully demonstrates that this invention, through global automated optimization, can construct a more accurate predictive model that captures the complex dynamics of the market. In summary, the experimental data and charts strongly demonstrate that the method of this invention has significant and substantial advantages over existing technologies in improving the accuracy of electricity price prediction.
[0063] The following are embodiments of the apparatus of the present invention, which can be used to execute embodiments of the method of the present invention. For details not disclosed in the apparatus embodiments, please refer to the embodiments of the method of the present invention.
[0064] Please see Figure 6 In this embodiment of the invention, an electricity price prediction system based on automated hyperparameter and feature optimization is provided, comprising: The data acquisition module is used to acquire forecast input data for a selected time period that meets the input requirements based on the acquired electricity price forecasting model. The electricity price prediction module is used to predict the electricity price based on the input data for the selected time period, and to use the electricity price prediction model to predict the electricity price for the selected time period. The electricity price prediction model is defined, constructed, and trained based on the optimal model configuration scheme. The process of obtaining the optimal model configuration scheme includes: obtaining the target prediction variables for model construction and the selected input features useful for target prediction to form a structured dataset; based on the structured dataset, parameterizing all variable elements in the model construction process and defining them as a mathematical optimization space; within the mathematical optimization space, using the selected optimization algorithm to perform guided iterative optimization search, and obtaining the optimal model configuration scheme after reaching the preset stopping condition. In the process of conducting guided iterative optimization search, the optimization problem that guides the iterative optimization search is expressed as: ; In the formula, To find the optimal model configuration; The black-box objective function represents the model configuration scheme used. The model's performance on the validation set; To optimize the space for mathematics.
[0065] In one embodiment of the present invention, a computer device is provided, comprising a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in the computer storage medium to achieve a corresponding method flow or corresponding function. The processor described in this embodiment can be used to execute the operation of an electricity price prediction method based on automated hyperparameter and feature optimization.
[0066] In one embodiment of the present invention, a storage medium is provided, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device used to store programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and extended storage media supported by the computer device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, the storage space also stores one or more instructions suitable for loading and execution by a processor. These instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM (Random Access Memory) or non-volatile memory, such as at least one disk storage device. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the electricity price prediction method based on automated hyperparameter and feature optimization in the above embodiments.
[0067] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, etc.) containing computer-usable program code.
[0068] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0069] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0070] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0071] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for predicting electricity prices based on automated hyperparameter and feature optimization, characterized in that, Includes the following steps: Based on the acquired electricity price prediction model, obtain the prediction input data for the selected time period that meets the input requirements; Based on the input data for the selected time period, the electricity price prediction model is used to predict the electricity price and obtain the electricity price prediction result for the selected time period. The electricity price prediction model is defined, constructed, and trained based on the optimal model configuration scheme. The process of obtaining the optimal model configuration scheme includes: obtaining the target prediction variables for model construction and the selected input features useful for target prediction to form a structured dataset; based on the structured dataset, parameterizing all variable elements in the model construction process and defining them as a mathematical optimization space; within the mathematical optimization space, using the selected optimization algorithm to perform guided iterative optimization search, and obtaining the optimal model configuration scheme after reaching the preset stopping condition. In the process of conducting guided iterative optimization search, the optimization problem that guides the iterative optimization search is expressed as: ; In the formula, To find the optimal model configuration; The black-box objective function represents the model configuration scheme used. The model's performance on the validation set; To optimize the space for mathematics.
2. The electricity price prediction method based on automated hyperparameter and feature optimization according to claim 1, characterized in that, Selected input features useful for target prediction include: time and calendar features, historical price features, exogenous variable features, and derived statistical features.
3. The electricity price prediction method based on automated hyperparameter and feature optimization according to claim 1, characterized in that, Mathematical optimization space Represented as: ; In the formula, It is a feature selection subspace; It is the data preprocessing subspace; It is the model architecture subspace; It is the training hyperparameter subspace; Among them, mathematical optimization space Each point in the diagram represents a model configuration scheme.
4. The electricity price prediction method based on automated hyperparameter and feature optimization according to claim 1, characterized in that, The selected optimization algorithms are Bayesian optimization, TPE algorithm, genetic algorithm, particle swarm optimization, simulated annealing algorithm, or neural network structure search strategy.
5. The electricity price prediction method based on automated hyperparameter and feature optimization according to claim 1, characterized in that, The electricity price prediction model employs a deep neural network, a long short-term memory network, a gated recurrent unit, a Transformer network, or a gradient boosting decision tree architecture.
6. The electricity price prediction method based on automated hyperparameter and feature optimization according to claim 1, characterized in that, The process of guided iterative optimization search using a selected optimization algorithm specifically includes: Sampling and Evaluation: In the t-th iteration, based on the historical observation dataset, the next most promising evaluation point is selected by maximizing the collection function; based on the selected evaluation point, the corresponding model is built and trained using the training set; the trained model is evaluated on the validation set and a performance score is obtained. Construct a proxy model and provide feedback: The evaluation points and their corresponding performance scores are used as new data points and added to the historical observation dataset to form an updated dataset; a probabilistic proxy model about the "configuration-performance" relationship is maintained, and the updated dataset is used to update the probabilistic proxy model to more accurately fit the configuration-performance relationship; Repeat the sampling and evaluation steps and the surrogate model construction and feedback steps until the preset number of iterations is reached or the set convergence condition is met, and obtain the iterative optimization search results.
7. A power price forecasting system based on automated hyperparameter and feature optimization, characterized in that, include: The data acquisition module is used to acquire forecast input data for a selected time period that meets the input requirements based on the acquired electricity price forecasting model. The electricity price prediction module is used to predict the electricity price based on the input data for the selected time period, and to use the electricity price prediction model to predict the electricity price for the selected time period. The electricity price prediction model is defined, constructed, and trained based on the optimal model configuration scheme. The process of obtaining the optimal model configuration scheme includes: obtaining the target prediction variables for model construction and the selected input features useful for target prediction to form a structured dataset; based on the structured dataset, parameterizing all variable elements in the model construction process and defining them as a mathematical optimization space; within the mathematical optimization space, using the selected optimization algorithm to perform guided iterative optimization search, and obtaining the optimal model configuration scheme after reaching the preset stopping condition. In the process of conducting guided iterative optimization search, the optimization problem that guides the iterative optimization search is expressed as: ; In the formula, To find the optimal model configuration; The black-box objective function represents the model configuration scheme used. The model's performance on the validation set; To optimize the space for mathematics.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the electricity price prediction method based on automated hyperparameter and feature optimization as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the electricity price prediction method based on automated hyperparameter and feature optimization as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the steps of the electricity price prediction method based on automated hyperparameter and feature optimization as described in any one of claims 1 to 6.