Code Monkey home page Code Monkey logo

Comments (4)

b-shields avatar b-shields commented on August 30, 2024

Glad to hear you have been finding EDBO useful. One way to handle your problem would be to one-hot-encode the ligands and include no ligand as an option. This is what that would look like if you used BO_express:

from edbo.bro import BO_express

# (1) Define a dictionary of components
reaction_components={
    'ligand': ['None','ligand1', 'ligand2', 'ligand3'],
    'concentration':[0.1, 0.2, 0.3]}

# (2) Define a dictionary of desired encodings
encoding={'ligand':'ohe',
          'concentration':'numeric'}

# (3) Instatiate BO_express
bo = BO_express(reaction_components=reaction_components,
                encoding=encoding,
                batch_size=10,
                acquisition_function='EI',
                target='yield')

from edbo.

fnthibaud avatar fnthibaud commented on August 30, 2024

I see, thanks for the swift reply!

Just a quick follow-up: would it be at all possible to use 'resolve' to do the same thing and setting all chemical descriptors for the 'None' ligand to 0?
It seems that when I try using 'resolve' while including 'None' (or, of course, any chemical not included in the NIH database) the edbo bot is spawned and when choosing to one-hot-encode the unknown component, all other components are also one-hot-encoded.

from edbo.

b-shields avatar b-shields commented on August 30, 2024

No problem! Indeed, the resolve method will only work for valid chemical names. In this case I think you may be better off with one-hot-encoding. However, If you would like to utilize a custom encoding I would suggest checking out the less automated but more flexible class edbo.bro.BO (https://b-shields.github.io/edbo/bro.html). BO will optimize over any numerical space you pass as the domain. You just have to specify it as a pandas DataFrame (e.g., generate one using a loop or load a CSV with pandas.read_csv).

from edbo.

fnthibaud avatar fnthibaud commented on August 30, 2024

Great, i'll check it out! Thanks for the help!

from edbo.

Related Issues (13)

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.