Machine learning in trading: theory, models, practice and algo-trading - page 1180

 
Aleksey Vyazmikin:

Ivan Negreshniy, I don't understand something, here I created model in CatBoost, and how its connection is supposed to be organized bridge/channel from advisor to python, on which predictor values will be transferred, and in the opposite direction the result of calculations will be received - a concrete class?

As far as I understand, CatBoost allows to unload the code of the model, which I do not understand, but I will attach for professional estimation, is it impossible to integrate it somehow in MQL and not to use python then? And, CatBoost has libraries in C++, they can not make them work in MQL and do not use python or console commands?

What's not clear? Bridge is needed for end-to-end automation of work with data and models directly from Expert Advisor, including creation, setup, training, etc. And what CatBoost dumps into files is serialization of a particular model, which can be used only for calculations.

Of course, it's possible to create an EA based on these files in the editor, but it will not much differ from an ordinary EA with rigid logic, and if this is the aim, then IMHO, it's much easier to achieve it through training with templates, which I suggested before. https://www.mql5.com/ru/forum/270216

Since everything there is trained and generated automatically, and the code of each tree is converted into a separate, logical function, which may be easier to analyze and faster in execution, if you finish, we can then compare.

Машинное обучение роботов
Машинное обучение роботов
  • 2018.08.02
  • www.mql5.com
Привет всем, я занимаюсь машинным обучением (МО) советников и индикаторов и решил вынести на всеобщее обсуждение свои эксперименты...
 
Aleksey Vyazmikin:

Laborious for me in the first place.

Most of the predictors are a bunch of indicators and fitting them into the ATR daily. The rest of the time series work is characterizing predictors.

I have two questions.

1) Please explain what it means -a bunch of indicators and their fitting in the ATR diary.

2) Why catbust? Are you sure it is better than other boosts?

 
Ivan Negreshniy:

And what is not clear here, the bridge is needed for end-to-end automation of work with data and models directly from the EA, including creation, configuration, training, etc,

I see, i.e. it is first of all an opportunity to create your own interface to work with the MO library, right? This is equivalent to what I am now planning to do the same interface but through activating an exe file and feeding commands into it. In general, yes it is interesting to do it via python, but I don't have such knowledge, unfortunately.

Ivan Negreshniy:

And what CatBoost dumps into files, this is serialization of a specific model, which can be used only for calculations.

Of course, we can, of course, deal with these files in the editor and create an EA based on them, but it will not be much different from the usual EA with rigid logic, and if this is the goal, then IMHO, it is much easier to achieve it through training with templates, which I suggested. https://www.mql5.com/ru/forum/270216

If you understand this code, maybe you can tell me how to translate it into readable form, for example by giving each rule a finished description, like I do for leaves after processing models from R

if(Test_P==11519)if(RSI_Open_M1<0.5 && Levl_High_H1s1N>=1.5 && Levl_Close_H1s1N>=0 && Levl_Low_H1s1N>=-3.5 && Levl_High_H1s1N<3.5 && Levl_Close_H1s1N>=1.5 && Part_H1>=2.5) CalcTest=CalcTest+1; //(0.10156250 0.61718750 0.28125000)

i just can't understand the encryption algorithm in this code - can you make its description/interpreter (maybe for a fee)?

Ivan Negreshniy:

And if that's the goal, IMHO, it's much easier to achieve it through pattern learning, which I suggested. https://www.mql5.com/ru/forum/270216

As there everything is trained and generated automatically, and the code of each tree is converted into a separate, logical function, that might be easier for analysis and faster in execution, if you complete it, we can compare later.

The goal is not just to get a model, but to get leaves, evaluate them, and then use those leaves to generate new models.

You created the process of automatic nets creation on the basis of naked indicators and markup, the information is transferred to the template, in my case there is postprocessing of indicators, plus some of my indicators are used, which I wouldn't like to display, so it turns out that the method is not available and, again, you can't get the leaves from it...

 
mytarmailS:

I have two questions

1) Please explain what it means -a bunch of indicators and fit them into the ATR daily

2) Why catbust? Are you sure it's better than other boosts? or les

This is my view of the market, i.e. the price has a plan for movement, which is defined by ATR at the beginning of the day, then, depending on the obstacles (levels of resistance (levels of making/revising of trading decisions by market participants), which are, among other things, indicators), this plan is implemented or not. Predictors describe these obstacles in relation to the movement plan. So, this is what it looks like graphically - a grid of the ATR range and different indicators inside it

Screenshots from MetaTrader platform

Si-9.18, M1, 2018.08.30

JSC &#39;&#39;Otkritie Broker&#39;&#39;, MetaTrader 5, Real

For memory

Si-9.18, M1, 2018.08.30, Otkritie Broker JSC, MetaTrader 5, Real


2. CatBoost - I just had some help setting it up. It is definitely faster than my previous approach to creating models in R and more efficient, it has documentation and commands through DOS :) Compared to other tools, for example Deductor Studio, it was more stable and models are better coming out, plus the last one is paid, and here everything is free.

 
Maxim Dmitrievsky:

You may be interested, came across

I want to make a system on the optimization of trees, or rather through the construction of trees through the optimizer... interesting topic, but I do not know where to start :))

https://explained.ai/

Thanks for the concern!

The language barrier makes reading excruciating, and translators make the text either dumb or funny... Alas.

 
Maxim Dmitrievsky:

translate one word at a time, through the Google translator plugin for chrome.

I use theImTranslator plugin in chrome, it works fine when you translate a paragraph at once, when you select words and right-click on the context menu


 
Maxim Dmitrievsky:

you don't have to click on google

What's the plugin? I have in Chrome it used to work, then stopped, and I do not know how to configure it.

 
Aleksey Vyazmikin:

I see, i.e. it is first of all an opportunity to create your own interface to work with the MO library, right? This is equivalent to the fact that now I am planning to make the same interface but through activating an exe file and feeding commands to it. In general, yes it is interesting to do it via python, but I don't have such knowledge, unfortunately.

If you understand this code, maybe you could tell how to translate it into readable form, for example by giving each rule a finished description, for example, as I do for leaves after processing models from R

I just can't understand the encryption algorithm in this code - can you make its description/interpreter (maybe for a fee)?

The goal is not just to get a model, but to get leaves, evaluate them, and then generate new models based on those leaves.

You created the process of automatic nets creation on the basis of naked indicators and markup, the information is transferred to the template, in my case there is post-processing of indicators, plus I use some indicators, which I didn't want to make public, so it turns out that the method is not available, and again - you can't get the leaves from it...

I do not understand why I may need to manually edit the splits and leaves deciding trees, yes I have all branches are automatically converted to logical operators, but frankly I do not remember that I myself have ever corrected them.

And in general it's worth digging the code CatBoost, how to be sure.

For example I put above test on python my neural network with learning by multiplication table by two, and now took it for testing trees and forests (DecisionTree, RandomForest, CatBoost)

import catboost
from sklearn.tree import DecisionTreeRegressor
from sklearn.ensemble import RandomForestRegressor
from catboost import CatBoostRegressor

x = [[1,2],[2,2],[3,2],[4,2],[5,2],[6,2],[7,2],[8,2],[9,2]]
y = [2,4,6,8,10,12,14,16,18]

print('-------- 1 DecisionTree')
tree = DecisionTreeRegressor().fit(x,y)
for ix in x: print(' {:2.2f}*{:2.2f}={:2.2f} '.format(ix[0],ix[1],tree.predict([ix])[0]))

print('-------- RandomForest 10 Tree')
regr = RandomForestRegressor(n_estimators=10).fit(x,y)
for ix in x: print(' {:2.2f}*{:2.2f}={:2.2f} '.format(ix[0],ix[1],regr.predict([ix])[0]))

print('-------- CatBoost 10 Tree')
cat = CatBoostRegressor(iterations=10, verbose=False).fit(x,y)
for ix in x: print(' {:2.2f}*{:2.2f}={:2.2f} '.format(ix[0],ix[1],cat.predict([ix])[0]))

and here's the result - clearly it's not in favor of CatBoost, like two times two is zero five...:)


It is true that if you take thousands of trees, the results improve.
 
Ivan Negreshniy:

I do not understand why manual editing of splits and leaves of solving trees may be necessary, yes I have all branches automatically converted to logical operators, but frankly I do not remember that I have ever corrected them myself.

And in general it's worth digging code CatBoost, how to be sure.

For example, I've put above a test on python my neural network with learning by multiplication table by two, and now took it to test trees and forests (DecisionTree, RandomForest, CatBoost)

and here's the result - clearly it's not in favor of CatBoost, like two times two is zero five...:)


what the hell, it's impossible that the forest or boosting can not cope with the multiplication table

 
Maxim Dmitrievsky:

No way, there's no way the forest or boosting can't handle the multiplication table

there's a script, anyone can check for themselves, maybe I have a python of the wrong system))