Re: Eureqa - Trying to find an equation that assigns the best weights for thirty variables

118 views
Skip to first unread message

Dave Nunez

unread,
Jan 9, 2013, 2:16:08 PM1/9/13
to eureqa...@googlegroups.com
Have you taken a look at this yet ?

http://formulize.nutonian.com/target-expression

looks like you are trying to fit coefficients.

ie:

y = f0()*a + b + f1()*c ... + f2()*z
 hth, -d

On Tue, Jan 8, 2013 at 11:34 PM, donnie <donni...@gmail.com> wrote:
I have a 30-variable equation I'm trying to find an estimation for. Each variable is a boolean and my training data looks like this:

f(1,0,0,0,1,1,...,1,0) = 90
f(1,1,0,1,0,1,...,1,0) = 72
f(1,0,0,0,0,0,...,0,0) = 12
...

I want the equation to ultimately look something like this:

y = 12*a + b + 50*c + ... + 0.12*z

No trailing constants. Basically I want to find what set of coefficients for each variable gives results that are as close as possible to all the training results.

I *believe* what I want is the following:

Target Expression: 
  z = f(a,b,c,d,...,y)

Primary Options:
Input Variable
Addition

Error Metric:
Absolute error

Row weight: <none>
Data splitting: Treat all points equally

Thank you! I'm pretty new to Eureqa and it sounds like it is perfect for my needs.

--
 
 



Dave Nunez

unread,
Jan 17, 2013, 6:40:26 PM1/17/13
to eureqa...@googlegroups.com
Hmm never encountered that problem before, from the top of my head, how about requesting the absolute:

y = abs(f0())*abs(a) + abs(b) + abs(f1())*abs(c) ... + abs(f2())*abs(z)

or

y = abs(f0()*a + b + f1()*c...)
 

cheers, -d

On Thu, Jan 17, 2013 at 3:38 PM, donnie <donni...@gmail.com> wrote:
I hadn't seen that, no! Thank you.

I've implemented this method and it's generally doing what I want, but for some reason it puts subtractions into the result formula even though I only have "Addition" selected as a building block.

It's important to my formula that these weights only be positive values. Is there a way to force this constraint?

Thank you!

--
 
 



Dave Nunez

unread,
Jan 24, 2013, 3:11:05 PM1/24/13
to eureqa...@googlegroups.com
If I understand your problem correctly, divide the amount of coefficients that you are modeling by 100, that's going to give you the percentage of contribution for the final sum:

So in your example, you have 30 coeffs that would give you a value of 0.3 per coeff if all of them are "firing" at the same time.   So now the "tricky" part is what happens when only 5,10,15 ect are firing, how are you going to calculate the percentage weights among the coefficients.

You might have to re-state your problem (if I understand it correctly) or maybe somebody else has another way of solving this.  If I think of something else, will let you know.


Cheers, -d





On Tue, Jan 22, 2013 at 1:15 PM, donnie <donni...@gmail.com> wrote:
Worked like a charm! Thank you so much.

Last question, I promise: is there some what to get all the coefficients to add up to 100? The idea is that these coefficients represent the "percent effect" on the final result.

Thank you for all your help. 
--
 
 



Michael Schmidt

unread,
Jan 24, 2013, 3:21:58 PM1/24/13
to eureqa...@googlegroups.com
Hmm... I was going to suggest something like:

y = abs(f0())*x1 + abs(f1())*x2 + abs(100 - abs(f0()) - abs(f1()))*x3

That should force 3 coefficients that add to 100:

abs(f0())
abs(f1())
abs(100 - abs(f0()) - abs(f1()))

Michael


--
 
 

Reply all
Reply to author
Forward
0 new messages