Coder Social home page Coder Social logo

Comments (10)

mathurinm avatar mathurinm commented on June 10, 2024 1

the way I see it, the solution is $x^* = \text{argmin} f(x)$ (exactly). Solvers only output an estimate of the solution -- all the more when run with low n_iter or high tol.

If the benchmark is not even an optimization problem, like the comparison of sparse recovery methods of @TheoGuyard, and you use a solver like OMP which does not solve an optimization problem, then it's not super what "solution" would refer too.

from benchopt.

tomMoral avatar tomMoral commented on June 10, 2024 1

Yes this could be a sub-optimal solution.
But I am more in favor of result, as this is less specific to optimization than solution.

from benchopt.

tomMoral avatar tomMoral commented on June 10, 2024 1

The automated call to get_result is indeed a nice improvement that could be made as the same time, as well as letting evaluate_result take an expanded dictionary as input.

from benchopt.

mathurinm avatar mathurinm commented on June 10, 2024

@francois-rozet what bothers me with get_solution is that it's not a solution to the optimization problem. And we're heading for settings in which it's just the result of a method, not a solution.

What do you think of get_result/evaluate_result ?

from benchopt.

francois-rozet avatar francois-rozet commented on June 10, 2024

evaluate_result is good as well. However, I am not sure to understand why get_result does not return a solution. Semantically, a "solver" returns a "solution".

from benchopt.

agramfort avatar agramfort commented on June 10, 2024

from benchopt.

mathurinm avatar mathurinm commented on June 10, 2024

several people stated that it was confusing during the sprint, especially compared to get/set_dataset and get/set_objective
IMO it's not too late to change and makes onboarding easier, as #588

from benchopt.

tomMoral avatar tomMoral commented on June 10, 2024

This is not only cosmetic, this helps with documentation and API consistency (many said during the sprint that this was a confusing point). Thus we would like to change compute to match the get_result method. The question is what it the right wording. We also want to consider the get_one_solution that is going to enter this function and the name of the object passed in the callback, to make all of this consistent.

  • solution is more natural with Solver, but refers to optimization and hurts the semantic of @mathurinm 😆
  • results is more general (thinking of ML benchmarks), and the nice thing is we don't change get_result.

I am in favor of this solution with: get_result/get_one_result/evaluate_result/callback(**result). This will be more consistent.
What do you think @mathurinm , @agramfort , @francois-rozet

from benchopt.

agramfort avatar agramfort commented on June 10, 2024

from benchopt.

francois-rozet avatar francois-rozet commented on June 10, 2024

Both solution and result are fine to me, with a preference for solution to be consistent with Solver (btw a sub-optimal solution remains a solution, same for intermediate solution). The real improvement is changing compute to evaluate_solution or evaluate_result.

P.S. if one should always call callback with result, maybe it is not necessary to force the user to give arguments to the callback. I currently write while cb(self.get_result()): in all my solvers, but while cb():should be enough. It would also allow to not count the "result creation" time as part of the run.

from benchopt.

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.