Coder Social home page Coder Social logo

Comments (6)

arminalaghi avatar arminalaghi commented on July 19, 2024 1

All above is right.
Regarding the slowness for complex functions: one option is to use other methods of polynomial approximation (e.g. Taylor series), but then again as you mentioned, if the function is complicated enough that it requires a high polynomial degree, it is probably not a good idea to implement it via SC. (At least using ReSC/STRAUSS, because a clever simpler design might exist.)
Which reminds me: we have been working on a different synthesis tool: https://arxiv.org/abs/1810.04756

And thanks for the great suggestion! I'll add the note we discussed here to the README file.

from scsynth.

arminalaghi avatar arminalaghi commented on July 19, 2024

Your observation is correct. That line is trying to create a 3D grid to cover all the data points of the functions. You are basically asking it to have 100 points on each input, so you'll have 100^3 input combinations. This makes the program super slow.

Some points:

  1. While this step is necessary, it does not have to have a high granularity. In this particular case, you can probably go with much lower granularity, e.g., [10 10 10]

  2. STRAUSS and ReSC work by approximating data points in the function. By changing the granularity, you are selecting the number of points needed to represent the function. So high granularity means more data points. However, granularity should be selected based on the function you are representing. If the function is not a high frequency function (only slow changes with the input), you probably can get away with a handful of data points.
    Another thing to note is that ReSC and STRAUSS approximate functions by fitting polynomials on the data points. So if the degree of the target polynomial is 3, you should use high granularity.

  3. I am not sure about the 'linear' vs. 'nearest' question, but regarding the solving question: we are solving the optimization problem of polynomial fitting. There are potentially other existing solutions to this problem that might be faster.

Let me know if these are helpful.

from scsynth.

danilo-bc avatar danilo-bc commented on July 19, 2024

These are very helpful, indeed.

So, a general rule of thumb is the higher the degree of the polynomial we're aiming, the higher the granularity needed to properly approximate it.

Are there some better guidelines that could be added to either Wiki or README?

If we're trying to apply simply algorithms such as edge 3x3 edge detection, where we get operations like (1*p1+2*p2+1*p3) I suppose we don't need either high granularity nor polynomial degrees. For this sample, I could simply use degrees=[1,1,1] and granularity=[10,10,10], if I understood correctly.

This does sound like the algorithm reaches a stalling point for complex functions, since both higher degree and higher granularity seem to heavily contribute in runtime. That said, SC isn't really fit for implementing complex operations, as far as I know, so the barrier should be more virtual than actual.

from scsynth.

danilo-bc avatar danilo-bc commented on July 19, 2024

Your remarks were very helpful on how to properly use working around the approximatioin bottleneck. Thank you for sharing your team's new approach to SC Synthesis. Are you planning to distribute that synthesizer somewhere? If so, under what regime (open source, freeware, proprietary, etc.)?

It's great to hear the area is still undergoing development. I checked your page and this repository some time ago and couldn't find any news.

from scsynth.

arminalaghi avatar arminalaghi commented on July 19, 2024

I need to check with the lead author on how he wants to proceed with the code. I assume it can be open sourced, but I am not sure. Either way, it should not be in this repo.

Sorry my page is really old. I need to update it more often.

from scsynth.

danilo-bc avatar danilo-bc commented on July 19, 2024

Thank you. It's good to hear the page is old probably because of more recent work!

from scsynth.

Related Issues (5)

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.