This is an efficient and Scikit-learn compatible implementation of the machine learning algorithm [Cyclic Boosting -- an explainable supervised machine learning algorithm](https://arxiv.org/abs/2002.03425), specifically for predicting count-data, such as sales and demand.
x_train: np.ndarray = ... # will be cast to uint8, so make sure you featurize before hand
y_train: np.ndarray = ... # will be cast to uint32
model = cbm.CBM()
model.fit(x_train, y_train)
x_test: np.numpy = ...
y_pred = model.predict(x_test)
```
## Explainability
The CBM model predicts by multiplying the global mean with each weight estimate for each bin and feature. Thus the weights can be interpreted as % increase or decrease from the global mean. e.g. a weight of 1.2 for the bin _Monday_ of the feature _Day-of-Week_ can be interpreted as a 20% increase of the target.
Categorical features can be passed as 0-based indices, with a maximum of 255 categories supported at the moment.
Continuous features need to be discretized. [pandas.qcut](https://pandas.pydata.org/docs/reference/api/pandas.qcut.html) for equal-sized bins or [numpy.interp](https://numpy.org/doc/stable/reference/generated/numpy.interp.html) for equal-distant bins yield good results for us.