Not J, but it sounds like convex optimization maybe? https://www.cvxpy.org/examples/basic/linear_program.html ... or maybe one of the examples more resonates with your problem : https://www.cvxpy.org/examples/ .. I'd be very interested in J solutions to some of these examples
Not necessarily fast to evaluate but I've also messed with https://rosettacode.org/wiki/Amb#J in a similar domain years ago On Wed, Apr 5, 2023 at 8:35 AM Jan-Pieter Jacobs <[email protected]> wrote: > Depending on how complicated the function you're trying to approximate is, > I'd take a look at a simple linear model (using %. ; take a look at the > best fit lab), or a neural network (see e.g. the neural network example on > the J Playground, which classifies 2d data). > > Another classifier often used is decision trees and random forests, > implementations of which can be found in e.g. Python's sci-kit learn. > > The neural network and others are not necessarily going to be monotonic... > > Hope this helps. Otherwise a toy problem would be handy... > > Jan-Pieter > > > On Wed, 5 Apr 2023, 13:23 'Bo Jacoby' via Programming, < > [email protected]> wrote: > > > See https://en.wikipedia.org/wiki/Automated_machine_learning > > Good luck! > > Bo. > > Den onsdag den 5. april 2023 kl. 12.44.56 CEST skrev Elijah Stone < > > [email protected]>: > > > > I know not the first thing about linear programming or numerical > > optimisation, > > but I have a problem which I think is related; can anyone point me in the > > right direction? > > > > I have a set of variables x y... (usually not more than two, though there > > might be in some cases), and an oracle which can tell, given a value for > > each > > variable, whether the result is 'good'. The goal is to construct a model > > for > > the oracle. > > > > The oracle is reasonably nice: it is continuous and monotonic, but > > slightly > > noisy; it might end up being locally non-monotonic, but the model should > > still > > be monotonic. > > > > I expect the oracle can generally be modeled by a simple equation like: 0 > > < a > > + (b*x) + (c*y)--then the goal is to find values for a, b, and c;--or > > possibly > > the second-order equivalent of the same; or possibly a piecewise > > composition > > of such equations. The model should be fast to evaluate, so it shouldn't > > have > > any more terms than are necessary to construct a reasonable > approximation. > > > > Any pointers? > > > > -E > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
