|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.n52.operation.fluxnet.FluxNetAlgorithm
public class FluxNetAlgorithm
Class for applying the neural network called "fluxnet" on a number of bands and getting the resulting values. It is to be applied for one pixel at a time.
First instantiate the class with the network file and the configuration file, which will initialize the network topology, and then call the "calculate" function repeatedly for every pixel. The network file is the result of the previous process ("training the network"), and contains knowledge about the number of input and output bands used, and the network topology. The configuration file must correspond to the network file, and contains the descriptions of the input and output bands, and also their scaling parameters.
Constructor Summary | |
---|---|
FluxNetAlgorithm(java.lang.String netFile,
java.lang.String configFile)
Constructor |
Method Summary | |
---|---|
double[] |
calculate(double[] params)
Uses the network to calculate the output for the given parameters |
Algorithm |
getAlgorithm(int index)
Get the names and descriptions of each output value. |
int |
getNrAlgorithms()
Returns the number of output values. |
int |
getNrParams()
Returns the number of parameters. |
java.lang.String |
getParamDescription(int paramNr)
Returns a Description of the parameter. |
java.lang.String |
getParamName(int paramNr)
Returns the Name of the parameter. |
static void |
main(java.lang.String[] args)
Start a sample form for trying-out FluxNetAlgorithm |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FluxNetAlgorithm(java.lang.String netFile, java.lang.String configFile)
netFile
- the network file that is the result of training the neural
networkconfigFile
- the configuration file that contains the parameters and their
scaling coefficients
The network file and the configuration file correspond to eachother (form a pair), as they both contain information about the number of input and output bands used. Besides, the scaling coefficients stored in the configuration file are also a result of the "training process", and can therefore only be used with the network file that was created during the same process.
Method Detail |
---|
public static void main(java.lang.String[] args)
args
- An array containing two Strings. The first String is the url
or filename of the network file that is the result of training
the neural network. The second String is the url or filename
of the configuration file that contains the parameters and
their scaling coefficients.public double[] calculate(double[] params)
calculate
in interface AlgorithmN
params
- the list of parameters, as specified in the configuration file
public int getNrParams()
getNrParams
in interface AlgorithmOnList
AlgorithmOnList
. This is taken from the configuration
file.public java.lang.String getParamName(int paramNr) throws java.lang.IndexOutOfBoundsException
getParamName
in interface AlgorithmOnList
paramNr
- the 0-based index of the parameter requested. Must be between
0 and getNrParams()-1
java.lang.IndexOutOfBoundsException
- when paramNr
is negative or larger or equal to {#getNrParams()}public java.lang.String getParamDescription(int paramNr) throws java.lang.IndexOutOfBoundsException
getParamDescription
in interface AlgorithmOnList
paramNr
- The 0-based index of the parameter requested. Must be between
0 and getNrParams()-1
java.lang.IndexOutOfBoundsException
- when paramNr
is negative or larger or equal to {#getNrParams()}public int getNrAlgorithms()
getNrAlgorithms
in interface AlgorithmOnList
AlgorithmOnList
. This is taken from the configuration
file.
[This function is still under development. Its name and "signature" may change in the future]
public Algorithm getAlgorithm(int index)
getAlgorithm
in interface AlgorithmOnList
Algorithm
that gives access to the name and
description of each output value of this AlgorithmOnList
.
This is taken from the configuration file. The calculate function
of the returned Algorithm
will work correctly, but for
performance reasons it is recommended to call the calculate of
FluxNetAlgorithm
that returns multiple results
simultaneously.
[This function is still under development. Its name and "signature" may change in the future]
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |