Git Product home page Git Product logo

Comments (5)

Torvaney avatar Torvaney commented on May 28, 2024

I think optim is actually kind of okay (aside from warnings resulting from invalid rho estimates).

Currently I'm thinking a method kind of like this might work well:

  • Specify constraints as a list of formulae. Something like c(x) ~ equal_to(0).
    • Could specify the penalty/barrier method here. Like gte_zero('log_barrier') or something.
  • Convert formulae to a set of penalty functions.
  • Create a new objective function as sum of original and the penalty functions.

I guess there could be some difficulties/annoyances with the penalty weights. These would probably need to be customisable either through some control type function argument (or varargs with!!!) or in the constraint/formula specification (like 0.1 * c(x) ~ equal_to(0)).

Sequential solutions with increasing penalty weights should also be considered. In this case each constraint could return a function that takes a weight and returns a penalty function (or just takes weight as an argument - maybe this is more idiomatic in R?).

from regista.

Torvaney avatar Torvaney commented on May 28, 2024

Another thought: adding constraints to team parameters could be annoying.

One potential solution would be to look for parameters named by off___* or def___*. This would at least work for the default method, even if it is a little inelegant.

from regista.

Torvaney avatar Torvaney commented on May 28, 2024

The easiest way to make model fitting faster is probably to compute the gradient of the the objective function, rather than relying on gradient-free methods...

from regista.

Torvaney avatar Torvaney commented on May 28, 2024

Potentially a dumb idea, but given it's just matrices, could try any use the rstudio/keras api??

from regista.

Torvaney avatar Torvaney commented on May 28, 2024

Closing for now since the kind of optimisation improvements I want would be their own project...

from regista.

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.