A Toolbox for hyperbox-based machine learning algorithms in Python

    Types of input variables
    The hyperbox-brain library separates learning models for continuous variables only and mixed-attribute data.

    Incremental learning
    Incremental (online) learning models are created incrementally and are updated continuously. They are appropriate for big data applications where real-time response is an important requirement. These learning models generate a new hyperbox or expand an existing hyperbox to cover each incoming input pattern.

    Agglomerative learning
    Agglomerative (batch) learning models are trained using all training data available at the training time. They use the aggregation of existing hyperboxes to form new larger sized hyperboxes based on the similarity measures among hyperboxes.

    Ensemble learning
    Ensemble models in the hyperbox-brain toolbox build a set of hyperbox-based learners from a subset of training samples or a subset of both training samples and features. Training subsets of base learners can be formed by stratified random subsampling, resampling, or class-balanced random subsampling. The final predicted results of an ensemble model are an aggregation of predictions from all base learners based on a majority voting mechanism. An intersting characteristic of hyperbox-based models is resulting hyperboxes from all base learners can be merged to formulate a single model.

    Multigranularity learning
    Multi-granularity learning algorithms can construct classifiers from multiresolution hierarchical granular representations using hyperbox fuzzy sets. This algorithm forms a series of granular inferences hierarchically through many levels of abstraction. An attractive characteristic of these classifiers is that they can maintain a high accuracy in comparison to other fuzzy min-max models at a low degree of granularity based on reusing the knowledge learned from lower levels of abstraction.

    Learning from both labelled and unlabelled data
    One of the exciting features of learning algorithms for the general fuzzy min-max neural network (GFMMNN) is the capability of creating classification boundaries among known classes and clustering data and representing them as hyperboxes in the case that labels are not available. Unlabelled hyperboxes is then possible to be labelled on the basis of the evidence of next incoming input samples. As a result, the GFMMNN models have the ability to learn from the mixed labelled and unlabelled datasets in a native way.

    Ability to directly process missing data
    Learning algorithms for the general fuzzy min-max neural network supported by the library may classify inputs with missing data directly without the need for replacing or imputing missing values as in other classifiers.

    Continual learning of new classes in an incremental manner
    Incremental learning algorithms of hyperbox-based models in the hyperbox-brain library can grow and accommodate new classes of data without retraining the whole classifier. Incremental learning algorithms themselves can generate new hyperboxes to represent clusters of new data with potentially new class labels both in the middle of normal training procedure and in the operating time where training has been finished. This property is a key feature for smart life-long learning systems.

    Scikit-learn compatible estimators
    The estimators in hyperbox-brain is compatible with the well-known scikit-learn toolbox. Therefore, it is possible to use hyperbox-based estimators in scikit-learn pipelines, scikit-learn hyperparameter optimizers (e.g., grid search and random search), and scikit-learn model validation (e.g., cross-validation scores. In addition, the hyperbox-brain toolbox can be used within hyperparameter optimisation libraries built on top of scikit-learn such as hyperopt.

    Explainability
    The hyperbox-brain library can provide the explanation of predicted results via visualisation. This toolbox provides the visualisation of existing hyperboxes and the decision boundaries of a trained hyperbox-based model if input features are two-dimensional features. For two-dimensional data, the toolbox also provides representative hyperboxes for each class joining the prediction process for an given input pattern. For input patterns with two or more dimensions, the hyperbox-brain toolbox uses a parallel coordinates graph to display representative hyperboxes.

    Easy to use
    Hyperbox-brain toolbox is designed for users with any experience level. Learning models are easy to create, setup, and run. Existing methods are easy to modify and extend.

    Open source
    Distributed under the GPL-3 License, hyperbox-brain is developed and maintained publicly on GitHub by an active, diverse and growing community.

    Explainability

    Explanation of predicted results in hyperbox-brain

    Showing hyperboxes and decision boundaries For two-dimensional training data, the hyperbox-brain provides the visualisation of hyperboxes and their decision boundaries on a two-dimensional plane.

    hyperboxes and boundaries

    Explanation for 2D samples For two-dimensional data, the hyperbox-brain toolbox can explain the reason behind the class prediction for each input sample by showing representative hyperboxes for each class which join the prediction process of the trained model for an given input pattern as follows:

    hyperboxes explanation

    Explanation for n-D samples For samples with two or more dimensions, the hyperbox-brain toolbox can explain the reason behind the class prediction for each input sample by using a parallel coordinates graph to display representative hyperboxes for each class which join the prediction process of the trained model for an given input pattern as follows:

    parallel coordinates hyperboxes
    Sponsors
    Research group
    CAS logo
    Citing

    If you want to cite hyperbox-brain, please use the following SoftwareX paper (bibtex).

    T. T. Khuat and B. Gabrys (2023), "Hyperbox-brain: A Python ToolBox for Hyperbox-based Machine Learning," SoftwareX, vol. 23, pp. 101425