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

 

briefly if anyone is interested....

I tried to use the DTW algorithm in clustering, with simple elementary data just for myself...

I took a price and trained RF on its parts in the form of a sliding window, then I again took the same price and the same parts in the form of a sliding window and clustered the DTW algorithm and then trained RF

The error when training and recognizing new data with the DTW algorithm was 2-4% lower

if you add a large number of predictors then I think the error can be much more lower, but the algorithm is slow as hell

 
mytarmailS:

briefly if anyone is interested....

I tried to use the DTW algorithm in clustering, with simple elementary data just for myself...

I took a price and trained RF on its parts in the form of a sliding window, then I again took the same price and the same parts in the form of a sliding window and clustered the DTW algorithm and then trained RF

The error when training and recognizing new data with the DTW algorithm was 2-4% lower

If you add a large number of predictors then I think the error can be lowered a lot more, but the algorithm is slow as hell

Input price... Predictors on input...

Horse-drawn circus!

 
Vadim Shishkin:

The price of entry... Predictors at the entrance...

A horse-drawn circus!

Vadim, if you have something to say, say it...

If you just want to say something at the 5th grade level, it's better to be silent...

at least out of respect for those who will read it later...

 
mytarmailS:

Vadim, if you have something to say, say it...

And if you just want to make a fifth-grade remark, it's better to remain silent...

At least out of respect for those who will read it later...

Predictor do you know what it is?

Why put a price on the net?

 
Vadim Shishkin:

1) Do you know what a predictor is?

2) Why do you need to feed the network a price?

1) well yes, the data on which the network learns

2) and what is more objective than the price? So why not?

 
mytarmailS:

briefly if anyone is interested....

I tried to use the DTW algorithm in clustering, with simple elementary data just for myself...

I took a price and trained RF on its parts in the form of a sliding window, then I again took the same price and the same parts in the form of a sliding window and clustered the DTW algorithm and then trained RF

The error when training and recognizing new data with the DTW algorithm was 2-4% lower

if you add a large number of predictors then I think the error can be much lower, but the algorithm is slow as hell

In a nutshell, why is time series clustering done in the context of RF training?
 
Alexey Burnakov:
In brief, what is the point of doing the clustering of time series in the context of RF training?

If you want to keep it short, I will answer with a picture...

we have two rows of the same length with the same pattern inside, but one pattern does not exactly match the indexes of the other, so the essence of the DTW algorithm is that when clustering it will understand that this is the same pattern, but RF will not understand

It's all roughly speaking of course.

dtw
 
mytarmailS:

1) well, yes, the data on which the network learns

2) and what is more objective than price? , so why not?

Success. :)
 
Vadim Shishkin:
Success. :)
thanks
 
mytarmailS:

If you want to keep it short, I will answer with a picture...

we have two rows of the same length with the same pattern inside, but one pattern is not exactly the same index as the other, so the essence of DTW algorithm is that in clustering it will understand that it is the same pattern, but RF will not understand

The DTW algorithm is not such a universal thing, it just compares two time series by absolute values, i.e. you need pre-normalization of shift and scale along the vertical axis, and a lot depends on the particular implementation. For example, here https://www.mql5.com/ru/code/10755 takes for comparison 2 pieces of fixed length and does not take into account that one of them can be longer, the other shorter, and the amount of calculations can be significantly reduced, etc. We can talk about clustering by DTW-specific parameters - we can calculate not only the "degree of similarity" of two fragments, but also the ratio of horizontal scales.
Reason: