public class ParamAndGradientIterationListener extends java.lang.Object implements IterationListener
Constructor and Description |
---|
ParamAndGradientIterationListener()
Default constructor for output to console only every iteration, tab delimited
|
ParamAndGradientIterationListener(int iterations,
boolean printHeader,
boolean printMean,
boolean printMinMax,
boolean printMeanAbsValue,
boolean outputToConsole,
boolean outputToFile,
boolean outputToLogger,
java.io.File file,
java.lang.String delimiter)
Full constructor with all options.
|
Modifier and Type | Method and Description |
---|---|
void |
invoke()
Change invoke to true
|
boolean |
invoked()
Get if listener invoked
|
void |
iterationDone(Model model,
int iteration)
Event listener for each iteration
|
public ParamAndGradientIterationListener()
public ParamAndGradientIterationListener(int iterations, boolean printHeader, boolean printMean, boolean printMinMax, boolean printMeanAbsValue, boolean outputToConsole, boolean outputToFile, boolean outputToLogger, java.io.File file, java.lang.String delimiter)
iterations
- calculate and report values every 'iterations' iterationsprintHeader
- Whether to output a header row (i.e., names for each column)printMean
- Calculate and display the mean of parameters and gradientsprintMinMax
- Calculate and display the min/max of the parameters and gradientsprintMeanAbsValue
- Calculate and display the mean absolute valueoutputToConsole
- If true, display the values to the console (System.out.println())outputToFile
- If true, write the values to a file, one per lineoutputToLogger
- If true, log the valuesfile
- File to write values to. May be null, not used if outputToFile == falsedelimiter
- delimiter (for example, "\t" or "," etc)public boolean invoked()
IterationListener
invoked
in interface IterationListener
public void invoke()
IterationListener
invoke
in interface IterationListener
public void iterationDone(Model model, int iteration)
IterationListener
iterationDone
in interface IterationListener
model
- the model iteratingiteration
- the iteration