Metadata-Version: 2.1
Name: ml_tooling
Version: 0.10.3
Summary: A library for machine learning utilities
Home-page: https://github.com/andersbogsnes/ml_tooling
Author: Anders Bogsnes
Author-email: abanbn@almbrand.dk
Maintainer: Anders Bogsnes
Maintainer-email: abanbn@almbrand.dk
License: MIT
Project-URL: Documentation, https://ml-tooling.readthedocs.io/en/stable/
Project-URL: Bug Tracker, https://github.com/andersbogsnes/ml_tooling/issues
Project-URL: Source Code, https://github.com/andersbogsnes/ml_tooling
Description: # Model Tooling library
        [![Build Status](https://travis-ci.com/andersbogsnes/ml_tooling.svg?branch=master)](https://travis-ci.com/andersbogsnes/ml_tooling)
        [![codecov](https://codecov.io/gh/andersbogsnes/ml_tooling/branch/develop/graph/badge.svg)](https://codecov.io/gh/andersbogsnes/ml_tooling)
        [![Python 3](https://pyup.io/repos/github/andersbogsnes/ml_tooling/python-3-shield.svg)](https://pyup.io/repos/github/andersbogsnes/ml_tooling/)
        [![Updates](https://pyup.io/repos/github/andersbogsnes/ml_tooling/shield.svg)](https://pyup.io/repos/github/andersbogsnes/ml_tooling/)
        [![CodeFactor](https://www.codefactor.io/repository/github/andersbogsnes/ml_tooling/badge)](https://www.codefactor.io/repository/github/andersbogsnes/ml_tooling)
        [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
        
        ## Installation
        Use pip to install:
        `pip install ml-tooling`
        Or use conda
        `conda install -c conda-forge ml_tooling`
        
        ## Test
        We use `tox` for managing build and test environments, to install `tox` run:
        `pip install tox`
        And to run tests:
        `tox -e py`
        
        ## Example usage
        Define a class using ModelData and implement the two required methods.
        Here we simply implement a linear regression on the Boston dataset using sklearn.datasets
        ```python
        from sklearn.datasets import load_boston
        from sklearn.linear_model import LinearRegression
        
        from ml_tooling import Model
        from ml_tooling.data import Dataset
        
        # Define a new data class
        class BostonData(Dataset):
            def load_prediction_data(self, idx):
                x, _ = load_boston(return_X_y=True)
                return x[idx] # Return given observation
        
            def load_training_data(self):
                return load_boston(return_X_y=True)
        
        # Instantiate a model with an estimator
        linear_boston = Model(LinearRegression())
        
        # Instantiate the data
        data = BostonData()
        
        # Split training and test data
        data.create_train_test()
        
        # Score the estimator yielding a Result object
        result = linear_boston.score_estimator(data)
        
        # Visualize the result
        result.plot.prediction_error()
        
        print(result)
        <Result LinearRegression: {'r2': 0.68}>
        ```
        
        
        ## Links
        * Documentation: https://ml-tooling.readthedocs.io
        * Releases: https://pypi.org/project/ml_tooling/
        * Code: https://github.com/andersbogsnes/ml_tooling
        * Issue Tracker: https://github.com/andersbogsnes/ml_tooling/issues
        
Keywords: ml,framework,tooling
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Intended Audience :: Developers
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Provides-Extra: tests
Provides-Extra: dev
Provides-Extra: artifactory
Provides-Extra: docs
