How do you limit the range of the constant in the moving average function?

56 views
Skip to first unread message

bill_080

unread,
Jan 31, 2012, 7:03:16 PM1/31/12
to Eureqa Group
Is there a way to allow the constant "c" to vary within a limited
range in the building block sma(x, c)?

Michael Schmidt

unread,
Feb 5, 2012, 8:00:19 PM2/5/12
to eureqa...@googlegroups.com
The current limit is 20% of the max number of rows. This will be configurable soon though.

A workaround is to split the data into smaller groups -- that is, insert one or more blank rows. The default 20% will apply to the smallest group.

Michael


On Tue, Jan 31, 2012 at 7:03 PM, bill_080 <bill...@yahoo.com> wrote:
Is there a way to allow the constant "c" to vary within a limited
range in the building block sma(x, c)?

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

bill_080

unread,
Feb 6, 2012, 11:07:05 AM2/6/12
to Eureqa Group
Michael,

Thanks for the response.

So, if I had 10,000 rows and wanted to limit the "c" in sma(x,c) to a
maximum of 10 rows, I could enter a blank row in row 50? Does it
treat this as two separate segments? In other words, are the first 10
rows in segment 1 and segment 2 not used in the fit, but only used to
generate the moving average?




On Feb 5, 7:00 pm, Michael Schmidt <michael.douglas.schm...@gmail.com>
wrote:
> > View Group:http://groups.google.com/group/eureqa-group- Hide quoted text -
>
> - Show quoted text -

Michael Schmidt

unread,
Feb 7, 2012, 12:02:31 PM2/7/12
to eureqa...@googlegroups.com
Yeah that's right. If there's a delay of 10, the delay in the first 10 rows would go off the spreadsheet (or the current group of rows), so they are ignored.

But perhaps you can avoid the extra loss of rows from this workaround by repeating the rows in the beginning of the main group of rows. Just a thought.

Michael


--
Eureqa Formulize ( http://www.nutonian.com )

bill_080

unread,
Feb 7, 2012, 1:42:04 PM2/7/12
to Eureqa Group
Michael,

This scheme is working fine.

I realize that you're in the process of updating things and that user
feedback sometimes helps. So, here's my two cents.

So far, the only time I use a moving average is when I think there's a
useful tradeoff between lower noise and a delay in the signal. For
example, sma(x, 10) is a smoother version of "x", but it's also a
delayed version of "x" (by 5 rows). sma(x, 20) is even smoother, but
it's delayed even further (by 10 rows). The higher the smoothing,
the longer the delay.

In my above example of 10,000 rows, 20% would allow anything up to
sma(x, 2000). The search through that would take forever, plus for
that particular example, a reasonable maximum "c" would definitely be
less than 50, most likely less than 10.

Using your technique above, I broke the 10,000 rows into 50 rows and
then 9950 rows. It found a reasonable tradeoff at a "c" of 8. If
it would have hit the full "c" of 10, I would have re-calculated the
model with 100/9900 rows, or even 250/9750 rows if it was required.
My point is, a "c' of 2000 would be out of line, but a "c" as high as
50 would be acceptable.

Anyway, after I found sma(x, 8), I then removed sma(x,c) from the
possible blocks, added sma(x, 8) as a possible block and went back to
the full 10,000 rows (it now only ignores the first 8 rows). It
worked out ok.



Bill


On Feb 7, 11:02 am, Michael Schmidt
> > > > View Group:http://groups.google.com/group/eureqa-group-Hide quoted
Reply all
Reply to author
Forward
0 new messages