python-m5p icon indicating copy to clipboard operation
python-m5p copied to clipboard

Add a parameter to release the constraint about which drivers to use in linear models

Open smarie opened this issue 2 years ago • 1 comments

"no pruning" implementation differs from the one a user would expect, as it defaults to the underlying decision tree without using the linear model on the leaves.

Explanation: in M5 there is an extra restriction that leaves' linear models should ony use as drivers the ones that are explicitly used for splits that were removed by the pruning to create the new leaf. This is why when pruning=False the leaves are constant.

This strong restriction should maybe be optional, with a parameter ?

See https://github.com/scikit-learn/scikit-learn/issues/13106#issuecomment-808739902

smarie avatar Apr 12 '23 12:04 smarie

Note that such a choice would be going further that the original M5 and M5' papers. Therefore this is maybe not desirable if this repo is simply to serve as a reference implementation.

smarie avatar Apr 12 '23 12:04 smarie