Giter VIP home page Giter VIP logo

Comments (6)

tobiasraabe avatar tobiasraabe commented on June 3, 2024

👍 Agree.

from estimagic.

roecla avatar roecla commented on June 3, 2024

I like the idea of the named tuple. This would allow us to very flexibly return everything possibly interesting in the "internal" optimization output - no matter which optimizer library was used. Especially if info is a dictionary and we come up with a good set of keys that unifies the outputs from the different libraries. We could also easily tag on additional information collected outside the optimizer library (e.g. for the purpose of debugging).

Regarding serializability

  1. I wonder if it's really necessary to stick to params as a DataFrame. I cannot think of a case at the moment where params.to_dict() would cause us to lose any information. Of course, that would mean converting it back in many cases (such as the comparison plot) but that might be worth it.
  2. In case we decide to return params as a dictionary: Named tuples are not easily serializable so given that there are only two entries in the tuple we might want to skip the naming step.

Moving to the (named) tuple should also allow us to get rid of the duplication now present in what the optimization returns. Right now both res_dict and params contains the final parameter vector.

from estimagic.

janosg avatar janosg commented on June 3, 2024

Regarding 1: No loss of information, but you can't do anything with such a dictionary. Also, I really want to convince people that there is nothing better than a DataFrame to represent and manipulate parameter vectors.

Yes, it is true that we can get rid of the duplication. Good observation!

from estimagic.

janosg avatar janosg commented on June 3, 2024

The returned result should also contain the constraints.

from estimagic.

tobiasraabe avatar tobiasraabe commented on June 3, 2024

#102 implements a results dictionary which contains harmonized fields which are the same across optimizers and other fields.

We thought about implementing a nice __repr__ method which turns the dictionary into a beautiful screen output, but it is delayed for now.

from estimagic.

janosg avatar janosg commented on June 3, 2024

Done in estimagic 0.1.

from estimagic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.