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

 
Andrey Dik #:

Unfortunately, it does not correspond to the methodology of algorithm testing in the articles. The number of calls to the FF is not specified, incorrect ranges without function offset are exposed, tests on different dimensions are not performed. The results are not summarised.

All sources are provided in the articles and comments, anyone can look at the code and reproduce the results. I don't see the point in continuing the topic.

A test on search time would be useful. Gradient ones are considered the fastest. For example, a comparison with a full enumeration of parameters. The rest is from the evil one.

Jamming is overcome through batching, as demonstrated. Choosing the right size of batches is even more important than a particular algorithm. This is what is used in NS.
 

In the notebook I added code to calculate Megacity with arbitrary number of dimensions. (Multivariate Megacity LBFGS) The result is output for two.

Result on 40 dimensions. No tuning of parameters.


 
1000 measurements. Counted 9 minutes in colab (wasted time, not including writing code).

 

It seems that the multidimensional f-ya was counted incorrectly. I tried to make it just like in the article:

def megacity_function(x):
    def process_element(x0, x1):
        a = np.sin(np.sqrt(np.abs(x0 - 1.13) + np.abs(x1 - 2.0)))
        b = np.cos(np.sqrt(np.abs(np.sin(x0))) + np.sqrt(np.abs(np.sin(x1 - 2.0))))
        f = a + b

        res = np.floor(np.power(f, 4)) - np.floor(2 * np.exp(-(np.power(x0 + 9.5, 2) + np.power(x1 + 7.5, 2)) / 0.4))

        #  Масштабирование результата
        res_scaled = (res - (-1.0)) / (12.0 - (-1.0)) * (1.0 - 0.0) + 0.0

        return res_scaled

    def recursive_process(arr):
        if len(arr.shape) == 1:  #  Если массив одномерный
            if len(arr) >= 2:
                sum_value = 0.0
                num_pairs = len(arr) // 2
                for i in range(num_pairs):
                    sum_value += process_element(arr[i * 2], arr[i * 2 + 1])
                return sum_value / num_pairs
            else:
                raise ValueError("Массив должен содержать как минимум два элемента")
        else:  #  Если массив многомерный
            return np.array([recursive_process(sub_arr) for sub_arr in arr])

    return recursive_process(np.array(x))

In the article like this:

double CalcFunc (double &args []) //function arguments
  {
    int numbOfFunctions = ArraySize (args) / 2;
    if (numbOfFunctions < 1) return GetMinFunValue ();

    double x, y;
    double sum = 0.0;
    for (int i = 0; i < numbOfFunctions; i++)
    {
      x = args [i * 2];
      y = args [i * 2 + 1];

      if (!MathIsValidNumber (x)) return GetMinFunValue ();
      if (!MathIsValidNumber (y)) return GetMinFunValue ();

      //double u = 0.5;
      //x = x * cos (u) - y * sin (u);
      //y = x * sin (u) + y * cos (u);

      if (x < GetMinRangeX ()) return GetMinFunValue ();
      if (x > GetMaxRangeX ()) return GetMinFunValue ();

      if (y < GetMinRangeY ()) return GetMinFunValue ();
      if (y > GetMaxRangeY ()) return GetMinFunValue ();

      sum += Core (x, y);
    }
    
    sum /= numbOfFunctions;

    return sum;
  }


Result for 50 dimensions:

+ added multiprocessing. It is better to run on TPU instead of CPU. It counts faster.

Then I will change the function to the modified one from the article.

 
Maxim Dmitrievsky #:

It seems that the multidimensional f-ya was counted incorrectly. I tried to make it just like in the article:

The article is like this:


Result for 50 measurements:

+ added multiprocessing. It is better to run on TPU instead of CPU. It counts faster.

Then I will change the function to the modified one from the article.

How is the conversion from multidimensional to three?
 
mytarmailS #:
And how does the conversion go from multidimension to three?

Just taking the first 2 dimensions and the result for them )

Added the optimisation code with the neuron"Multivariate Megacity NN" :)

It's a bit messy so far, but it somehow worked on two dimensions.

 
Maxim Dmitrievsky #:

Just taking the first 2 measurements and the result for them )

And you need to take the average value of the corresponding paired measurements.

The value of a multidimensional function F, where n is the number of two-dimensional ones and f is a two-dimensional function: F(x,y) = (1/n) * Σ f(xi,yi)

Coordinates to visualise a multidimensional space in a three-dimensional space:

x = (x1 + x2 + ... + xn) / n
y = (y1 + y2 + ... + yn) / n

You can also output the points of all individual two-dimensional f, then you will get a set of points in three-dimensional space.

 
Andrey Dik #:

And it is necessary to take the average of the corresponding paired measurements.

Value of multivariate function F, where n is the number of two-dimensional, and f is a two-dimensional function: F(x,y) = (1/n) * Σ f(xi,yi)

Coordinates for visualising a multidimensional space in a three-dimensional space:

x = (x1 + x2 + ... + xn) / n
y = (y1 + y2 + ... + yn) / n

You can also output the points of all individual two-dimensional f, then you will get a set of points in three-dimensional space.

You can, but I don't use it all, so I don't want to. You can only draw explored areas. To see what it does in dynamics.
 

Seems to me, extremely curious stuff, even with the code.


https://kolibri.press/324864


https://github.com/Computational-Turbulence-Group/SURD

Can someone translate the code into R?

GitHub - Computational-Turbulence-Group/SURD
GitHub - Computational-Turbulence-Group/SURD
  • Computational-Turbulence-Group
  • github.com
A Python repository for decomposing causality into its synergistic, unique, and redundant components for complex and chaotic systems. SURD (Synergistic-Unique-Redundant Decomposition) is a causal inference method that measures the increments of information gained about future events based on the available information from past observations. It...
 
СанСаныч Фоменко #:

Seems to me, extremely curious stuff, even with the code.


https://kolibri.press/324864


https://github.com/Computational-Turbulence-Group/SURD

Can someone stranlise the code in R?

I was recently given a link to this approach as well. I haven't looked into it yet.

After the Prado contest there were a number of articles on different approaches, like this one (vpn needed).

A New Way to Detect Causality in Time-Series: Interview with Alejandro Rodriguez Dominguez
  • Microprediction
  • microprediction.medium.com
I virtually sat down with Alejandro Rodriguez Dominguez to discuss his recent paper with Om Hari Yadav on causality detection. I’m always on the lookout for new tricks to sharpen the search for relevant exogenous data, and I was thinking of including Alejandro and Om Hari’s ideas in my entry in the ADIA Lab Causal Discovery Contest that...