object-oriented minimization david sachs, mark fischler what is the oo minimization project? why is...

21
Object-Oriented Minimization David Sachs , Mark Fischler What is the OO Minimization project? Why is it worth doing? Some alternative related work Concepts and techniques The recent package review Status and intentions

Upload: stephany-mcgee

Post on 04-Jan-2016

218 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Object-Oriented Minimization David Sachs, Mark Fischler What is the OO Minimization project? Why is it worth doing? Some alternative related work Concepts

Object-Oriented MinimizationDavid Sachs, Mark Fischler

• What is the OO Minimization project?• Why is it worth doing?• Some alternative related work• Concepts and techniques• The recent package review• Status and intentions

Page 2: Object-Oriented Minimization David Sachs, Mark Fischler What is the OO Minimization project? Why is it worth doing? Some alternative related work Concepts

What is the OO Minimization project?• C++ so as not to tie to FTN

– User functions are mostly in C++ nowadays

• Under the ZOOM umbrella• All functionality of Minuit

– plus completions orthogonal natural concepts • e.g. domains limited on only one side

• Same “ground rules” and assumptions as Minuit– Highly efficient when cost of function call is high

• Not an f2c of MINUIT– that would forfeit all the O-O advantages

• Factorization of concepts– clarifies what is going on when reading code

Page 3: Object-Oriented Minimization David Sachs, Mark Fischler What is the OO Minimization project? Why is it worth doing? Some alternative related work Concepts

Who is OO Minimization for?• “Stakeholders” are the whole HEP community

– Much of the minimization in our community is used in the context of data fitting

– Replacements for the venerable Minuit are becoming necessary

• Three reactions from physicists:– Are you out of your mind –

nobody needs a replacement for Minuit– Are you out of your mind –

this must already have been done• But in fact, a truly object oriented Minimization package has not been

done, and is not happening except for this one

– Are you out of your mind – why didn’t you provide this years ago?

Page 4: Object-Oriented Minimization David Sachs, Mark Fischler What is the OO Minimization project? Why is it worth doing? Some alternative related work Concepts

Object-Oriented Minimization• What is the OO Minimization project?

• Why is it worth doing?

• Some alternative related work

• Concepts and techniques

• The recent package review

• Status and intentions

Page 5: Object-Oriented Minimization David Sachs, Mark Fischler What is the OO Minimization project? Why is it worth doing? Some alternative related work Concepts

What are the advantages of this package?

• Re-grounding and cleanup– Clear expositions of the algorithms, definitions and

assumptions of Minuit– Supplying some related capabilities that fill “obvious gaps”– Correction of several (minor) errors in existing Minuit

• Extensibilty– Easy to add new termination criteria, domain types– Straightforward to add new algorithms

• Goal is that the work to add a new algorithm is dominated by the work of developing the algorithm; coordinating it within the minization framework should be routine.

Page 6: Object-Oriented Minimization David Sachs, Mark Fischler What is the OO Minimization project? Why is it worth doing? Some alternative related work Concepts

Why is O-O Minimization Desirable?• The O-O style has advantages which are relevant

for the way we want to do minimization– The “function” to be minimized can be related

to an object with state information – A problem can be treated as a true object– Multiple simultaneous minimizations in a job

Page 7: Object-Oriented Minimization David Sachs, Mark Fischler What is the OO Minimization project? Why is it worth doing? Some alternative related work Concepts

Object-Oriented Minimization• What is the OO Minimization project?

• Why is it worth doing?

• Some alternative related work

• Concepts and techniques

• The recent package review

• Status and intentions

Page 8: Object-Oriented Minimization David Sachs, Mark Fischler What is the OO Minimization project? Why is it worth doing? Some alternative related work Concepts

Alternative Related Work• People have done and are doing ports of Minuit to

something that will compile under C++ compilers– ROOT does this for its fitter– Fred James and Winkler are creating a package that will adhere

closely to Minuit• Not really object oriented • Have a much less ambitious philosophy; hard to actively collaborate

without sacrificing our goals

• There are various minimizers for fitters– Fitter applications can be coded without considering a minimization problem as an

independent object, so these packages all forego the advantages of O-O.

• We are “betting” that if a high-quality minimizer with good O-O design becomes available, it will fit the style of programming that the HEP community will be moving toward, and see extensive use.

Page 9: Object-Oriented Minimization David Sachs, Mark Fischler What is the OO Minimization project? Why is it worth doing? Some alternative related work Concepts

Object-Oriented Minimization• What is the OO Minimization project?

• Why is it worth doing?

• Some alternative related work

• Concepts and techniques

• The recent package review

• Status and intentions

Page 10: Object-Oriented Minimization David Sachs, Mark Fischler What is the OO Minimization project? Why is it worth doing? Some alternative related work Concepts

Concepts and Techniques• The Function

– Can by a global function– Can also be a functor

• The Domain– Expresses restrictions on the solution space– Expresses maps to implement these restrictions

• The Problem– Coordinates application of steps of an

algorithm to minimize a function in a domain

Page 11: Object-Oriented Minimization David Sachs, Mark Fischler What is the OO Minimization project? Why is it worth doing? Some alternative related work Concepts

Dynamic Concepts• The Algorithm

– Generic for methods that move to a superior point in terms of minimizing the function

– The package includes all the Minuit algorithms (MIGRAD, SIMPLEX, …) and will expand to include others.

• Termination Criteria– Function call limits– Estimated distance to minimum criteria– Uncertainty in parameter values criteria

• Termination, Domain, Algorithm and Function are all “orthogonal” concepts – expressed by distinct classes

Page 12: Object-Oriented Minimization David Sachs, Mark Fischler What is the OO Minimization project? Why is it worth doing? Some alternative related work Concepts

Object-Oriented Minimization• What is the OO Minimization project?

• Why is it worth doing?

• Some alternative related work

• Concepts and techniques

• The recent package review

• Status and intentions

Page 13: Object-Oriented Minimization David Sachs, Mark Fischler What is the OO Minimization project? Why is it worth doing? Some alternative related work Concepts

The Recent Package Review

• JBK and MP have just completed a Minimization Package Review – Is this package easy to use– Does the class decomposition make sense– Is the library extensible– Is the library maintainable

Page 14: Object-Oriented Minimization David Sachs, Mark Fischler What is the OO Minimization project? Why is it worth doing? Some alternative related work Concepts

The Package Review Comments

• There were a fair number of shortcomings related to producing a truly object-oriented minimization scheme– many types of “objects” would have behavior which

users will find annoying if they really want to exploit the advantages of O-O code

– despite intentions in the other direction, we have been overly influenced by the way minuit does things and views concepts

– The package was describe as currently being “object-centric” rather than “object oriented”

Page 15: Object-Oriented Minimization David Sachs, Mark Fischler What is the OO Minimization project? Why is it worth doing? Some alternative related work Concepts

Package Review Suggestions

• The review cited a need for interfaces to support interactive minimization – an “interactive tool”– The package should not tie in to a particular GUI or

command line interface, but should provide those methods which will commonly be needed by those

• There were the usual collection of suggestions for – better encapsulation

– decoupling – improving cohesion

– cleaning up interfaces

Page 16: Object-Oriented Minimization David Sachs, Mark Fischler What is the OO Minimization project? Why is it worth doing? Some alternative related work Concepts

Package Review Reaction

• We are going through the review document and formulating action items to implement their suggestions– Currently about 25 items, mostly small

– Will end up with close to 40

• We will prioritize the items (most are worth doing) and start on implementation– Actually, while the perusal of the document goes on,

David has been taking care of some of the action items

Page 17: Object-Oriented Minimization David Sachs, Mark Fischler What is the OO Minimization project? Why is it worth doing? Some alternative related work Concepts

Object-Oriented Minimization• What is the OO Minimization project?

• Why is it worth doing?

• Some alternative related work

• Concepts and techniques

• The recent package review

• Status and intentions

Page 18: Object-Oriented Minimization David Sachs, Mark Fischler What is the OO Minimization project? Why is it worth doing? Some alternative related work Concepts

Status and Intentions

• The package is in usable shape– We will be getting in touch with friendly users

to let them try it out • with the understanding that the interface will change a bit in reaction

to the review

– We will be “releasing” the package once most of the review suggestions are dealt with

• By that time, ZOOM packages will standardly be in a form suitable for general HEP (non-Run II) use

Page 19: Object-Oriented Minimization David Sachs, Mark Fischler What is the OO Minimization project? Why is it worth doing? Some alternative related work Concepts

Intended Extensions• Sample interactive minimization tool

– We want to be able to verify that the interface for interactive tools is suitable

• Use cases of interacting with outside packages– “R” statistical package using minimizer– ROOT-involved example

• Termination Criteria Collection• Superior documentation

– Gather into good technical documentation the work done in studying the algorithms– Significantly more mantra-illustrating examples

• Try out mantras for extension– Add a new Algorithm– Create a new type of Domain

Page 20: Object-Oriented Minimization David Sachs, Mark Fischler What is the OO Minimization project? Why is it worth doing? Some alternative related work Concepts

Time-scales• In a couple of months [DS + MF]

– can hope to be at point of releasing package with the improvements

• By CHEP time (late September)– Should be seriously talking with James about how to

avoid dichotomy of packages in the HEP community• But should not cave in on our goals for the sake of adhering

more closely to old style (procedural) coding philosophy

Page 21: Object-Oriented Minimization David Sachs, Mark Fischler What is the OO Minimization project? Why is it worth doing? Some alternative related work Concepts