Skip to main content

A collection of 7 time series analysis programs

Project description

Time Series Programs Library

A Python library containing 7 time series analysis programs for forecasting and analysis using the AirPassengers dataset.

Installation

You can install this package using pip:

pip install .

Or for development mode:

pip install -e .

Requirements

  • Python >= 3.7
  • pandas >= 1.3.0
  • numpy >= 1.21.0
  • matplotlib >= 3.4.0
  • statsmodels >= 0.13.0
  • scikit-learn >= 0.24.0

Usage

After installation, you can import and run any of the 7 programs:

from ts_programs import p1, p2, p3, p4, p5, p6, p7

# Run program 1: Exponential Smoothing Methods
p1()

# Run program 2: Stationarity Testing
p2()

# Run program 3: Moving Averages & ACF/PACF
p3()

# Run program 4: AutoRegressive Models
p4()

# Run program 5: Moving Average Models
p5()

# Run program 6: ARMA Model
p6()

# Run program 7: ARIMA Model
p7()

Programs Overview

p1() - Exponential Smoothing Methods

Compares Simple Moving Average (SMA), Simple Exponential Smoothing (SES), and Holt-Winters forecasting methods. Displays metrics (MAE, MSE, RMSE) and visualization plots.

p2() - Stationarity Testing

Tests for stationarity using Augmented Dickey-Fuller (ADF) and KPSS tests. Compares the original series with white noise.

p3() - Moving Averages & ACF/PACF Plots

Visualizes moving averages (6-month and 12-month) and autocorrelation functions (ACF and PACF).

p4() - AutoRegressive (AR) Models

Fits AR models of various orders (1, 2, 3, 5, 10) and evaluates their performance using MAE, MSE, and RMSE.

p5() - Moving Average (MA) Models

Fits MA models of various orders (1, 2, 3, 5) and evaluates their performance.

p6() - ARMA Model

Fits an ARMA(2,1) model and generates forecasts for the test period.

p7() - ARIMA Model

Fits an ARIMA(2,1,2) model and generates future forecasts.

Data Requirements

All programs expect an AirPassengers.csv file in your current working directory with the following structure:

  • Column 1: Month (date column)
  • Column 2: #Passengers (numerical values)

You can download the AirPassengers dataset from various sources or use your own time series data with the same format.

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ts_programs_gg-1.0.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ts_programs_gg-1.0.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file ts_programs_gg-1.0.0.tar.gz.

File metadata

  • Download URL: ts_programs_gg-1.0.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for ts_programs_gg-1.0.0.tar.gz
Algorithm Hash digest
SHA256 70893bde7c053cf5e28f1d1bf77452e7d791ab165075d85fdb7d48e42397eb2a
MD5 02149447d566706934a40a36fe223e0b
BLAKE2b-256 9d49d70bce0a63ef8de4684252574242f9c04186b527df01da4674b9798f96b6

See more details on using hashes here.

File details

Details for the file ts_programs_gg-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: ts_programs_gg-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for ts_programs_gg-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f5963a83b00bef04dfdcf6118c4b9b49c87add362aae359c3c0a9fe276554a4
MD5 8d928327f99fd1ef5f411514aae7dc42
BLAKE2b-256 2e73877ea68935d6dcbf225ad111551a339290e6df82d7357c5884d4d74aef20

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page