Skip to main content

Open source library for the Datrics models deserialization

Project description

Descripton

Open source library for the Datrics models deserialization

Initial source

The solution is based on https://github.com/mlrequest/sklearn-json library

Getting Started

datrics-json makes importing the models imlemented in the Datrics AI platform from their JSON representation

Install

pip install datrics-json

Example Usage

import datrics_json as datjson

model_dict = datjson.from_json(file_name)
deserialized_model = list(model_dict.get('trained_models').values())[0]['model']

sample_data = model_dict.get('sample_data')['input']

deserialized_model.predict(sample_data)

Features

sklearn-json requires scikit-learn >= 0.22.2. LightGBM >= 2.3.1

Supported scikit-learn Models

  • sklearn.linear_model.LogisticRegression
  • sklearn.ensemble.IsolationForest
  • sklearn.clustering.KMeans
  • sklearn.clustering.DBSCAN
  • sklearn.linear_model.LinearRegression
  • sklearn.linear_model.Ridge
  • sklearn.linear_model.Lasso
  • sklearn.linear_model.ElasticNet

Supported lightGBM Models

  • lightgbm.LGBMClassifier - binary - Gradient Boosting Trees
  • lightgbm.LGBMClassifier - multiclass - Gradient Boosting Trees
  • lightgbm.LGBMClassifier - binary - Random Forest
  • lightgbm.LGBMClassifier - multiclass - Random Forest
  • lightgbm.LGBMRegressor - Gradient Boosting Trees
  • lightgbm.LGBMRegressor - Random Forest

Test data

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

datrics_json-0.0.1.tar.gz (120.7 kB view details)

Uploaded Source

Built Distribution

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

datrics_json-0.0.1-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file datrics_json-0.0.1.tar.gz.

File metadata

  • Download URL: datrics_json-0.0.1.tar.gz
  • Upload date:
  • Size: 120.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

File hashes

Hashes for datrics_json-0.0.1.tar.gz
Algorithm Hash digest
SHA256 49a207ba53a7ba3697d00af471a689c3a961ab8390b4fc28cdaeb53c67d6b25e
MD5 f4f25ac4e72be6efadf1af34c24304c2
BLAKE2b-256 4927585a9b960b5fc6a76e857df9fefc3d470c2294ce2f4dac06c9e29efc401e

See more details on using hashes here.

File details

Details for the file datrics_json-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: datrics_json-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

File hashes

Hashes for datrics_json-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c13d9d9609c4ca83cbd6a606772a5415f65eaf5e756c95d995f8c39dcb12223f
MD5 2847fa8af96b920cf292c295ed561290
BLAKE2b-256 2e53d4e074ee8c64e995c19d9c698f56d943f9ecc261b25f95e29d8451e8c230

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