Coder Social home page Coder Social logo

Comments (3)

Scienfitz avatar Scienfitz commented on August 25, 2024

Hi @ustojiljkoff ,

Many thanks for your report. Can you post the exact line how you initialized your ThresholdCondition?

In lieu, I will assume that you might have followed the user guide, wehre unfortunately at the moment we have a slightly faulty example, indicating the use of the tolerance option with a > operator. However, as you correctly state this is not possible.

To use operators like ">", "<", "<=", ">=" simply do not use the tolerance keyword, like so:

ThresholdCondition( # will select all values above 150
    threshold = 150, 
    operator = ">",
)

We are already putting measures to test user guide code in our CI pipeline so this cannot happen easily again.

from baybe.

ustojiljkoff avatar ustojiljkoff commented on August 25, 2024

Hi @Scienfitz ,

Thank you for your response. Yes, I followed the user guide to some extent, trying to use BayBE for a project I previously worked on. I was using DiscreteExcludeConstraint in the following manner:

DiscreteExcludeConstraint(
    parameters = ["Carbonate", "Concentration"], 
    combiner = "AND", 
    conditions = [ 
        SubSelectionCondition(selection = ["Carbonate 1", "Carbonate 2", "Carbonate 3"]),
        ThresholdCondition(
            threshold = 100, #Concentration in mM
            operator = "<=", 
            #tolerance=10 #will raise an error
        ) 
    ]
)

Obviously, this isn't possible (and I can't think of a valid reason why it should be). As you stated, removing tolerance worked like a charm in my example. However, I thought it makes sense to raise an issue, as it might give a wrong impression to a user following the guide.

Thanks for looking into it and for the clarification!

from baybe.

Scienfitz avatar Scienfitz commented on August 25, 2024

Ok glad to hear that you've got a working script for your situation.

Thanks again for making us aware, a fix for the user guide is one they way!

Closing this Issue as resolved.

from baybe.

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.