Common optimizer interface
Closed this issue · 2 comments
uschwes commented
We started having different optimizers in the framework, a common interface would be great.
Suggestion for class hierarchy:
OptimizerBaseInterface - > OptimizerSquaredInterface - > OptimizerScalarInterface
Optimizers on scalar error terms can also operate on squared error terms.
Suggestion for interfaces:
- a common configuration interface can be achieved via sm::property_tree. @HannesSommer or we take the new value_store
- a common termination criterion could be achieved via a callback mechanism with a default implementation checking gradient norm, maximum change in design variables and potentially runtime.
- common status/return value interface should give access to convergence status, number of gradient and objective evaluations, current gradient norm and objective function value.
pfmark commented
Yes, I agree. I think especially having the possibility to work with both scalar and squared error terms at once is important.