Skip to main content

Provides common modules to be used by different types of multi-label rule learning algorithms

Project description

"MLRL-Common": Building-Blocks for Multi-label Rule Learning Algorithms

License: MIT PyPI version Documentation Status

This software package provides common modules to be used by different types of multi-label rule learning (MLRL) algorithms that integrate with the popular scikit-learn machine learning framework.

The goal of multi-label classification is the automatic assignment of sets of labels to individual data points, for example, the annotation of text documents with topics.

The library serves as the basis for the implementation of the following rule learning algorithms:

  • BOOMER (Gradient Boosted Multi-label Classification Rules): A state-of-the art algorithm that uses gradient boosting to learn an ensemble of rules that is built with respect to a given multivariate loss function.

Functionalities

This package follows a unified and modular framework for the implementation of different types of MLRL algorithms. In the following, we provide an overview of the individual modules an instantiation of the framework must implement.

Rule Induction

A module for rule induction that is responsible for the construction of individual rules. Currently, the following modules of this kind are implemented:

  • A module for greedy rule induction that conducts a top-down search, where rules are constructed by adding one condition after the other and adjusting its prediction accordingly.
  • Rule induction based on a beam search, where a top-down search is conducted as described above. However, instead of focusing on the best solution at each step, the algorithm keeps track of a predefined number of promising solutions and picks the best one at the end.

All of the above modules support numerical, ordinal, and nominal features and can handle missing feature values. They can also be combined with methods for unsupervised feature binning, where training examples with similar features values are assigned to bins in order to reduce the training complexity. Moreover, multi-threading can be used to speed up training.

Model Assemblage

A module for the assemblage of a rule model that consists of several rules. Currently, the following strategies can be used for constructing a model:

  • Sequential assemblage of rule models, where one rule is learned after the other.

Sampling Methods

A wide variety of sampling methods, including sampling with and without replacement, as well as stratified sampling techniques, is provided by this package. They can be used to learn new rules on a subset of the available training examples, features, or labels.

(Label Space) Statistics

So-called label space statistics serve as the basis for assessing the quality of potential rules and determining their predictions. The notion of the statistics heavily depend on the rule learning algorithm at hand. For this reason, no particular implementation is currently included in this package.

Post-Processing

Post-processing methods can be used to alter the predictions of a rule after it has been learned. Whether this is desirable or not heavily depends on the rule learning algorithm at hand. For this reason, no post-processing methods are currently provided by this package.

Pruning Methods

Rule pruning techniques can optionally be applied to a rule after its construction to improve its generalization to unseen data and prevent overfitting. The following pruning techniques are currently supported by this package:

  • Incremental reduced error pruning (IREP) removes overly specific conditions from a rule if this results in an increase of predictive performance (measured on a holdout set of the training data).

Stopping Criteria

One or several stopping criteria can be used to decide whether additional rules should be added to a model or not. Currently, the following criteria are provided out-of-the-box:

  • A size-based stopping criterion that ensures that a certain number of rules is not exceeded.
  • A time-based stopping criterion that stops training as soon as a predefined runtime was exceeded.
  • Pre-pruning (a.k.a. early stopping) aims at terminating the training process as soon as the performance of a model stagnates or declines (measured on a holdout set of the training data).

Post-Optimization

Post-optimization methods can be employed to further improve the predictive performance of a model after it has been assembled. Currently, the following post-optimization techniques can be used:

  • Sequential post-optimization reconstructs each rule in a model in the context of the other rules.

  • Post-pruning may remove trailing rules from a model in this increases the models performance (as measured on a holdout set of the training data).

Prediction algorithm

A prediction algorithm is needed to derive predictions from the rules in a previously assembled model. As prediction methods heavily depend on the rule learning algorithm at hand, no implementation is provided by this package out-of-the-box. However, it defines interfaces for the prediction of regression scores, binary predictions, or probability estimates.

License

This project is open source software licensed under the terms of the MIT license. We welcome contributions to the project to enhance its functionality and make it more accessible to a broader audience. A frequently updated list of contributors is available here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

mlrl_common-0.9.0-cp310-cp310-win_amd64.whl (844.2 kB view details)

Uploaded CPython 3.10 Windows x86-64

mlrl_common-0.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

mlrl_common-0.9.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.4 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

mlrl_common-0.9.0-cp310-cp310-macosx_10_9_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

mlrl_common-0.9.0-cp39-cp39-win_amd64.whl (875.5 kB view details)

Uploaded CPython 3.9 Windows x86-64

mlrl_common-0.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

mlrl_common-0.9.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.4 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

mlrl_common-0.9.0-cp39-cp39-macosx_10_9_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

mlrl_common-0.9.0-cp38-cp38-win_amd64.whl (870.7 kB view details)

Uploaded CPython 3.8 Windows x86-64

mlrl_common-0.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

mlrl_common-0.9.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.4 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

mlrl_common-0.9.0-cp38-cp38-macosx_10_9_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

Details for the file mlrl_common-0.9.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for mlrl_common-0.9.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b45f1cd2f774f0b68e42530bb48febad056ced1b3c33578eefe02b0fa3e71f80
MD5 ab47a83eaec21011da7271caef00429d
BLAKE2b-256 7b93cf2ea478df5af83b6ccf9d996bdb0c5dad24f9888d662479f803d9204138

See more details on using hashes here.

File details

Details for the file mlrl_common-0.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mlrl_common-0.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8b509ba8e553cd1b6ba61006cecce6a02c3945c58f53270f40480f696bed97eb
MD5 e810a442e01d891205c31d08eae48625
BLAKE2b-256 c936a97eeb24d0ba38dc81d22d1ff01a0a4c903e961b1e493d5ccaaa5f205f68

See more details on using hashes here.

File details

Details for the file mlrl_common-0.9.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for mlrl_common-0.9.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b262cd0d4ef558d12eec7f6b05aa0ec45e13db9446d6e57996632d8a090f7112
MD5 8a18d89822946bebda606ed4bebb6476
BLAKE2b-256 a61468202136932b4ecc372aaed80f8176c20158e6658fe8809b2ebcdad73927

See more details on using hashes here.

File details

Details for the file mlrl_common-0.9.0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for mlrl_common-0.9.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 262308adab7d123507e920777d4126d52976160761a093f3a50e044366af9df4
MD5 78cc14e32d6c333548e86273c8ac4286
BLAKE2b-256 04b42b9f268179078ffb4d3cf476c0a6e92f5644594d791c53ff44d8d8e17bf7

See more details on using hashes here.

File details

Details for the file mlrl_common-0.9.0-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for mlrl_common-0.9.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d72f0f870cf551b90b4ebb3514f894397c22772eb7f21fbbf1440c337ae8fc27
MD5 20c541b5717117a78711de012ce10c54
BLAKE2b-256 c91ad98e2ca056739a6ab2426b30dc04386118ab147c7610009c473d9b1c70fd

See more details on using hashes here.

File details

Details for the file mlrl_common-0.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mlrl_common-0.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2c511e0336cf58daaccfd68896fbd928e23611d9bef7de33df92637a3146447e
MD5 4530dd34bf378b75577ed33bdeea1b01
BLAKE2b-256 a822bd5dc617093dc18459619e11aa7889425973478a3ab7f971cfdffc6525ed

See more details on using hashes here.

File details

Details for the file mlrl_common-0.9.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for mlrl_common-0.9.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f8e9928128bba2269d925f6c8d4016834aab9aa9d2a63c01ef17598239a809ba
MD5 19eb2a7f168138eb66296bc40933bb19
BLAKE2b-256 5455480f881452919575c29b1c0c3485310e53fa9e25cbdcc5eb3c682028a4b1

See more details on using hashes here.

File details

Details for the file mlrl_common-0.9.0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for mlrl_common-0.9.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2a74fdb0bcfb4f37ff27323329880fb5a2613af9e2f5f1ddb3ac3f5d280c7a0c
MD5 5b35baa0be60b1f28800a2884a6d4ef0
BLAKE2b-256 b000b58ff982cc1ce9ca8a7be214dfb7c18b7ff62d7fa55151ab2d8bcc8945ec

See more details on using hashes here.

File details

Details for the file mlrl_common-0.9.0-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for mlrl_common-0.9.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 a833738677850554a4cd70dbb012653232ca28cbdc6cb23bf63a5cb97a3b864b
MD5 a7b981d4ced0f53de43c75c69bbcfd6d
BLAKE2b-256 f9211de8d4b20eada8f4afe271eec43b7f8d203bc4fa119f50482762ddd6c9a3

See more details on using hashes here.

File details

Details for the file mlrl_common-0.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mlrl_common-0.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9b6dee121dd9f9d90214eab850badd242fe5114b3d27b7d548851bcb8c4f2b47
MD5 79166e5e42c55343a0be2eae42feb738
BLAKE2b-256 0260ea0dbe5012746a03ffb19d8c8ecbf26edfbafda7fabc585d73215bd4fc10

See more details on using hashes here.

File details

Details for the file mlrl_common-0.9.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for mlrl_common-0.9.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c0771b585e4ab35755d43d54e1fb63b9c94eef43cc7750b40c2a8cdccf0b32eb
MD5 0d5cd8d55be699fd4aca6da30b9a3858
BLAKE2b-256 0c3e91095b2bba71b49671c1f4e50c1ce589b60ab53a28337e3bf09c2eb46abc

See more details on using hashes here.

File details

Details for the file mlrl_common-0.9.0-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for mlrl_common-0.9.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f8e21ee2d78917abd854e54c976418b4d0f1b9f9bad59a63c9a8cada557ed9eb
MD5 cd81a79ee2fe14c4c9ca519bbfb0db2e
BLAKE2b-256 619fdd7dbadaffa3684c05e5fb9e5697fd75468eece83b3c661e3f0f63462e05

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