mardi 21 novembre 2017

How to write tests for mathematical optimization procedures?

I'm working on project where I need to minimize functions by several variables like func(input_parameters, variable_parameters) -> min(variable_parameters).

I use optimizing functions from SciPy, so minimization process is a grey box: I can see the code on GitHub and read about used algorithms, but I'd like to think that it's okay and aim to testing of my own project. Though, particular libraries shouldn't matter in this question.

At the moment I use few approaches:

  • Create simple examples and find global/local minima by hand and create test that performs optimization and compares its solution with the right one
  • If method needs gradients, compare analytically calculated gradients with their numerical approximation in tests
  • For iterative algorithms built upon ones provided by SciPy check that sequence of function values is monotonically nonincreasing in tests

Is there a book or an article about testing of mathematical optimization procedures?

P. S. I'm not talking about Test functions for optimization , I'm asking about approaches used to test optimization procedure to find bugs faster.

Aucun commentaire:

Enregistrer un commentaire