<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <issn pub-type="ppub">1613-0073</issn>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>with Transfer Learning and Temperature Data</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Rania Farah</string-name>
          <email>farah.rania@univ-guelma.dz</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Brahim Farou</string-name>
          <email>farou.brahim@univ-guelma.dz</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Zineddine Kouahla</string-name>
          <email>kouahla.zineddine@univ-guelma.dz</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Hamid Seridi</string-name>
          <email>seridi.hamid@univ-guelma.dz</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Workshop</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="editor">
          <string-name>Prediction, Optimizing Energy, Temperature, Transfer Learning.</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science, LabStic Laboratory</institution>
          ,
          <addr-line>24000, Guelma , ALgeria</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>Accurate prediction of electrical load is crucial for optimising energy management, especially in areas where temperature fluctuations directly influence energy demand. This study proposes an innovative approach by applying transfer learning to improve the accuracy of electrical load predictions by integrating a temperature database. A pre-trained base model is fitted to local temperature data to take advantage of the relationship between climatic conditions and load variations. Results show that this method ofers significant performance gains by reducing prediction errors while optimising training time resources. The proposed approach opens up interesting prospects for resource-constrained environments and use cases requiring fast, reliable predictions.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Electricity load forecasts play a central role in the management and planning of energy resources,
particularly in regions where consumption is strongly influenced by climatic variations [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Studies
show that rising temperatures often lead to higher electricity demand [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], due to increased use of air
conditioning in summer and, in some areas, heating in winter. This correlation highlights the importance
of integrating temperature data into predictive models to improve forecast accuracy, ensuring more
reliable and eficient energy planning.
      </p>
      <p>Accurate electricity load prediction is often hindered by several challenges. One primary issue is the
dynamic relationship between climatic variations and consumption patterns, which can difer across
regions and seasons. Moreover, traditional predictive approaches often require extensive computational
resources and training time, especially when starting from scratch with new datasets. These limitations
can delay the deployment of forecasting models and reduce their scalability for localised applications.</p>
      <p>Transfer learning, which involves adjusting a pre-trained model to suit the particularities of a specific
dataset, presents itself as an efective solution in this context. This technique exploits the knowledge
of an existing model, trained on similar data, to adapt it to local specificities, such as temperature
lfuctuations and consumption patterns. By reducing training time and computational demands, transfer
learning can significantly streamline the model development process.</p>
      <p>Several studies have explored the use of transfer learning in electricity load forecasting, demonstrating
its potential to enhance prediction accuracy while reducing resource usage. For example, models
pretrained on national-level consumption data have been adapted to predict load at regional or urban scales,
achieving promising results. However, limitations remain: many approaches struggle to generalise well
across datasets with starkly diferent features, such as unique temperature-consumption relationships
(H. Seridi)</p>
      <p>CEUR</p>
      <p>ceur-ws.org
or seasonal variations. Additionally, some methods require significant fine-tuning, which can ofset the
computational benefits of transfer learning.</p>
      <p>This study aims to address these gaps by leveraging transfer learning to adapt predictive models
to local temperature and consumption data. By focusing on these specific variables, the approach
ensures better alignment with regional dynamics, enhancing forecast accuracy while maintaining
computational eficiency. The insights gained from this work can aid energy planners in making more
informed decisions, optimising resource allocation, and improving the sustainability of energy systems.</p>
      <p>The remainder of this paper is organised as follows: Section 2 details the data analysis and describes
the datasets used. Section 3 presents methodology and the application of transfer learning. Section 4
ofers the results of the forecasting models, comparing performance metrics and discussing the impact
of transfer learning and a critical discussion, highlighting the implications of the findings in the context
of energy management. Finally, Section 5 concludes the paper by summarising the key insights and
proposing future research directions.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Data Analysis</title>
      <sec id="sec-2-1">
        <title>2.1. Data Description</title>
        <p>The datasets used in this study comprise two primary components: temperature data and electricity
consumption data. The temperature dataset includes daily minimum, maximum, and average values,
ofering a comprehensive view of climatic conditions over approximately eight years. This data is
crucial, as temperature variations directly influence electricity demand, particularly during extreme
weather conditions.</p>
        <p>The electricity consumption dataset contains daily profiles with 24 columns, each representing hourly
consumption from 1h to 24h. The rows correspond to individual days, providing detailed temporal
patterns of electricity use. This structure captures not only the daily peaks but also intraday fluctuations
that reflect user behaviour and external factors like weather.</p>
        <p>Both datasets underwent preprocessing to ensure consistency. Missing values were interpolated
where necessary, and anomalies were removed to enhance data quality. The strong correlation between
these datasets, highlighted by exploratory analysis, provides an excellent foundation for transfer learning
approaches, as the relationship between temperature and electricity consumption is a key driver of
energy demand.</p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2. Data Analysis</title>
        <p>In this context, it is essential to perform an exploratory analysis of the data to understand the impact of
temperature variations on electricity consumption. Calculating the linear correlation coeficient, we
confirmed that temperature is strongly correlated with electricity demand, revealing a direct and
significant relationship between these two variables, as shown in Figure 1. This correlation is mathematically
expressed by Equation 1:

 =</p>
        <p>∑(  − ) (̄  −  )̄
√∑(  − ) ̄ 2 ∑(  −  )̄ 2
(1)</p>
        <p>
          When analysing consumption profiles, we observed peaks in summer, particularly in August, as
shown in Figure 2. These peaks are driven by high temperatures [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ], which increase demand for air
conditioning and other cooling systems [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]. These observations underline the importance of modelling
these seasonal variations in forecasts to more accurately anticipate energy needs and meet demand
requirements.
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Approach-Based Transfer Learning</title>
      <p>
        Transfer learning is a technique that involves reusing a model pre-trained on one task and adapting it
for another related task. By transferring the learnt knowledge, such as feature representations, this
approach accelerates the learning process and enhances predictive performance, particularly when data
or computational resources are limited [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <sec id="sec-3-1">
        <title>3.1. Base Model and Pre-training Data</title>
        <p>In this study, the base model used is a feedforward artificial neural network (ANN). This model was first
trained on historical temperature data to predict daily maximum temperatures. The pre-training dataset
included key meteorological variables such as minimum, maximum, and average temperatures over
several years, providing a rich source of patterns for the model to learn. During this stage, the ANN
learnt the intricate relationships between daily temperatures and their influencing factors, producing
accurate maximum temperature predictions.</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. Adapting to Electricity Consumption</title>
        <p>Once the temperature prediction model was trained, its weights—representing the features and
relationships it learnt—were transferred to a second ANN model designed for electricity load forecasting.
This adaptation required minimal adjustments, as both tasks are closely related due to the significant
influence of temperature on electricity consumption.</p>
        <p>The adaptation process involved fine-tuning the transferred weights using a dataset of electricity
consumption. This dataset consisted of daily maximum consumption values and hourly consumption
profiles, combined with corresponding temperature data. The model was further optimised to capture
the specific characteristics of the local energy demand, such as peak usage during hot weather.</p>
      </sec>
      <sec id="sec-3-3">
        <title>3.3. Projection of 24-Hour Demand</title>
        <p>After predicting the daily maximum electricity consumption, the model projected this value onto a
predetermined consumption profile to estimate hourly electricity demand over 24 hours. This projection
ensured that the forecast aligned with observed daily patterns, efectively capturing both peak and
of-peak periods.</p>
      </sec>
      <sec id="sec-3-4">
        <title>3.4. Key Features of the Approach</title>
        <p>Consistency Across Years: Electricity consumption data revealed stable demand profiles over time,
despite seasonal variations (Figure 3 3). This consistency made the application of transfer learning
particularly efective, as the learnt relationships between temperature and consumption generalised
well across diferent periods.</p>
        <p>Resource Optimisation: By leveraging pre-trained models, this methodology minimised the need for
extensive training on large datasets, significantly reducing computational costs and storage
requirements.</p>
        <p>Accuracy and Eficiency: Transfer learning improved the model’s ability to predict electricity
consumption accurately, achieving results with far fewer training epochs compared to training a model
from scratch.</p>
        <p>This methodology provides a robust framework for energy demand forecasting, enabling eficient
resource management while maintaining high prediction accuracy.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Results</title>
      <p>Transfer learning demonstrates significant advantages in the domain of electric load prediction, as
validated by this study. By leveraging pre-trained artificial neural networks (ANNs), the approach
efectively reduces the computational burden and time required for training, which is especially critical
when working with data that is resource-intensive to collect. This eficiency is evident in our
experiments, where transfer learning required only 20 epochs to achieve optimal performance, compared to
200 epochs for models trained from scratch.</p>
      <p>The methodology also enhances predictive accuracy by transferring generalisable features learnt
during the temperature prediction task to the electricity consumption task. In this study, the ANN was
initially trained to predict daily maximum temperatures, capturing fundamental patterns in the data.
To evaluate the performance of the forecasting models, three key metrics were used: root mean squared
error (RMSE), mean absolute error (MAE), and accuracy (calculated as 100 − mean absolute percentage
error (MAPE)). Each metric provides a distinct perspective on the model’s prediction quality:</p>
      <p>RMSE measures the standard deviation of prediction errors, giving greater weight to large errors,
which makes it useful for identifying significant deviations. A lower RMSE indicates a model with
better overall accuracy.</p>
      <p>1</p>
      <p>√  =1
RMSE =
∑ (  −  ̂ )2
(2)
MAE quantifies the average magnitude of prediction errors without considering their direction. It is
(3)
(4)
(5)
straightforward and easy to interpret, ofering insight into the typical error magnitude.</p>
      <p>Accuracy, derived from 100 − MAPE, reflects the proportion of correct predictions relative to the
actual values. It is a valuable metric for assessing the model’s practical utility, as it indicates the
percentage of accurate forecasts.</p>
      <p>MAE =
∑ |  −  ̂ |

1
balancing sensitivity to outliers (RMSE), average error magnitude (MAE), and overall prediction
reliability (accuracy).</p>
      <p>The model’s pre-trained weights were then adapted to forecast daily maximum electricity
consumption, utilising the strong correlation between temperature and energy demand. As shown in Table 1,
this transfer approach successfully identified consumption variations linked to temperature fluctuations,
achieving high reliability and precision.</p>
      <p>Another key benefit of transfer learning is its adaptability to local data. By fine-tuning the
pretrained model, it efectively captured regional patterns, such as increased electricity usage during hot
weather, which are critical for accurate demand forecasting. Additionally, the approach reduced data
requirements, making it possible to generate reliable predictions even with limited training data by
leveraging the foundational knowledge embedded in the initial model.</p>
      <p>Overall, the results highlight the value of transfer learning in improving forecasting accuracy,
reducing computational overhead, and addressing data limitations, making it a powerful tool for energy
management and planning.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Conclusion</title>
      <p>This study demonstrates the efectiveness of transfer learning in improving the accuracy of electrical
load predictions by leveraging the strong correlation between temperature variations and electricity
demand. By adapting pre-trained models to local data, we successfully reduced training time and
computational requirements while enhancing prediction reliability. The results highlighted notable
seasonal patterns, such as summer peaks in electricity consumption, particularly in August, driven
by high temperatures. Moreover, the transfer learning approach significantly reduced the need for
extensive data storage, making it a practical and resource-eficient solution for energy management.</p>
      <p>In the future, this methodology could be extended by integrating additional weather variables, such
as humidity and wind speed, to refine model accuracy and capture complex interactions influencing
electricity consumption. Applying the transfer learning approach to datasets from diverse regions with
varying climatic conditions would further validate its adaptability and generalizability. Additionally,
developing real-time prediction systems based on this approach could enable energy providers to
anticipate short-term fluctuations, optimize grid operations, and better integrate renewable energy
sources.</p>
      <p>This study not only provides a robust framework for forecasting but also highlights promising
directions for advancing predictive modeling in the energy sector.</p>
    </sec>
    <sec id="sec-6">
      <title>Declaration on Generative AI</title>
      <p>During the preparation of this work, the author used Chat-GPT-3 order to: Grammar and spelling check.
After using this tool, the authors reviewed and edited the content as needed and take full responsibility
for the publication’s content.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>C.</given-names>
            <surname>Kuster</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Rezgui</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Mourshed</surname>
          </string-name>
          ,
          <article-title>Electrical load forecasting models: A critical systematic review</article-title>
          ,
          <source>Sustainable cities and society 35</source>
          (
          <year>2017</year>
          )
          <fpage>257</fpage>
          -
          <lpage>270</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>R.</given-names>
            <surname>Farah</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Farou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Kouahla</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Seridi</surname>
          </string-name>
          ,
          <article-title>Data driven models on load forecasting: Case study algeria</article-title>
          ,
          <source>Data in Brief</source>
          <volume>52</volume>
          (
          <year>2024</year>
          )
          <fpage>109854</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>F.</given-names>
            <surname>Rania</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Brahim</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Zineddine</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Hamid</surname>
          </string-name>
          ,
          <article-title>A comparison of the finest electrical energy forecast models (</article-title>
          <year>2023</year>
          )
          <fpage>570</fpage>
          -
          <lpage>575</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>R.</given-names>
            <surname>Ye</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Dai</surname>
          </string-name>
          ,
          <article-title>Implementing transfer learning across diferent datasets for time series forecasting</article-title>
          ,
          <source>Pattern Recognition</source>
          <volume>109</volume>
          (
          <year>2021</year>
          )
          <fpage>107617</fpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>