DeepTab icon indicating copy to clipboard operation
DeepTab copied to clipboard

[FAQ]The MambularRegressor throws an error when the number of features exceeds 20.

Open Up-in-the-wind opened this issue 8 months ago • 1 comments

When the number of features exceeds 20, the MambularRegressor will throw the following error. How can this be resolved? KeyError Traceback (most recent call last) in <cell line: 0>() 18 # print("y_train 类型:", type(y_train)) 19 # print("y_train 形状:", y_train.shape) ---> 20 model.fit(X_train, y_train, max_epochs=10) 21 preds = model.predict(X_test) 22 print(model.evaluate(X_test, y_test))

21 frames /usr/local/lib/python3.11/dist-packages/pretab/transformers/ple/tree_to_code.py in recurse(node, depth, parent) 50 else: 51 k = k + 1 ---> 52 my_list.append(pathto[parent]) 53 # print(k,')',pathto[parent], tree_.value[node])

Up-in-the-wind avatar Apr 26 '25 08:04 Up-in-the-wind

Hi @Up-in-the-wind,

Thanks for reporting this — much appreciated.

We’re currently investigating this and will work on a fix. In the meantime, here are a couple of suggestions you can try:

  • Temporarily reduce the number of input features to verify that the model and pipeline are otherwise working as expected.
  • Alternatively, you could try switching to a different regressor (like ModernNCARegressor) to see if the issue persists — this can help isolate whether the bug is specific to MambularRegressor.

Also, if possible, could you please share a minimal reproducible example or at least a bit more detail about your input data? Knowing the shape and nature of the features would help us debug and reproduce the error faster.

Thanks again for reporting — we’ll keep you posted as we work on this!

mkumar73 avatar Jul 04 '25 14:07 mkumar73