Hi,
I got the CatBoost error in WIT while I was using CatBoost regression as a custom predict function. I think the tf.examples not supported to catboost.predict method.
Please guide me regarding this.
Below I am writing my code. Please have look at it.
Also, I have already encoded the catgorical feature
from catboost import CatBoostRegressor as CatB
reg_catb = CatB(iterations=20000, max_depth=8, random_state=0, learning_rate=0.024,
# cat_features=cat_feature,
).fit(X_train, y_train,plot=True)
def custom_predict(examples_to_infer):
model_ins= examples_to_infer
preds=reg_catb.predict(model_ins)
return preds
tool_height_in_px=1000
# Setup the tool with the test examples and the trained regressor model
config_builder = WitConfigBuilder(test_examples2[0:]).set_custom_predict_fn(custom_predict).set_model_type('regression')
a=WitWidget(config_builder,height=tool_height_in_px)