Eureqa Desktop General Reference

Model Building Blocks in Eureqa

Eureqa searches for a formula by combining mathematical building-blocks (e.g. add, subtract, multiply, divide). The list below describes all of the standard building blocks available.

Contents

Arithmetic

Name Usage Comments
constant 1.234 Allows solutions to use real-valued constants
integer 7 Allows solutions to use integer constants
add x + y or add(x,y)
subtract x - y or sub(x,y)
multiply x * y or mul(x,y)
divide x / y or div(x,y) y must be non-zero
negation -x
return to top ⇑

Trigonometric

Name Usage Comments
sine sin(x) The angle is in radians
cosine cos(x) The angle is in radians
tangent tan(x) The angle is in radians
return to top ⇑

Exponential

Name Usage Comments
exponential exp(x) Returns e^x
logarithm log(x) This is the natural logarithm (base e)
factorial factorial(x) or x! Computes the real valued factorial as gamma(x+1)
power x ^ y or pow(x,y) x and y could be any expression
sqrt sqrt(x) x must be positive
return to top ⇑

History Functions

Name Usage Comments
Delayed Variable delay(x,num_rows) Returns the value of the x variable num_rows prior to the current row
Simple Moving Average sma(x,num_rows) Returns the average value of the last num_rows values of the x variable
Weighted Moving Average wma(x,num_rows) Returns the arithmetically weighted average value of the last num_rows values of the x variable
Modified Moving Average mma(x,num_rows) Returns the modified average value of the last num_rows values of the x variable
Simple Moving Median smm(x,num_rows) Returns the median value of the last num_rows values of the x variable. If there are an even number of values, smm returns the first value, at the floor(length / 2) index.
return to top ⇑

Squashing Functions

Name Usage Comments
Logistic Function logistic(x) This is a common sigmoid squashing function. Returns 1/(1+ exp(-x))
Step Function step(x) Returns 1 if x is positive, zero otherwise
Sign Function sgn(x) Returns -1 if x is negative, +1 if x is positive, and 0 if x is zero
Gaussian Function gauss(x) This is a bell-shaped squashing function. Returns exp(-x^2)
Hyperbolic Tangent tanh(x) This is a common squashing function. Returns a value between -1 and +1
Error Function erf(x) Integral of the normal distribution. Returns a value between -1 and +1
Error Function Complement erfc(x) Returns 1.0 - erf(x)
return to top ⇑

Boolean

Name Usage Comments
equal to equal(x,y) Returns 1 if x equals y numerically, 0 otherwise
less than less(x,y) Returns 1 if x < y, 0 otherwise
less than or equal to less_or_equal(x,y) Returns 1 if x <= y, 0 otherwise
greater than greater(x,y) Returns 1 if x > y, 0 otherwise
greater than or equal to greater_or_equal(x,y) Returns 1 if x >= y, 0 otherwise
if-then-else if(x,y,z) Returns y if x is greater than 0, z otherwise
logical and and(x,y) Returns 1 if both x and y are greater than 0, 0 otherwise
logical or or(x,y) Returns 1 if either x or y are greater than 0, 0 otherwise
logical xor xor(x,y) Returns 1 if (x <= 0 and y > 0) or (x > 0 and y <= 0), 0 otherwise
logical not not(x) Returns 0 if x is greater than 0, 1 otherwise
return to top ⇑

Other

Name Usage Comments
Minimum min(x,y) Returns the minimum (signed) result of x and y for the data point
Maximum max(x,y) Returns the maximum (signed) result of x and y for the data point
Modulo mod(x,y) Returns the remainder of x/y
Floor floor(x) Returns an integer of x rounded down toward -infinity
Ceiling ceil(x) Returns an integer of x rounded up toward +infinite
Round round(x) Returns an integer of x rounded to the nearest integer
Absolute value abs(x) Returns the positive value of x
return to top ⇑

Inverse Trigonometric

Name Usage Comments
Arcsine asin(x) The inverse of the sine function
Arccosine acos(x) The inverse of the cosine function
Arctangent atan(x) The inverse of the tangent function
Two-argument Arctangent atan2(y,x) The inverse of the tangent function
return to top ⇑

Advanced

These advanced building blocks cannot be selected for Eureqa to introduce automatically but may be manually entered in the target expression.

Name Usage Comments
require require(x) Returns 0 if x > 0 and NaN otherwise
contains contains(x,y) Returns 1 if x contains the sub-expression y and 0 otherwise
return to top ⇑