PyBMF
A Python library for Boolean Matrix Factorization. Work under Preferred.ai.
PyBMF is under active development. We welcome the authors of BMF papers and those interested in BMF to play around and contribute. Please contact us if you have any questions or suggestions.
Prospectives
Boolean matrix factorization (BMF) is a well-known problem in pattern mining. Throughout the years of prosperous research, it has evolved from greedy heuristics to include a wide range of advanced technologies. We hold the belief that a playground with fairness and adaptiveness is necessary for the development of such algorithms.
PyBMF aims to provide a unified framework with:
generators for various types of synthetic data
unified ways of importing real-world data
data splitting and cross-validation utilities
negative sampling utilities for continuous methods
the ability to utilize sparse matrices for heuristics
evaluation tools for binary and continuous metrics
visualization tools for single or multi-matrix data
tools for saving and loading models and logs
ability to incorporate Boolean matrix simplification and visualization models
Models
Category |
Model |
Paper |
Original Implementation |
In PyBMF |
|---|---|---|---|---|
Heuristics |
Asso |
✅ |
||
Heuristics |
Hyper/Hyper+ |
✅ |
||
Heuristics |
GreConD |
✅ |
||
Heuristics |
Panda |
✅ |
||
Heuristics |
Panda+ |
✅ |
||
Heuristics |
NASSAU |
|||
Heuristics |
GreConD+ |
✅ |
||
Heuristics |
MEBF |
✅ |
||
Continuous |
NMFSklearn |
🛞 Wrapper of sklearn.nmf |
||
Continuous |
WNMF |
✅ Multiplicative update |
||
Continuous |
BinaryMF-Penalty |
✅ Multiplicative update |
||
Continuous |
BinaryMF-Thresholding |
✅ Line search |
||
Continuous |
FastStep |
✅ Line search |
||
Continuous |
PRIMP |
✅ PALM |
||
Continuous |
PNL-PF |
✅ Multiplicative update |
||
Continuous |
ELBMF |
✅ PALM |
||
Probablistic |
MessagePassing |
🛞 Wrapper of original implementation |
||
Probablistic |
OrMachine |
🛞 Wrapper of original implementation |
||
Linear Optimization |
ColumnGeneration |
🛞 Wrapper of original implementation |
||
Satisfiability |
UndercoverBMF |
🛞 Wrapper of original implementation |
||
Simplification |
IterEss |
|||
Simplification |
DelegationBMF |
|||
Visualization |
OrderedBMF |
|||
Visualization |
BiclusterVisualization |
Compatibility
Currently built and tested on Python 3.9.18.
TODO
[ ] Add mask parameter W to PRIMP and ELBMF
[ ] Fix DataFrame display utils in dataframe_utils.py
[ ] Include BMF visualization models
[ ] Diagnosis of thresholding models
Subpackages
- PyBMF.datasets package
- Submodules
- PyBMF.datasets.BaseData module
- PyBMF.datasets.BaseSplit module
- PyBMF.datasets.CrossValidation module
- PyBMF.datasets.MovieLensData module
- PyBMF.datasets.MovieLensGenreCastData module
- PyBMF.datasets.MovieLensGenreCastUserData module
- PyBMF.datasets.MovieLensUserData module
- PyBMF.datasets.NetflixData module
- PyBMF.datasets.NetflixGenreCastData module
- PyBMF.datasets.NoSplit module
- PyBMF.datasets.RatioSplit module
- Module contents
- PyBMF.generators package
- PyBMF.models package
- Subpackages
- Submodules
- PyBMF.models.Asso module
- PyBMF.models.AssoExAlternateMultipleWeights module
- PyBMF.models.AssoIter module
- PyBMF.models.AssoOpt module
- PyBMF.models.BMFAlternate module
- PyBMF.models.BMFCollective module
- PyBMF.models.BMFInterleave module
- PyBMF.models.BMFTools module
- PyBMF.models.BaseCollectiveModel module
- PyBMF.models.BaseModel module
- PyBMF.models.BaseModelTools module
- PyBMF.models.BinaryMFPenalty module
- PyBMF.models.BinaryMFPenaltyExCollective module
- PyBMF.models.BinaryMFThreshold module
- PyBMF.models.BinaryMFThresholdExCollective module
- PyBMF.models.BinaryMFThresholdExColumnwise module
- PyBMF.models.BinaryMFThresholdExSigmoid module
- PyBMF.models.BinaryMFThresholdExSigmoidColumnwise module
- PyBMF.models.BinaryMFThresholdExSigmoidColumnwiseLamda module
- PyBMF.models.CMF module
- PyBMF.models.ContinuousCollectiveModel module
- PyBMF.models.ContinuousModel module
- PyBMF.models.ELBMF module
- PyBMF.models.ELBMFNumPy module
- PyBMF.models.ELBMFPyTorch module
- PyBMF.models.FastStep module
- PyBMF.models.GreConD module
- PyBMF.models.GreConDPlus module
- PyBMF.models.Hyper module
- PyBMF.models.HyperPlus module
- PyBMF.models.IP module
- PyBMF.models.MEBF module
- PyBMF.models.MaxSAT module
- PyBMF.models.MessagePassing module
- PyBMF.models.NMFSklearn module
- PyBMF.models.OrMachine module
- PyBMF.models.PNLPF module
- PyBMF.models.PRIMP module
- PyBMF.models.PRIMPPyTorch module
- PyBMF.models.Panda module
- PyBMF.models.RSNMF module
- PyBMF.models.TransposedModel module
- PyBMF.models.WNMF module
- Module contents
- PyBMF.solvers package
- PyBMF.utils package
- Submodules
- PyBMF.utils.boolean_utils module
- PyBMF.utils.collective_display_utils module
- PyBMF.utils.collective_evaluate_utils module
- PyBMF.utils.collective_transform_utils module
- PyBMF.utils.collective_utils module
- PyBMF.utils.common module
- PyBMF.utils.data_utils module
- PyBMF.utils.dataframe_utils module
- PyBMF.utils.decorator_utils module
- PyBMF.utils.display module
- PyBMF.utils.evaluate_utils module
- PyBMF.utils.experiment_utils module
- PyBMF.utils.generator_utils module
- PyBMF.utils.metrics module
- PyBMF.utils.sparse_utils module
- Module contents