Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library
- Multi-dimensional function minimization

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Vishnu

Novice

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-24-2018
02:40 AM

351 Views

Multi-dimensional function minimization

Link Copied

11 Replies

mecej4

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-24-2018
03:59 AM

351 Views

Vishnu

Novice

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-24-2018
04:21 AM

351 Views

mecej4

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-24-2018
05:23 AM

351 Views

You did not say which language you are using; GSL is awkward to use from Fortran, or if a C compiler other than GCC is used under Windows. Some of the algorithms, e.g., Fletcher-Reeves and Nelder-Mead, are quite old, and putting C wrappers around such old code does not make the algorithms work better. See https://www.lrz.de/services/software/mathematik/gsl/fortran/ .

You may find something that you can use at www.netlib.org/toms. On that page, search for "unconstrained".

If you simply want to solve a minimization problem a small number of times, the dedicated solvers packaged in AMPL and GAMS are worth considering. See www.ampl.com and https://www.gams.com .

Vishnu

Novice

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-24-2018
05:28 AM

351 Views

mecej4

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-24-2018
05:35 AM

351 Views

Vishnu

Novice

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-24-2018
05:58 AM

351 Views

Andrey_N_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-24-2018
06:26 AM

351 Views

mecej4

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-02-2018
03:56 AM

351 Views

Andrey N, thanks for the link; I did not know that an unconstrained minimization routine was available in DAAL. I had briefly looked at DAAL when it was announced, but set it aside because it seemed not to be designed to be used from Fortran or even C.

I followed the link that you posted and tried to understand how to specify the objective function and call DAAL from Fortran or C. I could not find that information, so I looked at the example code (after installing DAAL for that very purpose) The example refers to some parameters of the objective function that are read from a CSV file, but that still leaves me in the dark about the mathematical form of the objective function. In short, what is the probem that the example code is supposed to solve?

Please point me to a page where the call to the minimizer is documented in, say, the same style as the MKL ?TRNLSP, if available. Thanks.

Andrey_N_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-03-2018
01:33 AM

351 Views

Hi, the description of the solvers is available in the section "Optimization Solvers" of the Developer Guide.

For example, the paragraphs https://software.intel.com/en-us/daal-programming-guide-iterative-solver and https://software.intel.com/en-us/daal-programming-guide-computation-6 discuss the general flow of the iterative solver and its parameters.

Paragraphs such as https://software.intel.com/en-us/daal-programming-guide-limited-memory-broyden-fletcher-goldfarb-sha... and https://software.intel.com/en-us/daal-programming-guide-computation-8 discuss details relevant to the specific solver, e.g., lBFGS.

Details related to the objective functions and their characteristics are available at https://software.intel.com/en-us/daal-programming-guide-objective-function.

Please, let me know, if the documentation contains sufficient level of the required details

mecej4

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-03-2018
02:45 AM

351 Views

What I find missing is the prototype declaration for a function (in Fortran, an interface) and a description of the parameters (in Fortran, dummy arguments to the subroutine/function). I want to know how to write the code for the function, and how to hook up the function to the solver.

I think part of the problem is the result of the object-oriented descriptions in C++ terminology not being comprehensible to a Fortran user who is procedure-oriented.

Here is an example of documentation that makes a solver accessible from more than one language:

http://www.inutech.de/nlp/NLP-1.1.0/reference/class_sqp_wrapper.html

It would, of course, be even better if Intel provided example DAAL codes in Fortran and C, as is done for MKL currently.

Andrey_N_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-03-2018
05:06 AM

351 Views

Hi,

As you correctly mentioned the library provides C++ and Java API, python API is available as well, the library does not support Fortran.

API Reference manual that provides a brief description of the library's interfaces, in addition to the Developer Guide can be downloaded at https://software.intel.com/en-us/articles/daal-api-reference. You can choose daal_cpp_api_2019_beta.zip file. The info on the parameters of the solvers is available at Classes->Class List>daal->algorithms->optimization_solver. If you choose lbfgs->interface 1->Parameter you will see that one of the parameter constructor argument is a function of type sum_of_functions::BatchPtr See also 'Batch' available at the lbfgs->interface1

Let's have a look at lbfgs_dense_batch.cpp example: the first part of the example loads the data from csv data source to the memory, in the Numeric Table format. The second part of the example configures the parameters of the algorithm including the objective function:

// objective function

services::SharedPtr<optimization_solver::mse::Batch<> > mseObjectiveFunction(

new optimization_solver::mse::Batch<>(data->getNumberOfRows()));

mseObjectiveFunction->input.set(optimization_solver::mse::data, data);

mseObjectiveFunction->input.set(optimization_solver::mse::dependentVariables, dependentVariables);

new optimization_solver::mse::Batch<>(data->getNumberOfRows()));

mseObjectiveFunction->input.set(optimization_solver::mse::data, data);

mseObjectiveFunction->input.set(optimization_solver::mse::dependentVariables, dependentVariables);

// Create objects to compute LBFGS result using the default method

// this is the place where objective function is passed into the algorithm

optimization_solver::lbfgs::Batch<> algorithm(mseObjectiveFunction);

optimization_solver::lbfgs::Batch<> algorithm(mseObjectiveFunction);

// configure other parameters

algorithm.parameter.nIterations = nIterations;

algorithm.parameter.stepLengthSequence =

algorithm.parameter.nIterations = nIterations;

algorithm.parameter.stepLengthSequence =

NumericTablePtr(new HomogenNumericTable<>(1, 1, NumericTableIface::doAllocate, stepLength));

// provide a dataset

algorithm.input.set(optimization_solver::iterative_solver::inputArgument,

NumericTablePtr(new HomogenNumericTable<>(initialPoint, 1, nFeatures + 1)));

algorithm.input.set(optimization_solver::iterative_solver::inputArgument,

NumericTablePtr(new HomogenNumericTable<>(initialPoint, 1, nFeatures + 1)));

// Run solver

algorithm.compute();

// Extract the result with call

algorithm.getResult()->get(optimization_solver::iterative_solver::minimum);

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.