Keeping the same functional form but different co-efficients.

35 views
Skip to first unread message

Damien Fay

unread,
Apr 19, 2012, 12:29:17 PM4/19/12
to Eureqa Group
I was wondering if its possible to get eureqa to maintain the same
functional form but use different coefficients. This occurs when for
two or more studies there is a common function but the coefficients
are different - perhaps the intercept is different. For example say I
have y1 x1 x2 y2 x3 x4 and I would like eureqa to minimise the sum
squared error for both data sets:

sse(f1)+sse(f2)

where
f1 = y1 - g(x1,x2,a,b)
f2 = y2 - g(x3,x4,c,d)

So g is the functional form but the coefficients {a,b} and {c,d} are
different. For example, the answer might be

y1 = .2 x1 + sin(exp(4 x2))
y2 = .6 x3 + sin(exp(5 x4))

Thanks, Damien.

Michael Schmidt

unread,
Apr 21, 2012, 12:14:18 PM4/21/12
to eureqa...@googlegroups.com
Though it gets a bit complicated, perhaps you could try a target expression like:

min( abs( y - f0(x, f1()) ), abs( y - f0(x, f2()) ) ) = 0

This finds a function f0 that models y, and has the option to use a coefficients that takes two values f1 or f2, which ever yields lower error.

Michael




--
Eureqa Formulize ( http://www.nutonian.com )
-------------------------------------------------
Unsubscribe: eureqa-group...@googlegroups.com
View Group: http://groups.google.com/group/eureqa-group

Damien Fay

unread,
Apr 22, 2012, 9:22:31 AM4/22/12
to Eureqa Group
Thanks Micheal, thats nice to know but won't actually do it. I'm
thinking of using a bayesian model selection routine on top of eureqa
which should do the job even if it is a bit unsatisfying (choosing the
candidate models via eureqa - i.e. a fitness function - and then
evaluating using bayes factors i.e. a different criterion - not
good ). Do you think perhaps there is some way of setting up say 20
eureqa instances to select models for 20 datasets and then passing
these (say 50 unique models for example) onto another eureqa instance
(lets call it the arbiter) to choose between them - in this case we'd
need to force eureqa to stick to a subset of models (i.e. the 50
suggested by the first stage) or at least to models close to them. On
a similar note, does eureqa return the likelihood of the data given
the model? Thanks again, Damien.

Michael Schmidt

unread,
Apr 25, 2012, 12:28:52 PM4/25/12
to eureqa...@googlegroups.com
Hmm... that sounds pretty interesting. There is an open-source API:

http://code.google.com/p/eureqa-api/

It would be possible to automate this with a short program. It might be worth it if you are repeating this process multiple times.

The doesn't return a likelihood of the data given a model, but you could certainly do this manually. You would just need to assume a model of the residuals and then multiply out the probabilities (or sum the log-probabilities). By default Eureqa/Formulize minimizes the mean absolute error, which is equivalent to maximizing the likelihood assuming double exponential distributed residuals. But you could calculate the likelihood given a model with whichever you want.

Michael


Reply all
Reply to author
Forward
0 new messages