Metadata-Version: 2.4
Name: fastogb
Version: 0.1.0
Summary: Fast additive rule ensembles with exact and approximate query search
Author-email: Fan Yang <fan.yang1@monash.edu>
License-Expression: MIT
Project-URL: Homepage, https://github.com/fyan102/fastogb
Project-URL: Documentation, https://github.com/fyan102/fastogb/blob/main/docs/general_rule_boosting_estimator.md
Project-URL: Repository, https://github.com/fyan102/fastogb
Project-URL: Issues, https://github.com/fyan102/fastogb/issues
Keywords: boosting,rule ensembles,interpretable machine learning,numba,rule,explainable machine learning
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy<2.4,>=2.0; sys_platform == "darwin" and platform_machine == "x86_64"
Requires-Dist: numpy<2.5,>=2.0; sys_platform != "darwin" or platform_machine != "x86_64"
Requires-Dist: numba<0.63,>=0.61.2; sys_platform == "darwin" and platform_machine == "x86_64"
Requires-Dist: numba<0.67,>=0.66; sys_platform != "darwin" or platform_machine != "x86_64"
Requires-Dist: llvmlite<0.46,>=0.45; sys_platform == "darwin" and platform_machine == "x86_64"
Requires-Dist: llvmlite<0.49,>=0.48; sys_platform != "darwin" or platform_machine != "x86_64"
Requires-Dist: scipy>=1.13
Provides-Extra: cuda
Requires-Dist: numba-cuda; extra == "cuda"
Provides-Extra: evaluation
Requires-Dist: scikit-learn>=1.5; extra == "evaluation"
Provides-Extra: test
Requires-Dist: pytest>=8; extra == "test"
Dynamic: license-file

# faster-rule

`faster-rule` is the distribution name of the NumPy-first additive rule ensemble package imported as `fastogb`.
It provides configurable query-selection objectives, search algorithms, losses and weight-update methods, with
mandatory Numba CPU acceleration and optional CUDA acceleration for supported NVIDIA systems.

Install the current checkout from the project root with `pip install -e .`. An editable installation immediately
uses subsequent source changes, although a running Python or Jupyter process must be restarted after imports change.

The main public estimator is `GeneralRuleBoostingEstimator`. Its complete constructor, nested configuration,
methods and fitted attributes are described in the
[GeneralRuleBoostingEstimator interface](docs/general_rule_boosting_estimator.md).

```python
from fastogb import (FullyCorrective, GeneralRuleBoostingEstimator, OrthogonalBoostingObjective,
                     load_csv)

data, target, feature_names, categorical = load_csv(
    'data.csv', target_name='target', target_map={'negative': -1.0, 'positive': 1.0})
model = GeneralRuleBoostingEstimator(
    num_rules=10, objective_function=OrthogonalBoostingObjective,
    weight_update_method=FullyCorrective(), loss='logistic', search='greedy', n_jobs=4,
    search_params={'feature_names': feature_names, 'categorical': categorical},
    objective_params={'epsilon': 1e-4})
model.fit(data, target)

print(model.rules_)
predictions = model.predict(data)
probabilities = model.predict_proba(data)
```
