Giter VIP home page Giter VIP logo

Comments (4)

f-charton avatar f-charton commented on July 28, 2024

Coefficient tokens will be 'a0', 'a1', ... They are defined in line 43 and 283 of file src/envs/char_sp.py

To use them you need to set parameter n_coefficients to the number you want (1 if you are going to use a0, 2 if you want a0 and a1...), and adjust the second number in leaf_probs (e.g. 0.6,0.2,0.2,0 for 20% of terminal symbols to be coefficients). This should work so long you use less than 10 coefficients (or 8 for differential equations, since we use a8 and a9 as placeholders for integration constants in our generation routine)

You will need to generate new training data using these coefficients, since the model has never seen them at training time (you might try without, but I doubt it works). But it is possible that retraining a pre-trained model on a relatively small additional sample of data featuring the coefficents (aka few shots learning) might work.

from symbolicmathematics.

arthurserres avatar arthurserres commented on July 28, 2024

Thanks for answering this is really helpful !

The make sense, The last question is how should I declare them ?

Do I need to use the same syntax I used for x, or f that is for instance "a0 = env.local_dict['a0']" or something else ?

Thanks by advance,

Best,

Arthur

from symbolicmathematics.

f-charton avatar f-charton commented on July 28, 2024

I would expect so: for Sympy, a0 is a variable, just like x, and so it should be addressed exactly the same.

from symbolicmathematics.

arthurserres avatar arthurserres commented on July 28, 2024

Nice, thanks for answering :)

from symbolicmathematics.

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.