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

Important links: Documentation | Issue Tracker | Changelog | Contributors | Code of Conduct | License

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.10.1-cp312-cp312-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.12 Windows x86-64

mlrl_common-0.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

mlrl_common-0.10.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.4 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

mlrl_common-0.10.1-cp312-cp312-macosx_11_0_arm64.whl (1.7 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

mlrl_common-0.10.1-cp311-cp311-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.11 Windows x86-64

mlrl_common-0.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

mlrl_common-0.10.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.4 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

mlrl_common-0.10.1-cp311-cp311-macosx_11_0_arm64.whl (1.7 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

mlrl_common-0.10.1-cp310-cp310-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.10 Windows x86-64

mlrl_common-0.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

mlrl_common-0.10.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.5 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

mlrl_common-0.10.1-cp310-cp310-macosx_11_0_arm64.whl (1.7 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

mlrl_common-0.10.1-cp39-cp39-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.9 Windows x86-64

mlrl_common-0.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

mlrl_common-0.10.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.5 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

mlrl_common-0.10.1-cp39-cp39-macosx_11_0_arm64.whl (1.7 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

File details

Details for the file mlrl_common-0.10.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for mlrl_common-0.10.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d1c676cf44a099197f5d934d1dacfa6b52f15ee2407bba6b0160d261c9288e8d
MD5 174aa95238962e0294fd5e1dc456b6dc
BLAKE2b-256 2623b791bc6c450dd1ad4587ea9dd893e5a37d5bc26c1747d469906266446c3e

See more details on using hashes here.

File details

Details for the file mlrl_common-0.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mlrl_common-0.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c77a762f8cdde423e39416611a27aeee8d872429733bbfb668c91507f722de5e
MD5 218e64d3610c454a7d19bd3c21d56e23
BLAKE2b-256 1515e1f4d4098090bf5c8c4514aafb00ce8aa108c693cec990ff0ac4b28b2214

See more details on using hashes here.

File details

Details for the file mlrl_common-0.10.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for mlrl_common-0.10.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 165184d70ce7e0b9cecb6a7fe04b459f6d16a51f875923758655a8b8b515a86b
MD5 af5493175ffeef21f3d23545cdde3e50
BLAKE2b-256 4c210b890e0ec16ef050fb024fffc34cbdc2dd74717f4257d03d7f64a853b40c

See more details on using hashes here.

File details

Details for the file mlrl_common-0.10.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mlrl_common-0.10.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 710eb18fdb2d9d52440785821ca25f0a3e4d9bb21376ebfc65a0778a2349bbbd
MD5 a544b89a535ad24b1dbd8923d2105b2e
BLAKE2b-256 3e96e616d1bb249f3e7c626c92c363410e7bc5d2385edf70550b446e7cea9b1f

See more details on using hashes here.

File details

Details for the file mlrl_common-0.10.1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for mlrl_common-0.10.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9b9dc8bec49556e438dc9ecbe4191778ecd744054349225ee74817ecbaeba5a3
MD5 b1c11adda8dc16f26019b6522c71c286
BLAKE2b-256 f92f6bcf098571f71d085e96e262324a110f10791a9a8309d738b32dedbc4c0a

See more details on using hashes here.

File details

Details for the file mlrl_common-0.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mlrl_common-0.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f88fa499519e185861dc566b9d8ee1657cce9d8a5f50c53abcc990d2d12fcb8b
MD5 8eec7811a717a8ccbc6769680b2268f8
BLAKE2b-256 429d91bbc28bddb52141cab885e1ab236db1a42a8374eadc6fa07e237f295a1b

See more details on using hashes here.

File details

Details for the file mlrl_common-0.10.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for mlrl_common-0.10.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 67143c8385aabcbc3b2848fba10966dc6293d2e4dc8cadc36fe3da65df0d0149
MD5 bc6c0237e56c6c782ae4cc560117424d
BLAKE2b-256 30b740e3759941ca5dff45fec884d977313c3507e5af6c4560e80fe26d9a845b

See more details on using hashes here.

File details

Details for the file mlrl_common-0.10.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mlrl_common-0.10.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e40917d83e8ba5bfdd658e6fdf512b01d42c5c31f8556ade479e12e8805e1d8e
MD5 34abb0eb84ee764aa6e634a0736cb8fb
BLAKE2b-256 5d47ce17b56e52eebb1b7cd0864833cce37eab08e2cb08106ab460debe5d3ade

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mlrl_common-0.10.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 13ab4300e3793298b9f9c138ea1b0f9b5344368ae3743df459eb4d5fac77ea23
MD5 6af04989dedcd07d92aa47b8028236c0
BLAKE2b-256 df2ef8bdf287aabf2cfa0f225a5b184117d69b4dee7912ae9d533de38f851e3c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mlrl_common-0.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b8eb221488148c5b38b5b6bfb8cb793eaaf3cb21fd8b65e38614ab551df3aefa
MD5 a3c373a7a1f4edd11e771f6aefa405cc
BLAKE2b-256 265b7e8acc0997c88df64d50cc7bd605892121ee32abc4554b47e705f74260df

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mlrl_common-0.10.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a659a9d1c51973656233ac30c7024c59995fe02c202ca53add69a4700d9427a2
MD5 c1cb03a0076899b7eff4c3f1825ce31b
BLAKE2b-256 8e79e2ed2e37c64fb79f1ccbfb969deebf7c4209cc5b01ee2cfbbb408ffb2078

See more details on using hashes here.

File details

Details for the file mlrl_common-0.10.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mlrl_common-0.10.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d19c7bc8dc94de06dd840dc6d59c2243f59f7cea41ec28cc524904e8404739b2
MD5 1671934e38ac3653e5666869238fa1f7
BLAKE2b-256 238b1f9a629d4878ff733c37c79ab2ed61b89d6286fd794ac31a11269171fc06

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mlrl_common-0.10.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c0f4caa317540b7909f084d27d3de79ae9d2db9c1702aed611075bd2d28e0d7b
MD5 8e7764dbcc557bd7755144c5011c40ad
BLAKE2b-256 5ab2c94bebb3947c2771024bed65ae52f590b00df390eb6e5b51af37a8859b32

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mlrl_common-0.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1dfd0329150e1b5cfda1f363542568ef6d8f4b1ee61eb0d39e92a3c9b80c7ddb
MD5 0d0b950c2b719398e2d44deeefa596a3
BLAKE2b-256 ce5cbd031e9616f5bcc2cbd7530ea42f92c3e52d784b15e272858dfd2fef3270

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mlrl_common-0.10.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 fd6b45febac0cccf32cb75c8a343c636be38ea9949353e19a5426e8066427bf4
MD5 e107f4e8c92e9cb6ccc6b30953edc92d
BLAKE2b-256 4830e4995f1665a15e13f2fbf1f30a94c8f2a6982a16a6c6b28d30a536167228

See more details on using hashes here.

File details

Details for the file mlrl_common-0.10.1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mlrl_common-0.10.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b6579f2ccca1d0fc14de5e095b0c6dd4537f22f484b7641f880b373305c84070
MD5 ca6c3c96d808aa5f628463e987040b38
BLAKE2b-256 8c4242aa840a6383bebc7186e0c3a787cf5301277303c32c12d652f2bef460dc

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