Metadata-Version: 2.1
Name: trane
Version: 0.4.0
Summary: automatically generate prediction problems and labels for supervised learning.
Author-email: MIT Data to AI Lab <dai-lab-trane@mit.edu>
Maintainer-email: MIT Data to AI Lab <dai-lab-trane@mit.edu>
License: MIT License
Project-URL: Source Code, https://github.com/HDI-Project/Trane/
Project-URL: Changes, https://github.com/HDI-Project/Trane/blob/main/docs/changelog.md
Project-URL: Issue Tracker, https://github.com/HDI-Project/Trane/issues
Project-URL: Twitter, https://twitter.com/lab_dai
Keywords: trane,data science,machine learning
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development
Classifier: Topic :: Scientific/Engineering
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Requires-Python: <4,>=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy (>=1.13.0)
Requires-Dist: pandas (>=0.21.0)
Requires-Dist: scipy (>=1.0.0)
Requires-Dist: composeml (>=0.10.1)
Requires-Dist: featuretools
Requires-Dist: scikit-learn
Requires-Dist: tqdm
Requires-Dist: ipywidgets
Provides-Extra: dev
Requires-Dist: ruff (>=0.0.260) ; extra == 'dev'
Requires-Dist: black[jupyter] (>=22.12.0) ; extra == 'dev'
Requires-Dist: pre-commit (==2.20.0) ; extra == 'dev'
Provides-Extra: test
Requires-Dist: pytest (>=3.4.2) ; extra == 'test'
Requires-Dist: pytest-cov (>=2.5.1) ; extra == 'test'
Requires-Dist: pytest-xdist (>=3.1.0) ; extra == 'test'
Requires-Dist: pytest-runner (>=2.11.1) ; extra == 'test'

<p align="center">
<img width=30% src="https://dai.lids.mit.edu/wp-content/uploads/2018/06/Trane-logo-300x180.jpg" alt=“Trane_Logo” />
</p>

<p align="center">
    <a href="https://github.com/HDI-Project/Trane/actions/workflows/tests.yaml" target="_blank">
      <img src="https://github.com/HDI-Project/Trane/actions/workflows/tests.yaml/badge.svg" alt="Tests" />
    </a>
    <a href="https://codecov.io/gh/trane-dev/Trane" >
      <img src="https://codecov.io/gh/trane-dev/Trane/branch/main/graph/badge.svg?token=HafAlYGH8F"/>
    </a>
    <a href="https://badge.fury.io/py/Trane" target="_blank">
        <img src="https://badge.fury.io/py/Trane.svg?maxAge=2592000" alt="PyPI Version" />
    </a>
    <a href="https://pepy.tech/project/Trane" target="_blank">
        <img src="https://static.pepy.tech/badge/tran" alt="PyPI Downloads" />
    </a>
</p>
<hr>

<p align="center">
<i>Automatically formulating machine learning tasks for temporal datasets</i>
</p>

Trane is a software package for automatically generating prediction problems and generating labels for supervised learning. Trane is a system designed to advance the automation of the machine learning problem solving pipeline.

<p align="center">
  <a href="https://www.youtube-nocookie.com/embed/TrK5Tm9ic28"><img src="https://img.youtube.com/vi/TrK5Tm9ic28/0.jpg" width="70%" target="_blank" alt="Trane About Video"></a>
</p>

# Install

To install Trane, run the following command:

```shell
python -m pip install trane
```

# Example

Below is an example of using Trane:

```python
import trane

data = trane.datasets.load_covid()
table_meta = trane.datasets.load_covid_metadata()

entity_col = "Country/Region"
window_size = "2d"
minimum_data = "2020-01-22"
maximum_data = "2020-03-29"
cutoff_strategy = trane.CutoffStrategy(
    entity_col=entity_col,
    window_size=window_size,
    minimum_data=minimum_data,
    maximum_data=maximum_data,
)
time_col = "Date"
problem_generator = trane.PredictionProblemGenerator(
    df=data,
    entity_col=entity_col,
    time_col=time_col,
    cutoff_strategy=cutoff_strategy,
    table_meta=table_meta,
)
problems = problem_generator.generate(data, generate_thresholds=True)
```


## Citing Trane
If you use Trane, please consider citing the following paper:

Ben Schreck, Kalyan Veeramachaneni. [What Would a Data Scientist Ask? Automatically Formulating and Solving Predictive Problems.](https://dai.lids.mit.edu/wp-content/uploads/2017/10/Trane1.pdf) *IEEE DSAA 2016*, 440-451

BibTeX entry:

```bibtex
@inproceedings{schreck2016would,
  title={What Would a Data Scientist Ask? Automatically Formulating and Solving Predictive Problems},
  author={Schreck, Benjamin and Veeramachaneni, Kalyan},
  booktitle={Data Science and Advanced Analytics (DSAA), 2016 IEEE International Conference on},
  pages={440--451},
  year={2016},
  organization={IEEE}
}
```
