BAMT 2.0.0 - new features, refactoring, architecture refreshment
- 主要言語
- Python
- スター
- 134
- フォーク
- 23
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Current BAMT architecture has a number of disadvantages, some clunky code and other limitations. Thus, it was decided to make a full refactoring. This refreshment will not only include new refactored code and API but also new features (like vectorized sampling and other operations, new algorithms for structure learning, score-functions etc.)
For now, here is a checklist of modules that should be implemented in 2.0.0 architecture:
- [ ] [core](https://github.com/aimclub/BAMT/tree/2.0.0/bamt/core)
- [ ] [Graph](https://github.com/aimclub/BAMT/blob/2.0.0/bamt/core/graph/graph.py)
- [ ] [DAG](https://github.com/aimclub/BAMT/blob/2.0.0/bamt/core/graph/dag.py)
- [ ] [Nodes](https://github.com/aimclub/BAMT/tree/2.0.0/bamt/core/nodes)
- [ ] [root nodes](https://github.com/aimclub/BAMT/blob/2.0.0/bamt/core/nodes/root_nodes)
- [ ] [discrete root node](https://github.com/aimclub/BAMT/blob/2.0.0/bamt/core/nodes/root_nodes/discrete_node.py)
- [ ] [continuous root node](https://github.com/aimclub/BAMT/blob/2.0.0/bamt/core/nodes/root_nodes/continuous_node.py)
- [ ] [child nodes](https://github.com/aimclub/BAMT/tree/2.0.0/bamt/core/nodes/child_nodes)
- [ ] [conditional continuous node](https://github.com/aimclub/BAMT/blob/2.0.0/bamt/core/nodes/child_nodes/conditional_continuous_node.py)
- [ ] [conditional discrete node](https://github.com/aimclub/BAMT/blob/2.0.0/bamt/core/nodes/child_nodes/conditional_discrete_node.py)
- [ ] [Node models](https://github.com/aimclub/BAMT/tree/2.0.0/bamt/core/node_models)
- [ ] [Prediction models](https://github.com/aimclub/BAMT/blob/2.0.0/bamt/core/node_models/prediction_model.py)
- [ ] [Classifier](https://github.com/aimclub/BAMT/blob/2.0.0/bamt/core/node_models/classifier.py)
- [ ] [Regressor](https://github.com/aimclub/BAMT/blob/2.0.0/bamt/core/node_models/regressor.py)
- [x] [Distribution models](https://github.com/aimclub/BAMT/blob/2.0.0/bamt/core/node_models/distribution.py)
- [x] [Empirical distribution model](https://github.com/aimclub/BAMT/blob/2.0.0/bamt/core/node_models/empirical_distribution.py)
- [x] [Continuous distribution model](https://github.com/aimclub/BAMT/blob/2.0.0/bamt/core/node_models/continuous_distribution.py)
- [ ] [DAG-opttimizers module](https://github.com/aimclub/BAMT/tree/2.0.0/bamt/dag_optimizers)
- [ ] [Constraint-based DAG optimizers (PC)](https://github.com/aimclub/BAMT/tree/2.0.0/bamt/dag_optimizers/constraint)
- [ ] [Score-based DAG optimizers (HC, evo)](https://github.com/aimclub/BAMT/tree/2.0.0/bamt/dag_optimizers/score)
- [ ] [Hybrid DAG optimizers (inc. BBBN, LSevoBN)](https://github.com/aimclub/BAMT/tree/2.0.0/bamt/dag_optimizers/hybrid)
- [ ] [Score-functions module](https://github.com/aimclub/BAMT/tree/2.0.0/bamt/score_functions)
- [ ] [K2](https://github.com/aimclub/BAMT/blob/2.0.0/bamt/score_functions/k2_score.py)
- [ ] [MI](https://github.com/aimclub/BAMT/blob/2.0.0/bamt/score_functions/mutual_information_score.py)
- [ ] BIC/AIC
- [ ] [Parameter estimators module](https://github.com/aimclub/BAMT/tree/2.0.0/bamt/parameter_estimators)
- [ ] [MLE](https://github.com/aimclub/BAMT/blob/2.0.0/bamt/parameter_estimators/maximum_likelihood_estimator.py)
- [ ] [Models](https://github.com/aimclub/BAMT/tree/2.0.0/bamt/models)
- [ ] [PGM](https://github.com/aimclub/BAMT/tree/2.0.0/bamt/models/probabilistic_structural_models)
- [ ] [BNs](https://github.com/aimclub/BAMT/blob/2.0.0/bamt/models/probabilistic_structural_models/bayesian_network.py)
- [ ] [Continuous BN](https://github.com/aimclub/BAMT/blob/2.0.0/bamt/models/probabilistic_structural_models/continuous_bayesian_network.py)
- [ ] [Discrete BN](https://github.com/aimclub/BAMT/blob/2.0.0/bamt/models/probabilistic_structural_models/discrete_bayesian_network.py)
- [ ] [Hybrid BN](https://github.com/aimclub/BAMT/blob/2.0.0/bamt/models/probabilistic_structural_models/hybrid_bayesian_network.py)
- [ ] [Composite BN](https://github.com/aimclub/BAMT/blob/2.0.0/bamt/models/probabilistic_structural_models/composite_bayesian_network.py)
The development of BAMT 2.0.0 is held in [2.0.0](https://github.com/aimclub/BAMT/tree/2.0.0) branch of the repository. If you, the reader of the issue, have decided to implement some module or submodule, please reply to this message, create a separate issue and add it to [milestone](https://github.com/aimclub/BAMT/milestone/1) and [project](https://github.com/orgs/aimclub/projects/3).
The goal of these changes is also to make a sklearn-like interface, use modern python development practices like Pydantic, so the usual pipeline looks like that:
```python
# read data
data = pd.read_csv("data.csv")
# define optimizers and score functions
dag_score_function = DAGScoreFunction(**parameters)
dag_optimizer = DAG_optimizer(**parameters)
# get a structure, maybe in networkx format?
G = dag_optimizer.optimize(data, ** parameters)
# define parameters estimator and BN
parameters_estimator = ParametersEstimator(**parameters)
bn = ContinuousBayesianNetwork(**parameters)
# fit the bn
bn.fit(data, ParametersEstimator, **parameters)
bn.sample(1000)
bn.predict(data.drop[["col1", "col2"]])
```
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。