• Stars
    star
    117
  • Rank 300,016 (Top 6 %)
  • Language
    Python
  • License
    BSD 3-Clause "New...
  • Created over 4 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Repository of a data modeling and analysis tool based on Bayesian networks

BAMT framework logo

team
ITMO NCCR
package
tests
docs Documentation Status
license
Supported Python Versions
stats
downloads_stats downloads_monthly downloads_weekly
style
Black

Repository of a data modeling and analysis tool based on Bayesian networks

BAMT - Bayesian Analytical and Modelling Toolkit. This repository contains a data modeling and analysis tool based on Bayesian networks. It can be divided into two main parts - algorithms for constructing and training Bayesian networks on data and algorithms for applying Bayesian networks for filling gaps, generating synthetic data, assessing edges strength e.t.c.

bamt readme scheme

Installation

BAMT package is available via PyPi:

pip install bamt

BAMT Features

The following algorithms for Bayesian Networks learning are implemented:

  • Building the structure of a Bayesian network based on expert knowledge by directly specifying the structure of the network;
  • Building the structure of a Bayesian network on data using three algorithms - Hill Climbing, evolutionary and PC (PC is currently under development). For Hill Climbing, the following score functions are implemented - MI, K2, BIC, AIC. The algorithms work on both discrete and mixed data.
  • Learning the parameters of distributions in the nodes of the network based on Gaussian distribution and Mixture Gaussian distribution with automatic selection of the number of components.
  • Non-parametric learning of distributions at nodes using classification and regression models.
  • BigBraveBN - algorithm for structural learning of Bayesian networks with a large number of nodes. Tested on networks with up to 500 nodes.

Difference from existing implementations:

  • Algorithms work on mixed data;
  • Structural learning implements score-functions for mixed data;
  • Parametric learning implements the use of a mixture of Gaussian distributions to approximate continuous distributions;
  • Non-parametric learning of distributions with various user-specified regression and classification models;
  • The algorithm for structural training of large Bayesian networks (> 10 nodes) is based on local training of small networks with their subsequent algorithmic connection.
bn example gif

For example, in terms of data analysis and modeling using Bayesian networks, a pipeline has been implemented to generate synthetic data by sampling from Bayesian networks.

synthetics generation

How to use

Then the necessary classes are imported from the library:

from bamt.networks.hybrid_bn import HybridBN

Next, a network instance is created and training (structure and parameters) is performed:

bn = HybridBN(has_logit=False, use_mixture=True)
bn.add_edges(preprocessed_data)
bn.fit_parameters(data)

Examples & Tutorials

More examples can be found in Documentation.

Publications about BAMT

We have published several articles about BAMT:

Project structure

The latest stable version of the library is available in the master branch.

It includes the following modules and direcotries:

  • bamt - directory with the framework code:
    • Preprocessing - module for data preprocessing
    • Networks - module for building and training Bayesian networks
    • Nodes - module for nodes support of Bayesian networks
    • Utilities - module for mathematical and graph utilities
  • data - directory with data for experiments and tests
  • tests - directory with unit and integration tests
  • tutorials - directory with tutorials
  • docs - directory with RTD documentation

Preprocessing

Preprocessor module allows user to transform data according pipeline (similar to pipeline in scikit-learn).

Networks

Three types of networks are implemented:

  • HybridBN - Bayesian network with mixed data
  • DiscreteBN - Bayesian network with discrete data
  • ContinuousBN - Bayesian network with continuous data

They are inherited from the abstract class BaseNetwork.

Nodes

Contains classes for nodes of Bayesian networks.

Utilities

Utilities module contains mathematical and graph utilities to support the main functionality of the library.

Web-BAMT

A web interface for BAMT is currently under development. The repository is available at web-BAMT

Contacts

If you have questions or suggestions, you can contact us at the following address: [email protected] (Irina Deeva)

Our resources:

Citation

@misc{BAMT,
author={BAMT}, title = {Repository experiments and data}, year = {2021}, publisher = {GitHub}, journal = {GitHub repository}, howpublished = {url{https://github.com/ITMO-NSS-team/BAMT.git}}, url = {https://github.com/ITMO-NSS-team/BAMT.git}

}

@article{deeva2023advanced,
title={Advanced Approach for Distributions Parameters Learning in Bayesian Networks with Gaussian Mixture Models and Discriminative Models}, author={Deeva, Irina and Bubnova, Anna and Kalyuzhnaya, Anna V}, journal={Mathematics}, volume={11}, number={2}, pages={343}, year={2023}, publisher={MDPI}

}

More Repositories

1

FEDOT

Automated modeling and machine learning framework FEDOT
Python
633
star
2

open-source-ops

Полезные советы для open-source разработок (в том числе в области AI/ML)
HTML
97
star
3

Fedot.Industrial

Python framework for automated time series classification, regression and forecasting
TypeScript
83
star
4

GOLEM

Graph Optimiser for Learning and Evolution of Models
Python
60
star
5

GEFEST

Toolbox for the generative design of geometrically-encoded physical objects using numerical modelling and evolutionary optimization
Python
54
star
6

iOpt

Framework of intelligent optimization methods iOpt
Python
51
star
7

eXplain-NNs

Library with XAI methods for NNs
Python
46
star
8

FEDOT.Web

Graphic tool for the automated evolutionary design of composite models
JavaScript
37
star
9

rostok

Rostok is an open source library which provides the framework for generative co-design of mechatronic and robotic systems.
Python
35
star
10

Web-BAMT

Online tool for Bayesian Networks
TypeScript
35
star
11

StableGNN

Framework for autonomous learning of explainable graph neural networks
Jupyter Notebook
32
star
12

blocksnet

Open library with tools for generation the city model and optimal requirements for future development with specified target parameters
Python
24
star
13

AutoTM

Automatic hyperparameters tuning for topic models (ARTM approach) using evolutionary algorithms
Python
24
star
14

ReDKG

Reinforcement learning on dynamic knowledge graphs
Python
20
star
15

ai-competency-model

Модель профессиональных компетенций в области ИИ
19
star
16

OCEANAI

Algorithms for Intelligent Assessment of Human Personality Traits based on His Multimodal Data for ranking potential candidates to perform professional responsibilities
Python
16
star
17

evoguess-ai

Component for finding decomposition sets and estimating hardness of SAT instances.
Python
8
star
18

ECG

A library for assisting in diagnostics of heart conditions from ECG
Python
7
star
19

asid

AutoML tool for imbalanced and small tabular datasets
Python
6
star
20

FEDOT.LLM

LLM-based prototype for nexgen AutoML
Jupyter Notebook
5
star
21

foressment_lib

AI-based assessment and forecasting of the state of complex technical objects.
Python
4
star
22

SAMPO

Open-source framework for adaptive manufacturing processes scheduling
Python
4
star
23

Polygon.Web

Online tools for automated model evaluation
HTML
1
star