org.encog.neural.prune
public class PruneIncremental extends ConcurrentJob
Constructor and Description |
---|
PruneIncremental(MLDataSet training,
NeuralNetworkPattern pattern,
int iterations,
int weightTries,
int numTopResults,
StatusReportable report)
Construct an object to determine the optimal number of hidden layers and
neurons for the specified training data and pattern.
|
Modifier and Type | Method and Description |
---|---|
void |
addHiddenLayer(int min,
int max)
Add a hidden layer's min and max.
|
BasicNetwork |
getBestNetwork() |
List<HiddenLayerParams> |
getHidden() |
int |
getHidden1Size() |
int |
getHidden2Size() |
double |
getHigh() |
int |
getIterations() |
double |
getLow() |
NeuralNetworkPattern |
getPattern() |
double[][] |
getResults() |
double[] |
getTopErrors() |
BasicNetwork[] |
getTopNetworks() |
MLDataSet |
getTraining() |
void |
init()
Init for prune.
|
int |
loadWorkload()
Get the next workload.
|
static String |
networkToString(BasicNetwork network)
Format the network as a human readable string that lists the hidden
layers.
|
void |
performJobUnit(JobUnitContext context)
Perform an individual job unit, which is a single network to train and
evaluate.
|
void |
process()
Begin the prune process.
|
Object |
requestNextTask()
Request the next task.
|
getShouldStop, getThreadCount, isRunning, processBackground, reportStatus, run, setReport, setThreadCount, stop
public PruneIncremental(MLDataSet training, NeuralNetworkPattern pattern, int iterations, int weightTries, int numTopResults, StatusReportable report)
training
- The training data to use.pattern
- The network pattern to use to solve this data.iterations
- How many iterations to try per network.weightTries
- The number of random weights to use.numTopResults
- The number of "top networks" to choose the most simple "best
network" from.report
- Object used to report status to.public static String networkToString(BasicNetwork network)
network
- The network to format.public void addHiddenLayer(int min, int max)
min
- The minimum number of neurons for this layer.max
- The maximum number of neurons for this layer.public BasicNetwork getBestNetwork()
public List<HiddenLayerParams> getHidden()
public int getHidden1Size()
public int getHidden2Size()
public double getHigh()
public int getIterations()
public double getLow()
public NeuralNetworkPattern getPattern()
public double[][] getResults()
public double[] getTopErrors()
public BasicNetwork[] getTopNetworks()
public MLDataSet getTraining()
public void init()
public int loadWorkload()
loadWorkload
in class ConcurrentJob
public void performJobUnit(JobUnitContext context)
performJobUnit
in class ConcurrentJob
context
- Contains information about the job unit.public void process()
process
in class ConcurrentJob
public Object requestNextTask()
requestNextTask
in class ConcurrentJob
Copyright © 2014. All Rights Reserved.