Check out the new article: Data Science and ML (Part 31): Using CatBoost AI Models for Trading.
Author: Omega J Msigwa
and there is also the problem of exporting the classifier model to ONNX
Note
The label is inferred incorrectly for binary classification. This is a known bug in the onnxruntime implementation. Ignore the value of this parameter in case of binary classification.
I have a small question or concern that I hope to share.
I believe the underlying issue might be related to what is described here:
https://catboost.ai/docs/en/concepts/apply-onnx-ml
Specifics:
Only models trained on datasets without categorical features are currently supported.
In the Jupyter Notebook catboost-4-trading.ipynb that I downloaded, the pipeline fitting code is written as:
pipe.fit(X_train, y_train, catboost__eval_set=(X_test, y_test))
It appears that the parameter "catboost__cat_features=categorical_features" is omitted, so the model may have been trained without specifying categorical features.
This might explain why the model could be saved as ONNX without any problem.
If this is the case, then perhaps the CatBoost native method "save_model" could be used directly, like this:
model = pipe.named_steps['catboost']
model_filename = "CatBoost.EURUSD.OHLC.D1.onnx"
model.save_model(model_filename, format='onnx')
I hope this observation might be helpful.
- catboost.ai

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Check out the new article: Data Science and ML (Part 31): Using CatBoost AI Models for Trading.
CatBoost AI models have gained massive popularity recently among machine learning communities due to their predictive accuracy, efficiency, and robustness to scattered and difficult datasets. In this article, we are going to discuss in detail how to implement these types of models in an attempt to beat the forex market.
CatBoost is an open-source software library with gradient-boosting algorithms on decision trees, it was designed specifically to address the challenges of handling categorical features and data in machine learning.
It was developed by Yandex and was made open-source in the year of 2017, read more.
Despite being introduced recently compared to machine learning techniques such as Linear regression or SVM's, CatBoost gained massive popularity among AI communities and rose to the top of the most used machine learning models on platforms like Kaggle.
What made CatBoost gain this much attention is its ability to automatically handle categorical features in the dataset, which can be challenging to many machine learning algorithms.
Author: Omega J Msigwa