Is there a pattern to the chaos? Let's try to find it! Machine learning on the example of a specific sample. - page 4

 
elibrarius #:

Redesigned from Alglibow.
Now I've run more trees in the calculation. By morning I think it will calculate a new version.

Or maybe I did something wrong, if the result is much worse than yours.

You may have redone it correctly, but you need either to tune the parameters or the algorithm itself does not pull - the situation is not simple.

Why don't you use CatBoost - training is faster there, especially if you have a video card from nVideo?

 
elibrarius #:
There are 9,046 lines. I have 9000. It won't make much difference.

You have a much better curve. I'll try tinkering with the parameters some more.

It didn't get any better. It's about the same. 0.01400

You're doing better with catbustom.

 
elibrarius #:

It didn't get any better. About the same. 0.01400

You're doing better with Catbustom.

So why don't you use it?

Have you tried splitting the target into 3 categories?

 
Aleksey Vyazmikin #:

So should we use it?

Have you tried marking the target into 3 categories?

I'll try 3 categories one of these days..... Well, I'm just training 2 models, not multiclass.
 
elibrarius #:
I'll try 3 categories the other day..... Well I'm just training 2 models, not multiclass.

Give it a try.

You can drop your sample, I will also try to train it.

 

I'll try training and referrals. How do you redo the targeting?
The last 4 columns


at target 1 trade
direction 1, then if class 1 is predicted, we will get profit on 1 column of the financial result, and if class -1 is predicted, we will get loss on 2 column of the financial result.
direction -1, then if class -1 is predicted, we will get profit on 2 column of the financial result, and if class 1 is predicted, we will get loss on 1 column of the financial result.

at target 0 do not trade.

if any direction +1 or -1 is predicted, we will get a loss modulo the financial result? From your previous explanations this variant appears. But the price can go either up or down and if the right direction is chosen, we should get profit.

Or it will be the same as in 1 case
direction 1, then if class 1 is predicted, we will get profit on 1 column of the financial result, and if class -1 is predicted, we will get loss on 2 column of the financial result.
direction -1, then if class -1 is predicted, we will get profit on 2 column of the financial result, and if class 1 is predicted, we will get loss on 1 column of the financial result.

Which variant is correct?
Or can you show how the target is formed directly in the code via if(){}else{}?

 
elibrarius #:

I'll try training and referrals. How to redo the targeting?
Last 4 columns


if target 1 trade
direction 1, then if class 1 is predicted, we will get profit on 1 column of financial result, and if class -1 is predicted, we will get loss on 2 column of financial result.
direction -1, then if class -1 is predicted, then we will get profit on 2 column of financial result, and if class 1 is predicted, we will get loss on 1 column of financial result.

if target 0 do not trade.

if any direction +1 or -1 is predicted, we will get a loss modulo the financial result? From your previous explanations this variant appears. But the price can go either up or down and if the right direction is chosen, we should get profit.


Or it will be the same as in 1 case
direction 1, then if class 1 is predicted, we will get profit on 1 column of the financial result, and if class -1 is predicted, we will get loss on 2 column of the financial result.
direction -1, then if class -1 is predicted, we will get profit on 2 column of the financial result, and if class 1 is predicted, we will get loss on 1 column of the financial result.

Which variant is correct?
Or can you show how the target is formed directly in the code via if(){}else{}?

The zeros will remain zeros, but the "1" can be converted to "-1" and "1" - depending on the direction. Accordingly, if we classify "1" or "-1" at target "0", we get a loss modulo, otherwise we get a gain modulo from either of the last two columns.

My financial result is calculated through closed positions/transactions - and if there was a loss, then a zero is set, so the approach does not allow to estimate what would have happened if there was an opposite entry - most often a loss, according to the strategy, because a stop loss would be set right after the extremum of the last bar.

What I did was to divide the sample into two by the direction of entry - this increased the number of models that passed the threshold of 3000 pips.

I should add that if the target is "1", but the signal was classified as "-1", then apparently there will be no loss, because in reality such a signal would not pass.
 
Aleksey Vyazmikin #:

Zeros will remain zeros, and "1" can be reclassified as "-1" and "1" - depending on the direction. Accordingly, if at target "0" we classify "1" or "-1", we get a modulo loss, otherwise we get a modulo gain from either of the last two columns.

My financial result is calculated through closed positions/transactions - and if there was a loss, then a zero is set, so the approach does not allow to estimate what would have happened if there was an opposite entry - most often a loss, according to the strategy, because a stop loss would be set right after the extremum of the last bar.

What I did was to divide the sample into two by the direction of entry - this increased the number of models that passed the threshold of 3000 pips.

I should add that if the target is "1", but was classified as "-1", then apparently there will be no loss, because in reality such a signal would not pass.
It's all very confusing. I think I will stop on the tests conducted.
 
elibrarius #:
It's all a bit confusing. I think I'll stop with the tests I've done.

No, it's not confusing, it's a logical conversion. If you are confused, I can make a separate target with repartitioning and post it here.

 
Aleksey Vyazmikin #:

No, it's not confusing, it's a logical conversion. If you are confused, I can make a separate target with repartitioning and post it here.

You need an accurate financial result from the errors. Without them, the balance line is unreliable.
Fin. res. if we choose 0 (you can not include, it will always be 0), if 1, if -1. Always, even if you mark as 0 class do not trade. The model will be wrong and it is necessary to know the price of error.
Reason: