Eureqa II: Possible bug in the calculation of R^2.

39 views
Skip to first unread message

electrolito

unread,
Feb 11, 2012, 4:58:10 PM2/11/12
to Eureqa Group
My dear

I obtain R values ​​of about - 9.034 using Eureqa 2 (large and
negative value). However, the R value should always be between 0 and
1. Probably this is due to an bug in the calculation of R^2 in Eureqa
2.
You can explain this please?

I obtain R values ​​between 0 and 1, using the same data in Eureqa 1.


Thanks
Regards
Carlos

Michael Schmidt

unread,
Feb 18, 2012, 12:53:20 PM2/18/12
to eureqa...@googlegroups.com
In the general nonlinear case, it's common for R^2 to be negative since a nonlinear model may not be able to tune its scale and offset. The definition used is:

R^2 = 1 - SS_error/SS_total

Wikipedia discusses negative R^2 briefly in the summary:
http://en.wikipedia.org/wiki/Coefficient_of_determination

You might also see negative R^2 because Eureqa/Formulize optimizes absolute error by default rather than squared error. If R^2 is the statistic you are most interested in, definitely switch to the "Mean squared error" option in the "Set Target" view.

The Results view also displays the correlation coefficient which you might find more intuitive. This ignores scale and offset and will always range -1 to 1. Squaring this value will produce an alternative calculation of R^2.

Michael


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

electrolito

unread,
Feb 23, 2012, 2:25:19 PM2/23/12
to Eureqa Group
Michael

In Eureqa 1 you calculate R^2 by squaring the correlation
coefficient??

Regards
Carlos

On 18 feb, 14:53, Michael Schmidt <michael.douglas.schm...@gmail.com>
wrote:
> In the general nonlinear case, it's common for R^2 to be negative since a
> nonlinear model may not be able to tune its scale and offset. The
> definition used is:
>
> R^2 = 1 - SS_error/SS_total
>
> Wikipedia discusses negative R^2 briefly in the summary:http://en.wikipedia.org/wiki/Coefficient_of_determination
>
> You might also see negative R^2 because Eureqa/Formulize optimizes absolute
> error by default rather than squared error. If R^2 is the statistic you are
> most interested in, definitely switch to the "Mean squared error" option in
> the "Set Target" view.
>
> The Results view also displays the correlation coefficient which you might
> find more intuitive. This ignores scale and offset and will always range -1
> to 1. Squaring this value will produce an alternative calculation of R^2.
>
> Michael
>

Michael Schmidt

unread,
Feb 23, 2012, 5:55:05 PM2/23/12
to eureqa...@googlegroups.com
No, it's the same calculation as Eureqa I.

--
Eureqa Formulize ( http://www.nutonian.com )
Reply all
Reply to author
Forward
0 new messages