Skip to main content

A consistent interface for creating Machine Learning Models compatible with VisualFabriq environment

Project description

# portalytics Portable Jupyter Setup for Machine Learning.

A consistent interface for creating Machine Learning Models compatible with VisualFabriq environment.

Build models using our portalytics module. The module is available as [pip package](https://pypi.org/project/vf-portalytics/), install simply by: ` pip install vf-portalytics ` Pay attention to the requirements because it is important for the model to be built with the ones that we support.

There are [examples](https://github.com/visualfabriq/portalytics/blob/master/example_notebooks/feature_subset_example.ipynb) of how you can use portalytics. Examples for a simple model or more complex models like MultiModel.

Make sure that after saving the model using portalyctis, its possible that the model can be loaded and still contains all the important information (eg. the loaded model is able to perform a prediction?)

## [MultiModel and MultiTransformer](./vf_portalytics/multi_model.py) MultiModel is a custom sklearn model that contains one model for each group of training data. It is valuable in cases that our dataset vary a lot, but we still need to manage one model because the problem is the same.

  • Define the groups using input parameter clusters which is a list of all possible groups and group_col which is a string that indicates in which feature the groups can be found.

  • selected_features give the ability of using different features for each group.

  • params give the ability of using different model and categorical-feature transformer for each group.

The Jupyter notebook [multimodel_example.ipynb](example_notebooks/multimodel_example.ipynb) contains an end-to-end example of how MultiModel can be trained and saved using vf_portalytics Model wrapper.

MultiModel can support every sklearn based model, the only thing that is need to be done is to extend [POTENTIAL_MODELS](./vf_portalytics/ml_helpers.py) dictionary. Feel free to raise a PR.

MultiTransformer is the transformer that is being used inside MultiModel to transform categorical features into numbers. It is a custom sklearn transformer that contains one transformer for each group of training data.

  • Can be used also separately, in the same way as MultiModel. Check [example](./tests/test_multi_model.py)

MultiTransformer can support every sklearn based transformer, the only thing that is need to be done is to extend [POTENTIAL_TRANSFORMER](./vf_portalytics/ml_helpers.py) dictionary. Feel free to raise a PR.

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

vf_portalytics-1.0.5.tar.gz (55.8 kB view details)

Uploaded Source

Built Distribution

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

vf_portalytics-1.0.5-py2.py3-none-any.whl (67.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file vf_portalytics-1.0.5.tar.gz.

File metadata

  • Download URL: vf_portalytics-1.0.5.tar.gz
  • Upload date:
  • Size: 55.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.12

File hashes

Hashes for vf_portalytics-1.0.5.tar.gz
Algorithm Hash digest
SHA256 79f244110f26176370dbe40e3cd2eb4d20a6cf3d50e25ad88b06cab7c87b2870
MD5 ae659b3f542551245486a586b73f39b8
BLAKE2b-256 6b92ee0d2770b29fa797ce2741134bafa6513788db8b5c1cb019a16737c2b6db

See more details on using hashes here.

File details

Details for the file vf_portalytics-1.0.5-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for vf_portalytics-1.0.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d28448fed298c03312c61fd8310f47e7a060e6ee241b0eb956218569974aac18
MD5 928c90cf571131d2508ada73670f71a4
BLAKE2b-256 199bd9b2512f4658866ea4715c6fabfbd34f035221d12973b3c94b63e7498057

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