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

 
mytarmailS #:
Multiple testing error (p- hacking).

It's mathematically natural.
Yes
 

how to write a shape of output probability of logistic regressionCV model 

below is a code and i have attached a model 

anyone help plz

//+------------------------------------------------------------------+
//|                                                         onnx.mq5 |
//|                                  Copyright 2023, MetaQuotes Ltd. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2023, MetaQuotes Ltd."
#property link      "https://www.mql5.com"
#property version   "1.00"
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
long onnx_handle;
int OnInit()
    {
//"ONNX files (*.onnx)|*.onnx|All files (*.*)|*.*"
     string file_names[];

     if(FileSelectDialog("Open ONNX model", NULL, "ONNX files(*.onnx)|*.onnx", FSD_FILE_MUST_EXIST, file_names, NULL) < 1)
          return 1;

     onnx_handle = OnnxCreate(file_names[0],
                                   ONNX_DEBUG_LOGS);

     if(onnx_handle == INVALID_HANDLE)
         {
          Print("invalid ");
          Print(GetLastError());
         }


     Print(file_names[0]);


//input shape
     long getinput = OnnxGetInputCount(onnx_handle);
     long outputcount = OnnxGetOutputCount(onnx_handle);

     OnnxTypeInfo type;








     string inputName = OnnxGetOutputName(onnx_handle, 1);

     OnnxGetOutputTypeInfo(onnx_handle, 0, type);

     string sa = EnumToString(type.type);

     OnnxTensorTypeInfo tensor;

     tensor = type.tensor;

     long dimension = tensor.dimensions[0];

       long inputshape[]={1,33};
       

bool inpshape=OnnxSetInputShape(onnx_handle,0,inputshape);

     long  Outputlabel[]={1};

bool outputshape=OnnxSetOutputShape(onnx_handle,0,Outputlabel);

     long  Outputprobability[]={1,1};
     
  bool outputshape2=OnnxSetOutputShape(onnx_handle,1,Outputprobability);

    


     EventSetTimer(1);

//---
     return(INIT_SUCCEEDED);
    }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
    {
//--- destroy timer
     EventKillTimer();

    }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
    {
//---

    }
//+------------------------------------------------------------------+
//| Timer function                                                   |
//+------------------------------------------------------------------+
void OnTimer()
    {
    
       
//---
   struct Map
     {

    }
//+-------------------------

 
Maxim Dmitrievsky #:
Lasers with the least amount of stuff in them
This is a very good post right here. Because just code is hard to understand. And here is the approach and algorithm step by step. I wish I had an article. Thank you. Labels are defined according to the average of labels within a cluster - how else can labels be defined?
 
Ilnur Khasanov #:
This is a very good post right here. Because just code is hard to understand. And here is the approach and algorithm step by step. I wish I had an article. Thank you. The label is defined according to the average of labels within a cluster - how else can labels be defined?
Hi :) it is necessary that in general (by the sum of all profits of trades of the cluster) the marking of the cluster remains profitable, because otherwise why to teach to trade not profitable. You can correct by median, you can not correct, but delete examples with opposite labels. You can correct partially. You can calculate not by the number of zeros and ones, but by the total profit for zeros and ones or by the average profit. The thought has not gone any further.
 
Maxim Dmitrievsky #:
Hi :) it is necessary that in general (by the sum of all profits of cluster trades) the markup of the cluster remains profitable, because otherwise why teach to trade not profitable. You can correct by median, you can not correct, but delete examples with opposite labels. You can correct partially. You can calculate not by the number of zeros and ones, but by the total profit for zeros and ones or by the average profit. The thought has not gone any further.

Quite agree, read that on an existing cluster EVERYTHING can be labelled accordingly.

All this is fine at the training stage, when we form and eventually have clusters and assign labels to them.

But this is training!

But the reality is quite different: by the existing/existing cluster/clusters we can tell what label will be in the future! And when a cluster is formed under this future label and we assign a label for the formed cluster, will the predicted label coincide with the actual label?

I.e. the future label is determined by probability.

 
СанСаныч Фоменко #:

Quite agree, read that on an existing cluster EVERYTHING can be labelled accordingly.

All this is fine at the training stage, when we form and eventually have clusters and assign labels to them.

But this is training!

But the reality is quite different: we can tell from the existing/existing cluster/clusters what label will be in the future! And when a cluster is formed under this future label and we assign a label for the formed cluster, will the predicted label coincide with the actual label?

I.e. the future label is determined by probability.

This is where the terver comes into play, right, it's probably better to explain it with it. But I don't have a fully formulated theory yet. That's why I suggest to brainy experts to help me formulate it :)

I formulated it for myself through learning theory. Reducing overtraining on noise improves the result on new data. So it is not claimed that a grail is created. The claim is that overtraining is reduced, and as a consequence, the result is better on new data. And this is already enough for most tradduns.

Simple enough preconditions and original implementation.
 
Through learning theory, I think I can reasonably prove it. I haven't done it with theorver yet.
 
Maxim Dmitrievsky #:
In general, I would not like to continue this topic because someone doesn't understand how learning differs from optimisation.

I don't. Let's not continue.

 
fxsaber #:

I don't understand. We don't.

Actually, once again, part of my reply was taken out and the semantic part was omitted. This is how only optimisers operate.

As a result, all messages are twisted.
 

Maxim Dmitrievsky #:

Reducing overtraining on noise improves results on new data.

Your method makes it easier to train the model. There is less noise for it and it is easier to train. It will be easier for the same tree to identify a cluster in the data in which all 100% of examples =1, not 60% of examples.
But by labelling 40% of examples with a different class, you add noise to the trade, you put 1 instead of 0.

But your charts look stable and promising enough on OOS.
Do you plan to make a signal? Even without subscription, just to see what will happen in real life on OOS.