org.encog.neural.networks.training.pnn
public class GlobalMinimumSearch extends Object
Modifier and Type | Field and Description |
---|---|
static double |
CGOLD
The golden section.
|
Constructor and Description |
---|
GlobalMinimumSearch() |
Modifier and Type | Method and Description |
---|---|
double |
brentmin(int maxIterations,
double maxError,
double eps,
double tol,
CalculationCriteria network,
double y)
Use the "Brent Method" to find a better minimum.
|
void |
findBestRange(double low,
double high,
int numberOfPoints,
boolean useLog,
double minError,
CalculationCriteria network)
Find the best common gamma.
|
double |
getX1() |
double |
getX2() |
double |
getX3() |
double |
getY1() |
double |
getY2() |
double |
getY3() |
void |
setX1(double x1) |
void |
setX2(double x2) |
void |
setX3(double x3) |
void |
setY1(double y1) |
void |
setY2(double y2) |
void |
setY3(double y3) |
public static final double CGOLD
public double brentmin(int maxIterations, double maxError, double eps, double tol, CalculationCriteria network, double y)
maxIterations
- THe maximum number of iterations.maxError
- We can stop if we reach this error.eps
- The approximate machine precision.tol
- Brent's tolerance, must be >= sqrt( eps )network
- The network to obtain the error from.y
- The error at x2.public void findBestRange(double low, double high, int numberOfPoints, boolean useLog, double minError, CalculationCriteria network)
low
- The low gamma to begin the search with.high
- The high gamma to end the search with.numberOfPoints
- The number of points between the low and high. Set this value
to negative to prevent the first point from being calculated.
If you do set this to negative, set x2 and y2 to the correct
values.useLog
- Should we progress "logarithmically" from low to high.minError
- We are done if the error is below this.network
- The network to evaluate.public double getX1()
public double getX2()
public double getX3()
public double getY1()
public double getY2()
public double getY3()
public void setX1(double x1)
x1
- Set X1, which is a gamma to the left(lower) of the
best(middle) gamma.public void setX2(double x2)
x2
- Set X2, which is the middle(best) gamma.public void setX3(double x3)
x3
- Set X3, which is a gamma to the right(higher) of the
middle(best) gamma.public void setY1(double y1)
y1
- Set Y1, which is the value y1 is the error for x1.public void setY2(double y2)
y2
- Set Y2, which is the value y2 is the error for x2. This is the
best(middle) error.public void setY3(double y3)
y3
- Set Y3, which is the value y3 is the error for x3.Copyright © 2014. All Rights Reserved.