Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## FitnessEvaluation.externalInterpreters.SymbolicRegression
Class SymRegFunkBSF

    java.lang.Object
      FitnessEvaluation.externalInterpreters.SymbolicRegression.SymRegFunkBSF

    public abstract class SymRegFunkBSF

extends java.lang.Object

help class for SymbolicRegression.java

Author:
  jonatan

Constructor Summary
`SymRegFunkBSF()` Creates a new instance of SymRegFunkBSF

Method Summary
`double` | `cos(double x)` Trigonometric cosine function
`double` | `div(double n, double d)` Protected division.
`double` | `exp(double x)` Returns Euler's number e raised to the power of a double value.
`abstract double` | `expr(double X)` Expression to evaluate
`double` | `fun(double x)` Hardcoded quadratic target function
`double` | `getFitness()` Calculating the fitness as the sum of errors.
`double` | `inv(double x)` Method for inverting x.
`double` | `log(double x)` Natural logarithm
`double` | `pow(double x, double y)` Method for x to the power of y
`double` | `sin(double x)` Trigonometric sine function

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SymRegFunkBSF

    public SymRegFunkBSF()

  Creates a new instance of SymRegFunkBSF

Method Detail

### expr

    public abstract double expr(double X)

  Expression to evaluate

  Parameters:
    `X` - point
  Returns:
    value

### getFitness

    public double getFitness()

  Calculating the fitness as the sum of errors. Deterministically picks 20 points in [-1,1) Minimizing, 0 is best

  Returns:
    value as sum of errors

### fun

    public double fun(double x)

  Hardcoded quadratic target function

  Parameters:
    `x` - value
  Returns:
    target function value

### inv

    public double inv(double x)

  Method for inverting x. Returns 1 if x = 0

  Parameters:
    `x` - value to invert
  Returns:
    inverted value

### pow

    public double pow(double x,
                      double y)

  Method for x to the power of y

  Parameters:
    `x` - base
    `y` - exponent
  Returns:
    x^y

### div

    public double div(double n,
                      double d)

  Protected division. If d = 0. Return Double.MAX_VALUE. If n = 0 return 0

  Parameters:
    `n` - dividend
    `d` - divisor
  Returns:
    quotient

### sin

    public double sin(double x)

  Trigonometric sine function

  Parameters:
    `x` - angle in radians
  Returns:
    sine of argument

### cos

    public double cos(double x)

  Trigonometric cosine function

  Parameters:
    `x` - angle in radians
  Returns:
    cosine of argument

### exp

    public double exp(double x)

  Returns Euler's number e raised to the power of a double value.

  Parameters:
    `x` - exponent to raise e to
  Returns:
    e^a

### log

    public double log(double x)

  Natural logarithm

  Parameters:
    `x` - value to take the logarithm of
  Returns:
    log(x)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD