ml-stars


Nameml-stars JSON
Version 0.2.3 PyPI version JSON
download
home_pagehttps://github.com/sintel-dev/ml-stars
SummaryPrimitives and Pipelines for Time Series Data.
upload_time2024-12-10 16:13:44
maintainerNone
docs_urlNone
authorMIT Data To AI Lab
requires_python<3.13,>=3.8
licenseMIT license
keywords mlstars
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="left">
  <a href="https://dai.lids.mit.edu">
    <img width=15% src="https://dai.lids.mit.edu/wp-content/uploads/2018/06/Logo_DAI_highres.png" alt="DAI-Lab" />
  </a>
  <i>An Open Source Project from the <a href="https://dai.lids.mit.edu">Data to AI Lab, at MIT</a></i>
</p>

[![Development Status](https://img.shields.io/badge/Development%20Status-2%20--%20Pre--Alpha-yellow)](https://pypi.org/search/?c=Development+Status+%3A%3A+2+-+Pre-Alpha)
[![PyPi Shield](https://img.shields.io/pypi/v/ml-stars.svg)](https://pypi.python.org/pypi/ml-stars)
[![Tests](https://github.com/sintel-dev/ml-stars/workflows/Run%20Tests/badge.svg)](https://github.com/sintel-dev/ml-stars/actions?query=workflow%3A%22Run+Tests%22+branch%3Amaster)
[![Downloads](https://pepy.tech/badge/ml-stars)](https://pepy.tech/project/ml-stars)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/MLBazaar/MLBlocks/master?filepath=examples/tutorials)

# ml-stars

Primitives for machine learning and time series.

* Github: https://github.com/sintel-dev/ml-stars
* License: [MIT](https://github.com/sintel-dev/ml-stars/blob/master/LICENSE)
* Development Status: [Pre-Alpha](https://pypi.org/search/?c=Development+Status+%3A%3A+2+-+Pre-Alpha)

# Overview

This repository contains primitive annotations to be used by the MLBlocks library, as well as
the necessary Python code to make some of them fully compatible with the MLBlocks API requirements.

There is also a collection of custom primitives contributed directly to this library, which either
combine third party tools or implement new functionalities from scratch.

# Installation

## Requirements

**ml-stars** has been developed and tested on [Python 3.8, 3.9, 3.10, 3.11, and 3.12](https://www.python.org/downloads/)

Also, although it is not strictly required, the usage of a
[virtualenv](https://virtualenv.pypa.io/en/latest/) is highly recommended in order to avoid
interfering with other software installed in the system where **ml-stars** is run.

## Install with pip

The easiest and recommended way to install **ml-stars** is using [pip](https://pip.pypa.io/en/stable/):

```bash
pip install ml-stars
```

This will pull and install the latest stable release from [PyPi](https://pypi.org/).

If you want to install from source or contribute to the project please read the
[Contributing Guide](https://github.com/sintel-dev/ml-stars/blob/master/CONTRIBUTING.rst).

# Quickstart

This section is a short series of tutorials to help you getting started with ml-stars.

We will be executing a single primitive for data transformation.

### 1. Load a Primitive

The first step in order to run a primitive is to load it.

This will be done using the `mlstars.load_primitive` function, which will
load the indicated primitive as an [MLBlock Object from MLBlocks](https://MLBazaar.github.io/MLBlocks/api/mlblocks.html#mlblocks.MLBlock)

In this case, we will load the `sklearn.preprocessing.MinMaxScaler` primitive.

```python3
from mlstars import load_primitive

primitive = load_primitive('sklearn.preprocessing.MinMaxScaler')
```

### 2. Load some data

The StandardScaler is a transformation primitive which scales your data into a given range.

To use this primtives, we generate a synthetic data with some numeric values.
```python3
import numpy as np

data = np.array([10, 1, 3, -1, 5, 6, 0, 4, 13, 4]).reshape(-1, 1)
```

The `data` is a list of integers where their original range is between [-1, 13].


### 3. Fit the primitive

In order to run our primitive, we first need to fit it.

This is the process where it analyzes the data to detect what is the original range of the data.

This is done by calling its `fit` method and passing the `data` as `X`.

```python3
primitive.fit(X=data)
```

### 4. Produce results

Once the pipeline is fit, we can process the data by calling the `produce` method of the
primitive instance and passing agin the `data` as `X`.

```python3
transformed = primitive.produce(X=data)
transformed
```

After this is done, we can see how the transformed data contains the transformed values:

```
array([[0.78571429],
       [0.14285714],
       [0.28571429],
       [0.        ],
       [0.42857143],
       [0.5       ],
       [0.07142857],
       [0.35714286],
       [1.        ],
       [0.35714286]])
```

The data is now in [0, 1] range.

## What's Next?

Documentation


# History

## 0.2.3 – 2024-12-10

* ``SimpleImputer`` primitive update [Issue#17](https://github.com/sintel-dev/ml-stars/issues/17) - by @sarahmish

## 0.2.2 – 2024-12-03

Re-release of previous version

## 0.2.1 – 2024-11-25

* Adapter for MinMaxScaler [Issue #16](https://github.com/sintel-dev/ml-stars/issues/16) - by @sarahmish 
* Add python 3.12 [Issue #15](https://github.com/sintel-dev/ml-stars/issues/15) - by @sarahmish 


## 0.2.0 – 2023-10-24

* Upgrade python tests & remove python 3.7 [Issue #11](https://github.com/sintel-dev/ml-stars/issues/11) - by @sarahmish
* Add deprecation warning for old ARIMA primitive [Issue #10](https://github.com/sintel-dev/ml-stars/issues/10) - by @sarahmish
* Remove python 3.6 [Issue #9](https://github.com/sintel-dev/ml-stars/issues/9) - by @sarahmish
* Add support for python 3.10 & 3.11 [Issue #8](https://github.com/sintel-dev/ml-stars/issues/8) - by @sarahmish


## 0.1.3 – 2023-09-25

* Update ``keras`` adapter [Issue #7](https://github.com/sintel-dev/ml-stars/issues/7) - by @sarahmish


## 0.1.2 – 2023-08-04

* Add python 3.9 [Issue #6](https://github.com/sintel-dev/ml-stars/issues/6) - by @sarahmish


## 0.1.1 - 2023-05-17

* Fix ARIMA adapter [Issue #5](https://github.com/sintel-dev/ml-stars/issues/5) - by @sarahmish
* Add Documentation [Issue #4](https://github.com/sintel-dev/ml-stars/issues/4) - by @sarahmish


## 0.1.0 - 2023-04-18

First official ml-stars release to PyPI: https://pypi.org/project/ml-stars/

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/sintel-dev/ml-stars",
    "name": "ml-stars",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.8",
    "maintainer_email": null,
    "keywords": "mlstars",
    "author": "MIT Data To AI Lab",
    "author_email": "dailabmit@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/5b/37/45da234a7f1c5604c5cf69035d9905b379f961d8481d567e2dbadcf27f16/ml_stars-0.2.3.tar.gz",
    "platform": null,
    "description": "<p align=\"left\">\n  <a href=\"https://dai.lids.mit.edu\">\n    <img width=15% src=\"https://dai.lids.mit.edu/wp-content/uploads/2018/06/Logo_DAI_highres.png\" alt=\"DAI-Lab\" />\n  </a>\n  <i>An Open Source Project from the <a href=\"https://dai.lids.mit.edu\">Data to AI Lab, at MIT</a></i>\n</p>\n\n[![Development Status](https://img.shields.io/badge/Development%20Status-2%20--%20Pre--Alpha-yellow)](https://pypi.org/search/?c=Development+Status+%3A%3A+2+-+Pre-Alpha)\n[![PyPi Shield](https://img.shields.io/pypi/v/ml-stars.svg)](https://pypi.python.org/pypi/ml-stars)\n[![Tests](https://github.com/sintel-dev/ml-stars/workflows/Run%20Tests/badge.svg)](https://github.com/sintel-dev/ml-stars/actions?query=workflow%3A%22Run+Tests%22+branch%3Amaster)\n[![Downloads](https://pepy.tech/badge/ml-stars)](https://pepy.tech/project/ml-stars)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/MLBazaar/MLBlocks/master?filepath=examples/tutorials)\n\n# ml-stars\n\nPrimitives for machine learning and time series.\n\n* Github: https://github.com/sintel-dev/ml-stars\n* License: [MIT](https://github.com/sintel-dev/ml-stars/blob/master/LICENSE)\n* Development Status: [Pre-Alpha](https://pypi.org/search/?c=Development+Status+%3A%3A+2+-+Pre-Alpha)\n\n# Overview\n\nThis repository contains primitive annotations to be used by the MLBlocks library, as well as\nthe necessary Python code to make some of them fully compatible with the MLBlocks API requirements.\n\nThere is also a collection of custom primitives contributed directly to this library, which either\ncombine third party tools or implement new functionalities from scratch.\n\n# Installation\n\n## Requirements\n\n**ml-stars** has been developed and tested on [Python 3.8, 3.9, 3.10, 3.11, and 3.12](https://www.python.org/downloads/)\n\nAlso, although it is not strictly required, the usage of a\n[virtualenv](https://virtualenv.pypa.io/en/latest/) is highly recommended in order to avoid\ninterfering with other software installed in the system where **ml-stars** is run.\n\n## Install with pip\n\nThe easiest and recommended way to install **ml-stars** is using [pip](https://pip.pypa.io/en/stable/):\n\n```bash\npip install ml-stars\n```\n\nThis will pull and install the latest stable release from [PyPi](https://pypi.org/).\n\nIf you want to install from source or contribute to the project please read the\n[Contributing Guide](https://github.com/sintel-dev/ml-stars/blob/master/CONTRIBUTING.rst).\n\n# Quickstart\n\nThis section is a short series of tutorials to help you getting started with ml-stars.\n\nWe will be executing a single primitive for data transformation.\n\n### 1. Load a Primitive\n\nThe first step in order to run a primitive is to load it.\n\nThis will be done using the `mlstars.load_primitive` function, which will\nload the indicated primitive as an [MLBlock Object from MLBlocks](https://MLBazaar.github.io/MLBlocks/api/mlblocks.html#mlblocks.MLBlock)\n\nIn this case, we will load the `sklearn.preprocessing.MinMaxScaler` primitive.\n\n```python3\nfrom mlstars import load_primitive\n\nprimitive = load_primitive('sklearn.preprocessing.MinMaxScaler')\n```\n\n### 2. Load some data\n\nThe StandardScaler is a transformation primitive which scales your data into a given range.\n\nTo use this primtives, we generate a synthetic data with some numeric values.\n```python3\nimport numpy as np\n\ndata = np.array([10, 1, 3, -1, 5, 6, 0, 4, 13, 4]).reshape(-1, 1)\n```\n\nThe `data` is a list of integers where their original range is between [-1, 13].\n\n\n### 3. Fit the primitive\n\nIn order to run our primitive, we first need to fit it.\n\nThis is the process where it analyzes the data to detect what is the original range of the data.\n\nThis is done by calling its `fit` method and passing the `data` as `X`.\n\n```python3\nprimitive.fit(X=data)\n```\n\n### 4. Produce results\n\nOnce the pipeline is fit, we can process the data by calling the `produce` method of the\nprimitive instance and passing agin the `data` as `X`.\n\n```python3\ntransformed = primitive.produce(X=data)\ntransformed\n```\n\nAfter this is done, we can see how the transformed data contains the transformed values:\n\n```\narray([[0.78571429],\n       [0.14285714],\n       [0.28571429],\n       [0.        ],\n       [0.42857143],\n       [0.5       ],\n       [0.07142857],\n       [0.35714286],\n       [1.        ],\n       [0.35714286]])\n```\n\nThe data is now in [0, 1] range.\n\n## What's Next?\n\nDocumentation\n\n\n# History\n\n## 0.2.3 \u2013 2024-12-10\n\n* ``SimpleImputer`` primitive update [Issue#17](https://github.com/sintel-dev/ml-stars/issues/17) - by @sarahmish\n\n## 0.2.2 \u2013 2024-12-03\n\nRe-release of previous version\n\n## 0.2.1 \u2013 2024-11-25\n\n* Adapter for MinMaxScaler [Issue #16](https://github.com/sintel-dev/ml-stars/issues/16) - by @sarahmish \n* Add python 3.12 [Issue #15](https://github.com/sintel-dev/ml-stars/issues/15) - by @sarahmish \n\n\n## 0.2.0 \u2013 2023-10-24\n\n* Upgrade python tests & remove python 3.7 [Issue #11](https://github.com/sintel-dev/ml-stars/issues/11) - by @sarahmish\n* Add deprecation warning for old ARIMA primitive [Issue #10](https://github.com/sintel-dev/ml-stars/issues/10) - by @sarahmish\n* Remove python 3.6 [Issue #9](https://github.com/sintel-dev/ml-stars/issues/9) - by @sarahmish\n* Add support for python 3.10 & 3.11 [Issue #8](https://github.com/sintel-dev/ml-stars/issues/8) - by @sarahmish\n\n\n## 0.1.3 \u2013 2023-09-25\n\n* Update ``keras`` adapter [Issue #7](https://github.com/sintel-dev/ml-stars/issues/7) - by @sarahmish\n\n\n## 0.1.2 \u2013 2023-08-04\n\n* Add python 3.9 [Issue #6](https://github.com/sintel-dev/ml-stars/issues/6) - by @sarahmish\n\n\n## 0.1.1 - 2023-05-17\n\n* Fix ARIMA adapter [Issue #5](https://github.com/sintel-dev/ml-stars/issues/5) - by @sarahmish\n* Add Documentation [Issue #4](https://github.com/sintel-dev/ml-stars/issues/4) - by @sarahmish\n\n\n## 0.1.0 - 2023-04-18\n\nFirst official ml-stars release to PyPI: https://pypi.org/project/ml-stars/\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "Primitives and Pipelines for Time Series Data.",
    "version": "0.2.3",
    "project_urls": {
        "Homepage": "https://github.com/sintel-dev/ml-stars"
    },
    "split_keywords": [
        "mlstars"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b813a8ff62e41d829ed818216a706a70b2e4bb35b0eb9a883ca3cb72021a9c24",
                "md5": "2539be162348e55e8d86aabb054aedbe",
                "sha256": "1176e9eabfb85c29414c764f509f8901a0808aeef05b22866be2546e4b5a41d4"
            },
            "downloads": -1,
            "filename": "ml_stars-0.2.3-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2539be162348e55e8d86aabb054aedbe",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": "<3.13,>=3.8",
            "size": 62262,
            "upload_time": "2024-12-10T16:13:42",
            "upload_time_iso_8601": "2024-12-10T16:13:42.960501Z",
            "url": "https://files.pythonhosted.org/packages/b8/13/a8ff62e41d829ed818216a706a70b2e4bb35b0eb9a883ca3cb72021a9c24/ml_stars-0.2.3-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5b3745da234a7f1c5604c5cf69035d9905b379f961d8481d567e2dbadcf27f16",
                "md5": "c09247288fcb431115cc2182673cff1d",
                "sha256": "75296df4cb1ad67240aad4ec3833fc779de8908306bafa60354de3ccd24bd01e"
            },
            "downloads": -1,
            "filename": "ml_stars-0.2.3.tar.gz",
            "has_sig": false,
            "md5_digest": "c09247288fcb431115cc2182673cff1d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.8",
            "size": 91578,
            "upload_time": "2024-12-10T16:13:44",
            "upload_time_iso_8601": "2024-12-10T16:13:44.456292Z",
            "url": "https://files.pythonhosted.org/packages/5b/37/45da234a7f1c5604c5cf69035d9905b379f961d8481d567e2dbadcf27f16/ml_stars-0.2.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-10 16:13:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sintel-dev",
    "github_project": "ml-stars",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "ml-stars"
}
        
Elapsed time: 8.67456s