# 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:
```bash
git clone https://github.com/ruleminer/InterpreTS.git
cd InterpreTS
```
2. Install dependencies: Install the required packages listed in the `requirements.txt` file:
```python
pip install -r requirements.txt
```
3. Install InterpreTS: Run the following command to install InterpreTS:
```python
pip install interpreTS
```
## Verifying Installation
Once installed, you can verify the installation by running a simple feature extraction example:
```python
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:
```python
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 in the [docs folder](./docs).
## Issues and Support
For any issues, please consult our [Issue Tracker](https://github.com/ruleminer/InterpreTS/issues) on GitHub.
Raw data
{
"_id": null,
"home_page": "https://github.com/ruleminer/InterpreTS",
"name": "InterpreTS",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "time series feature extraction interpretability explainability machine learning",
"author": "['\u0141ukasz Wr\u00f3bel', 'S\u0142awomir Put', 'Martyna \u017bur', 'Martyna Kramarz', 'Jaros\u0142aw Strzelczyk', 'Weronika Wo\u0142owczyk', 'Piotr Krupi\u0144ski']",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/15/dc/a47560dc05442a056c7c0e9d3d3b301c6f42fbad313cef470f265514234c/interprets-0.1.0.tar.gz",
"platform": null,
"description": "# InterpreTS\r\n\r\nInterpreTS 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.\r\n\r\n## Overview\r\nWith 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.\r\n\r\n## Key Features\r\n- **Statistical Features**: Extract basic statistics like mean, standard deviation, minimum, and maximum values.\r\n- **Frequency Features**: Calculate features in the frequency domain, such as Fourier Transform coefficients.\r\n- **Relational Features**: Generate features describing relationships between different time series, such as correlation.\r\n- **Parallel Computing Support**: Efficiently compute features with parallel processing.\r\n- **Data Format Flexibility**: Easily convert and process data in `pandas.DataFrame` or `numpy.array` formats.\r\n\r\n## Requirements\r\n- Python 3.8 or above\r\n- `pandas`\r\n- `numpy`\r\n- `statsmodels`\r\n\r\n## Installation Guide\r\nFollow these steps to install InterpreTS and its dependencies:\r\n\r\n1. **Clone the Repository** \r\n Clone the InterpreTS repository to your local machine:\r\n \r\n ```bash\r\n git clone https://github.com/ruleminer/InterpreTS.git\r\n cd InterpreTS\r\n ```\r\n\r\n2. Install dependencies: Install the required packages listed in the `requirements.txt` file:\r\n\r\n ```python\r\n pip install -r requirements.txt\r\n ```\r\n\r\n3. Install InterpreTS: Run the following command to install InterpreTS:\r\n\r\n ```python\r\n pip install interpreTS\r\n ```\r\n\r\n\r\n## Verifying Installation\r\nOnce installed, you can verify the installation by running a simple feature extraction example:\r\n\r\n ```python\r\n from interpreTS.core.feature_extractor import FeatureExtractor, Features\r\n import pandas as pd\r\n\r\n # Sample time series data\r\n data = pd.DataFrame({'value': [1, 2, 3, 4, 5]})\r\n extractor = FeatureExtractor(features=[Features.LENGTH, Features.MEAN, Features.VARIANCE])\r\n features = extractor.extract_features(data)\r\n print(\"Extracted Features:\\n\", features)\r\n ```\r\n\r\n## Additional Usage Example with Time Series Data\r\nYou can also use InterpreTS with time-indexed data:\r\n\r\n ```python\r\n\r\n from interpreTS.core.time_series_data import TimeSeriesData\r\n from interpreTS.core.feature_extractor import FeatureExtractor, Features\r\n import pandas as pd\r\n\r\n # Time-indexed data\r\n data_with_date = pd.Series(\r\n [5, 3, 6, 2, 7, 4, 8, 3, 9, 1],\r\n index=pd.date_range(\"2023-01-01\", periods=10, freq=\"D\")\r\n )\r\n ts_data = TimeSeriesData(data_with_date)\r\n\r\n # Feature extraction\r\n extractor = FeatureExtractor(features=[Features.LENGTH, Features.MEAN, Features.VARIANCE])\r\n features = extractor.extract_features(ts_data.data)\r\n print(\"\\nExtracted Features from Time Series Data:\\n\", features)\r\n ```\r\n\r\n## Documentation\r\n\r\nComplete documentation is available in the [docs folder](./docs).\r\n\r\n\r\n## Issues and Support\r\n\r\nFor any issues, please consult our [Issue Tracker](https://github.com/ruleminer/InterpreTS/issues) on GitHub.\r\n",
"bugtrack_url": null,
"license": null,
"summary": "Feature extraction from time series to support the creation of interpretable and explainable predictive models.",
"version": "0.1.0",
"project_urls": {
"Documentation": "https://github.com/ruleminer/InterpreTS/docs",
"Homepage": "https://github.com/ruleminer/InterpreTS",
"Source": "https://github.com/ruleminer/InterpreTS",
"Tracker": "https://github.com/ruleminer/InterpreTS/issues"
},
"split_keywords": [
"time",
"series",
"feature",
"extraction",
"interpretability",
"explainability",
"machine",
"learning"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "948c26130971a62f49b8bc970c797e792fe9b64716e0532fadf5da4f31342f77",
"md5": "d3b6b36dac5f63813effe55f9fae5f98",
"sha256": "9071553a89a8e0474400abbcdb332213df56973635fd198bb771471892adcd0f"
},
"downloads": -1,
"filename": "InterpreTS-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d3b6b36dac5f63813effe55f9fae5f98",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 26830,
"upload_time": "2024-11-06T22:41:34",
"upload_time_iso_8601": "2024-11-06T22:41:34.593297Z",
"url": "https://files.pythonhosted.org/packages/94/8c/26130971a62f49b8bc970c797e792fe9b64716e0532fadf5da4f31342f77/InterpreTS-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "15dca47560dc05442a056c7c0e9d3d3b301c6f42fbad313cef470f265514234c",
"md5": "f054db4ca82aac75dce805321260a911",
"sha256": "17a999d015e2d0b6ee9ac989937c63d8b78ad3f185ef4321e8f5535b029b8247"
},
"downloads": -1,
"filename": "interprets-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "f054db4ca82aac75dce805321260a911",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 14504,
"upload_time": "2024-11-06T22:41:36",
"upload_time_iso_8601": "2024-11-06T22:41:36.429613Z",
"url": "https://files.pythonhosted.org/packages/15/dc/a47560dc05442a056c7c0e9d3d3b301c6f42fbad313cef470f265514234c/interprets-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-06 22:41:36",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ruleminer",
"github_project": "InterpreTS",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "interprets"
}