recurrent-trend-predictive-neural-network
Recurrent Trend Predictive Neural Network (rTPNN): A neural network model to automatically capture trends in time-series data for improved prediction/forecasting performance
https://github.com/mertnakip/recurrent-trend-predictive-neural-network
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 4 DOI reference(s) in README -
✓Academic publication links
Links to: sciencedirect.com, ieee.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.4%) to scientific vocabulary
Keywords
Repository
Recurrent Trend Predictive Neural Network (rTPNN): A neural network model to automatically capture trends in time-series data for improved prediction/forecasting performance
Basic Info
Statistics
- Stars: 25
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 1
Topics
Metadata Files
README.md
Recurrent Trend Predictive Neural Network

This repository contains the implementation of the Recurrent Trend Predictive Neural Network (rTPNN) model as a Keras layer. In addition, it also contains an application of rTPNN for multi-sensor fire detection in the folder FireDetectionviarTPNN.
You may find a more detailed explanation of the methodology as well as the results in our publication at https://ieeexplore.ieee.org/document/9451553.
Note that it is a particular implementation of rTPNN, and it may be implemented in different ways.
Inputs for rTPNN Layer
Provide input array "x" as shown in the following figure.
An example usage of rTPNN
import numpy as np
from keras.layers import Input, Dense
from keras import Model
from rTPNN_layer import rTPNN
Random Data
numsamples = 100; numfeatures = 5
x = np.random.rand(numsamples, 2, numfeatures)
y = np.random.rand(num_samples)
Create an rTPNN Model
inputlayer = Input(inputshape=(2, num_features,))
rtpnnlayer = rTPNN()(inputlayer)
fullyconnectedlayer = Dense(numfeatures, activation='relu')(rtpnn_layer)
outputlayer = Dense(1, activation='relu')(fullyconnectedlayer)
rTPNNmodel = Model(inputs=[inputlayer], outputs=[output_layer])
rTPNN_model.compile(optimizer='adam', loss='mse')
Train the Model
rTPNNmodel.fit(x, y, epochs=10, batchsize=20, verbose=0)
''' batchsize determines the time interval for the update of recurrence. "The last state for each sample at index i in a batch will be used as initial state for the sample of index i in the following batch." [https://keras.io/api/layers/recurrentlayers/simple_rnn/] '''
Make Prediction
prediction = rTPNNmodel.predict(x, batchsize=1)
Applications of rTPNN
Fire Detection: https://github.com/mertnakip/Recurrent-Trend-Predictive-Neural-Network/tree/main/FireDetectionviarTPNN
Energy Management and Forecasting: https://github.com/mertnakip/Recurrent-Trend-Predictive-Neural-Network/tree/rtpnn_sef
Citation Request
The rTPNN, as well as its application on multi-sensor fire detection, has been published as a journal paper which is entitled "Recurrent Trend Predictive Neural Network for Multi-Sensor Fire Detection" in IEEE Access. If you use rTPNN or the content of this repository, please cite our following paper (along with the repository citation) as follows:
@ARTICLE{nakip2021rTPNN,
author={Nakip, Mert and Güzeliş, Cüneyt and Yildiz, Osman},
journal={IEEE Access},
title={Recurrent Trend Predictive Neural Network for Multi-Sensor Fire Detection},
year={2021},
volume={9},
number={},
pages={84204-84216},
doi={10.1109/ACCESS.2021.3087736}
}
Additional References
rTPNN-FES Architecture for Energy Management
@article{NAKIP_rTPNN_FES,
title = {Renewable energy management in smart home environment via forecast embedded scheduling based on Recurrent Trend Predictive Neural Network},
author={Nak{\i}p, Mert and {\c{C}}opur, Onur and Biyik, Emrah and G{\"u}zeli{\c{s}}, C{\"u}neyt},
journal = {Applied Energy},
volume = {340},
pages = {121014},
year = {2023},
issn = {0306-2619},
doi = {https://doi.org/10.1016/j.apenergy.2023.121014},
url = {https://www.sciencedirect.com/science/article/pii/S0306261923003781}
}
rTPNN with Online Learning for E-Nose
@ARTICLE{bulucu_ertpnn,
author={Bulucu, Pervіn and Nakip, Mert and Güzelіș, Cüneyt},
journal={IEEE Access},
title={Multi-Sensor E-Nose Based on Online Transfer Learning Trend Predictive Neural Network},
year={2024},
volume={12},
number={},
pages={71442-71452},
keywords={Market research;Transfer learning;Long short term memory;Feature extraction;Convolutional neural networks;Quality control;Electronic noses;Multisensor systems;Neural networks;E-Nose;trend prediction;multi-sensor;recurrent trend predictive neural network;online learning},
doi={10.1109/ACCESS.2024.3401569}}
Owner
- Name: Mert NAKIP
- Login: mertnakip
- Kind: user
- Company: Institute of Theoretical and Applied Informatics, Polish Academy of Sciences
- Repositories: 1
- Profile: https://github.com/mertnakip
Ph.D. student and full-time researcher with a focus on IoT & AI. I am honored with the #1 rank in TUBITAK 2241. My MSc. was supported under TÜBİTAK 2210C.
Citation (CITATION.cff)
cff-version: 1.0.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Nakıp
given-names: Mert
orcid: https://orcid.org/0000-0002-6723-6494
title: "Recurrent Trend Predictive Neural Network - Keras Implementation"
version: 1.0.0
doi: 10.5281/zenodo.6560245
date-released: 2022-05-18
GitHub Events
Total
- Watch event: 5
- Fork event: 1
Last Year
- Watch event: 5
- Fork event: 1