Discussing the article: "ALGLIB library optimization methods (Part II)" - page 3

 
Megacity

 

There doesn't seem to be anything complicated for lbfgs in it.

Haven't tried adam and rmsprop yet, which are considered more advanced. But since this one does, they can definitely do it.

 
Maxim Dmitrievsky #:
Megacity

Maxim Dmitrievsky #:
There seems to be nothing complicated for lbfgs in it.

You have not provided neither test bench sources nor lbfgs, so there is nothing to talk about. Nobody will gut python and its modules here. All MQL5 source codes are provided in this article (and now in the comments to the article) to reproduce the results.

 
Andrey Dik #:

You have not provided neither test bench sources nor lbfgs, so there is nothing to talk about. No one is going to uncover the insides of python and its modules here. All MQL5 source codes are provided in this article (and now in the comments to the article) to reproduce the results.

https://colab.research.google.com/drive/1bF0rFG94phR-au51wpAhi_0WLUUfgNIy?usp=sharing

press the "play" button several times

I am not the one writing the articles, so I will not crack anything on purpose. Reliable recognised libraries are used, in particular SciPy.

Optimization and root finding (scipy.optimize)#
  • docs.scipy.org
Optimization and root finding ()# SciPy provides functions for minimizing (or maximizing) objective functions, possibly subject to constraints. It includes solvers for nonlinear problems (with support for both local and global optimization algorithms), linear programming, constrained and nonlinear least-squares, root finding, and curve fitting...
 

Adam in Megacity has taken up residence on the top floor.

Added the code to the notepad. I'll add some more gradient solvers later, if desired.



 
Andrey Dik #:

here is a fresh (the article has it in the archive) test function class kernel:

Just throw a multidimensional (I mean - in one dimension of the array there are many cells, multidimensional space) array of any dimensionality into args, the method will scatter arguments from the array to two-dimensional functions. It is clear that if you throw an array with odd dimensionality, one cell will be discarded and will not participate in the calculations. I.e., this is a multidimensional test function with an even number of dimensions.

Later I will release it on the basis of one-dimensional ones, it will be more practical and it will be possible to build graphs more clearly.

The commented code is the ability to rotate the function by some angle. This is a head-scratcher for many AOs. It is not used anywhere yet.

No desire to think about it for a long time. You need some function like in the article to reproduce the results.

I don't see any problems at all. Just the computational complexity of the problem will increase.
 

The boundaries are taken incorrectly in Megacity. A correct Megacity should look like this, the image is built in MQL5 (on which the algorithms in the table are tested):

Besides, the results on a two-dimensional function are not an indicator. Besides, you need to count averages (even if you use population simulation, you need to look at the average value between all populations - separate tests). The number of FF runs is not limited in your tests either.

Look at the code above, there is a correct scheme of testing gradient methods there.

 
Andrey Dik #:

The boundaries are taken incorrectly in Megacity. A correct Megacity should look like this, the image is built in MQL5 (on which the algorithms in the table are tested):

Besides, the results on a two-dimensional function are not an indicator. Besides, you need to count averages (even if you use population simulation, you need to look at the average value between all populations - separate tests). The number of FF runs is not limited in your tests either.

Look at the code above, there is a correct scheme of testing gradient methods there.

In the articles, the graph of exactly the ph-i I have optimised is drawn. I don't see the sense in changing from one thing to another. This one looks even simpler. How come they say about a 1000-dimensional f-iie but always optimise a three-dimensional one?
 
Maxim Dmitrievsky #:
In the articles, the graph of exactly the function I have optimised is drawn. I don't see the point in changing from one thing to another. This one looks even easier. How come it is said about a 1000-dimensional f-iie, but it is always a three-dimensional one that is optimised?

This one:

does not correspond to this in any way:


About the "1000-dimensional f-i", see the previous post in this discussion.

Since a 2D function is repeatedly duplicated, you can plot the 3D result of a 2D function (1000-dimensional space cannot be visualised) and plot points from the multi-dimensional space in the corresponding 3D space.

Обсуждение статьи "Методы оптимизации библиотеки Alglib (Часть II)" - Скиньте код сложной ф-ии на 1000 параметров. Используйте скрипт из этой статьи, чтобы имитировать популяцию. Запустите 50 раз градиентные методы с
Обсуждение статьи "Методы оптимизации библиотеки Alglib (Часть II)" - Скиньте код сложной ф-ии на 1000 параметров. Используйте скрипт из этой статьи, чтобы имитировать популяцию. Запустите 50 раз градиентные методы с
  • 2024.11.01
  • Maxim Dmitrievsky
  • www.mql5.com
Повышение размерности можно достичь путем дублирования одномерных бенчмарков или двумерных полученная сумма делится на количество тестовых функций. таком образом всегда известны мин и макс тестовой функции независимо от размерности
 
Andrey Dik #:

This one:

Doesn't match this in any way:


About the "1000-dimensional f-i", see the previous post in this discussion.

Since a 2D function is repeatedly duplicated, you can plot the 3D result of a 2D function (1000-dimensional space cannot be visualised) and plot points from the multi-dimensional space in the corresponding 3D space.

I looked at the test functions here. By pictures they coincide.

I haven't understood the trick with multidimensional ones yet, I need to figure it out.

Популяционные алгоритмы оптимизации
Популяционные алгоритмы оптимизации
  • www.mql5.com
Вводная статья об алгоритмах оптимизации (АО). Классификация. В статье предпринята попытка создать тестовый стенд (набор функций), который послужит в дальнейшем для сравнения АО между собой, и, даже, возможно, выявления самого универсального алгоритма из всех широко известных.