https://github.com/ilmarcopardo/narx

NARX Pytorch implementation

https://github.com/ilmarcopardo/narx

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (6.9%) to scientific vocabulary

Keywords

narx pytorch time-series time-series-regression
Last synced: 6 months ago · JSON representation

Repository

NARX Pytorch implementation

Basic Info
  • Host: GitHub
  • Owner: ilmarcopardo
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 2.06 MB
Statistics
  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 1
Topics
narx pytorch time-series time-series-regression
Created 11 months ago · Last pushed 11 months ago
Metadata Files
Readme License

README.md

narxpy: PyTorch NARX Implementation

A simple, reusable PyTorch implementation of a Nonlinear Autoregressive Network with Exogenous Inputs (NARX).

Features

  • Supports configurable input/output delays (d_i, d_o).
  • Handles multi-dimensional exogenous (x) and endogenous (y) time series.
  • Configurable hidden layer size and output activation function.
  • Supports different simulation modes:
    • Close Loop (Parallel): Uses own predictions for feedback (standard simulation/forecasting).
    • Open Loop (Series-Parallel): Uses provided true values for feedback (teacher forcing, common for training).
  • Includes optional bootstrapping for initializing close-loop simulations.

Installation

pip install narxpy

Usage

``` import torch from narxpy import NARX

model = NARX(di=di, do=do, dx=dx, dy=dy, dhl=dhl, actfunc=actfunc) ```

Run Modes

1. Close Loop (Simulation - Default)

y_pred_close = model(x_data, mode="close") print(f"Close loop output shape: {y_pred_close.shape}")

2. Open Loop (Teacher Forcing)

y_pred_open = model(x_data, mode="open", y=y_true) print(f"Open loop output shape: {y_pred_open.shape}")

3. Close Loop with Bootstrap

y_pred_bootstrap = model(x_data, mode="close", y=y_true, bootstrap=bootstrap_steps) print(f"Bootstrap output shape: {y_pred_bootstrap.shape}")

Owner

  • Name: Marco Pardini
  • Login: ilmarcopardo
  • Kind: user

GitHub Events

Total
  • Watch event: 1
  • Public event: 1
  • Push event: 2
Last Year
  • Watch event: 1
  • Public event: 1
  • Push event: 2

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 13 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
pypi.org: narxpy

A PyTorch implementation of a NARX neural network.

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 13 Last month
Rankings
Dependent packages count: 9.3%
Average: 30.8%
Dependent repos count: 52.3%
Maintainers (1)
Last synced: 7 months ago

Dependencies

.github/workflows/python-publish.yml actions
  • actions/checkout v4 composite
  • actions/download-artifact v4 composite
  • actions/setup-python v5 composite
  • actions/upload-artifact v4 composite
  • pypa/gh-action-pypi-publish release/v1 composite
requirements.txt pypi
  • torch >=1.8.0
setup.py pypi
  • torch >=1.8.0