Code Monkey home page Code Monkey logo

Comments (9)

jakobbossek avatar jakobbossek commented on July 30, 2024

The problem is, that the helper function paramValueToString from the paramHelpers package forces 2 digit output for numeric parameters. I think we should add another parameter digits to paramValueToString with a default value of 2.

from mlrmbo.

jakobbossek avatar jakobbossek commented on July 30, 2024

To addresss your problem as a user: we should add a parameter like output.precision to mlrMBO to give the user control over number of digits.

from mlrmbo.

danielhorn avatar danielhorn commented on July 30, 2024

More important than the number of digits is the exponent of the parameter. You can add as many digits as you want, at some point every parameter is rounded to 0.0000..., but we want to see the difference between 1.24e-12 and 4.45e-12.
I'm fine with another parameter digits, but imho a parameter showExponent is more important.

from mlrmbo.

jakobbossek avatar jakobbossek commented on July 30, 2024

A parameter for the number of digits would be sufficient if we replace the conversion specification of sprintf form f to g used by paramValueToString. In the following example the number pf digits is fixed to 3:

sprintf("%.3f", 0.001)
# [1] "0.001"
sprintf("%.3g", 0.001)
# [1] "0.001"
sprintf("%.3f", 0.000000001)
# [1] "0.000"
sprintf("%.3g", 0.000000001)
# [1] "1e-09" <- This is what we want

from mlrmbo.

berndbischl avatar berndbischl commented on July 30, 2024

I would suggest this:

  1. "%.3g"
    This is indeed what I usually use nowadays for such logging.

  2. Number 1) should be a default setting in MBOControl.
    The user can overwrite it.
    Allow only one format now for all numerics in the logging line.
    [mbo] 0: cost=0.01; gamma=0.00; epsilon=0.00 : error=0.028, execTime=24374.496
    The default will be good 99% percent of the time.

  3. To program 2) you need to make ParamHelpers::paramValueToString better.
    Introduce new arg "num.format", with default as in 1).

Is that it?

Assigned to Jakob.

from mlrmbo.

jakobbossek avatar jakobbossek commented on July 30, 2024
  1. is exactly what I have already proposed :-)

from mlrmbo.

berndbischl avatar berndbischl commented on July 30, 2024

Sure, but as we can talk less currently, I try to be specific even if it is a bit redundant ;-)

from mlrmbo.

berndbischl avatar berndbischl commented on July 30, 2024

I am reading what is posted here and elsewhere

from mlrmbo.

jakobbossek avatar jakobbossek commented on July 30, 2024

I added the proposed parameter to ParamHelpers::paramValueToString with the corresponding default value. In mlrMBO there is now a output.num.format parameter in the control object which gives the possibility to influence the output.

@daniel: this should fix your issue.

from mlrmbo.

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.