Skip to main content

A python framework simplifying the representation of deep domain classification hierarchies

Project description

https://readthedocs.org/projects/multilevel-py/badge/?version=latest

multilevel_py

Multilevel_py is a library that simplifies the construction of classification hierarchies over more than two levels. The framework depends on python3 only and implements a “deep instantiation” mechanism using pythons metaprogramming facilities. In academia the addressed topic is also discussed under the term “Multilevel (Meta-) Modelling”. Since there is no corresponding framework in the python community until this point, multilevel_py was built to fill this gap.

Installing

Install and update using pip:

pip install multilevel_py

A Simple Example

The following code constructs a classification structure that spans three levels.

from multilevel_py.constraints import is_int_constraint, is_str_constraint
from multilevel_py.core import create_clabject_prop, Clabject

Breed = Clabject(name="Breed")
yearReg = create_clabject_prop(n="yearReg", t=1, f=0, i_f=True, c=[is_int_constraint])
age = create_clabject_prop(n="age", t=2, f=0, i_f=True, c=[is_int_constraint])
Breed.define_props([yearReg, age])

Collie = Breed(name="Collie", init_props={"yearReg": 1888})
lassie = Collie(name="Lassie", init_props={"age": 7}, declare_as_instance=True)

Visualisation

Using the viz module (requires installation of pygraphviz) the following graph can be rendered for the previous example:

Visulisation of the collie example

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

multilevel_py-0.2.0.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

multilevel_py-0.2.0-py3-none-any.whl (26.5 kB view details)

Uploaded Python 3

File details

Details for the file multilevel_py-0.2.0.tar.gz.

File metadata

  • Download URL: multilevel_py-0.2.0.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.1

File hashes

Hashes for multilevel_py-0.2.0.tar.gz
Algorithm Hash digest
SHA256 da1311937ccf8b5d22f4715e4243a3c4983ee8a9c211f599175642fb6e09c116
MD5 4b45d9b986301feceb942e8659aeae94
BLAKE2b-256 3cc62d8d4ea0a5f820d35d90e87d682a67f014cdabf8264e98e3e5a085c67e38

See more details on using hashes here.

File details

Details for the file multilevel_py-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: multilevel_py-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 26.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.1

File hashes

Hashes for multilevel_py-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c1e3832b218f91b7025664d6816ab063e339877ce7c1f2dd7d48953d91737f1
MD5 4b10186c39acb7078a7fb4ee53628a59
BLAKE2b-256 306014f592681bc4bf8bb45b29c12cd68a15267c1ea2c71b8671a1f50e0dae33

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page