Skip to main content

Feature extraction from time series to support the creation of interpretable and explainable predictive models.

Project description

InterpreTS

InterpreTS is a Python library designed for extracting meaningful and interpretable features from time series data to support the creation of interpretable and explainable predictive models.

Overview

With the growing importance of interpretability in machine learning and AI, InterpreTS focuses on creating feature representations that facilitate the development of interpretable and explainable predictive models.

Key Features

  • Statistical Features: Extract basic statistics like mean, standard deviation, minimum, and maximum values.
  • Frequency Features: Calculate features in the frequency domain, such as Fourier Transform coefficients.
  • Relational Features: Generate features describing relationships between different time series, such as correlation.
  • Parallel Computing Support: Efficiently compute features with parallel processing.
  • Data Format Flexibility: Easily convert and process data in pandas.DataFrame or numpy.array formats.

Requirements

  • Python 3.8 or above
  • pandas
  • numpy
  • statsmodels

Installation Guide

Follow these steps to install InterpreTS and its dependencies:

  1. Clone the Repository
    Clone the InterpreTS repository to your local machine:
git clone https://github.com/ruleminer/InterpreTS.git
cd InterpreTS
  1. Install dependencies: Install the required packages listed in the requirements.txt file:
pip install -r requirements.txt
  1. Install InterpreTS: Run the following command to install InterpreTS:
pip install interpreTS

Verifying Installation

Once installed, you can verify the installation by running a simple feature extraction example:

from interpreTS.core.feature_extractor import FeatureExtractor, Features
import pandas as pd

# Sample time series data
data = pd.DataFrame({'value': [1, 2, 3, 4, 5]})
extractor = FeatureExtractor(features=[Features.LENGTH, Features.MEAN, Features.VARIANCE])
features = extractor.extract_features(data)
print("Extracted Features:\n", features)

Additional Usage Example with Time Series Data

You can also use InterpreTS with time-indexed data:

from interpreTS.core.time_series_data import TimeSeriesData
from interpreTS.core.feature_extractor import FeatureExtractor, Features
import pandas as pd

# Time-indexed data
data_with_date = pd.Series(
    [5, 3, 6, 2, 7, 4, 8, 3, 9, 1],
    index=pd.date_range("2023-01-01", periods=10, freq="D")
)
ts_data = TimeSeriesData(data_with_date)

# Feature extraction
extractor = FeatureExtractor(features=[Features.LENGTH, Features.MEAN, Features.VARIANCE])
features = extractor.extract_features(ts_data.data)
print("\nExtracted Features from Time Series Data:\n", features)

Documentation

Complete documentation is available on GitHub Pages.

Issues and Support

For any issues, please consult our Issue Tracker on GitHub.

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

interprets-0.2.0.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

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

InterpreTS-0.2.0-py3-none-any.whl (49.4 kB view details)

Uploaded Python 3

File details

Details for the file interprets-0.2.0.tar.gz.

File metadata

  • Download URL: interprets-0.2.0.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.13

File hashes

Hashes for interprets-0.2.0.tar.gz
Algorithm Hash digest
SHA256 28c8029635f3ab435ca9d384a3836d9f3288437ad9e242067e6fb78c66eea563
MD5 50d326c2c343066bdb739dd05124f408
BLAKE2b-256 3e4d63dd1969088c62d37b3120e44c63051c5458bfd443afce53b566620a2934

See more details on using hashes here.

File details

Details for the file InterpreTS-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: InterpreTS-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 49.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.13

File hashes

Hashes for InterpreTS-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b6fdb2d617d0174275a7978e98c7868d2025c2e743f96db684dee994bd1b3242
MD5 4e529a3775d6fe2cd4367a8fa1fb973c
BLAKE2b-256 b789f5e685c359ed0d1b437fd46fef47d155a46a0da04ae9064aa23e339a91a2

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