public class NeuralNetIndividualSpecies extends AbstractNeuralNetSpecies<NeuralNetIndividual>
Individuals that use a INeuralNet as genotype
biased, initialMaxNofneurons, initiator, initiatorNeuronTypes, maxNofneurons, minNofneurons, neuralNetType, neuronTypes, nOfHiddenLayers, nOfInputs, nOfOutputs, percentages, type, weightRanges
Constructor and Description |
---|
NeuralNetIndividualSpecies()
Empty constructor
|
Modifier and Type | Method and Description |
---|---|
void |
configure(Configuration configuration)
Configuration parameters for this species are:
input-layer.number-of-inputs (int)
Number of inputs.
|
INeuralNet |
createGenotype()
Creates the genotype of the individual
|
NeuralNetIndividual |
createIndividual()
Creates a new individual
|
NeuralNetIndividual |
createIndividual(INeuralNet genotype)
Creates a new individual
|
boolean |
equals(java.lang.Object other)
Compare two individuals
|
void |
setHiddenLayerBiased(int index,
boolean hiddenLayerBiased)
Sets a boolean indicating if a hidden layer is biased
|
void |
setHiddenLayerInitialNofneurons(int index,
int hiddenLayerInitialMaxNofneurons)
Sets initial maximum number of neurons of a hidden layer
|
void |
setHiddenLayerInitiator(int index,
java.lang.String hiddenLayerInitiator)
Sets initiator of neurons of a hidden layer
|
void |
setHiddenLayerMaxNofneurons(int index,
int hiddenLayerMaxNofneurons)
Sets maximum number of neurons of a hidden layer
|
void |
setHiddenLayerMinNofneurons(int index,
int hiddenLayerMinNofneurons)
Sets minimum number of neurons of a hidden layer
|
void |
setHiddenLayerType(int index,
java.lang.String hiddenLayerType)
Sets type of neurons of a hidden layer
|
void |
setHiddenLayerWeightRange(int index,
int indexRange,
Interval hiddenLayerWeightRange)
Sets weight range of a hidden layer
|
void |
setInitiatorNeuronTypes(int index,
java.lang.String[] initiatorNeuronTypes)
Sets an array of initiators of neurons of hibrid layers
|
void |
setNeuronTypes(int index,
java.lang.String[] neuronTypes)
Sets an array of neuron types of a concrete layer
(this is an hibrid layer)
|
void |
setNOfHiddenLayers(int nOfHiddenLayers)
Sets number of hidden layers of the neural nets
|
void |
setNOfInputs(int nOfInputs)
Sets number of inputs of the neural nets
|
void |
setNOfOutputs(int nOfOutputs)
Sets number of outputs of the neural nets
|
void |
setOutputLayerBiased(boolean outputLayerBiased)
Sets a boolean indicating if the output layer is biased
|
void |
setOutputLayerInitiator(java.lang.String outputLayerInitiator)
Sets initiator of neurons of the output layer
|
void |
setOutputLayerType(java.lang.String outputLayerType)
Sets type of neurons of the output layer
|
void |
setOutputLayerWeightRange(int indexRange,
Interval outputLayerWeightRange)
Sets weight range of the output layer
|
void |
setPercentages(int index,
double[] percentages)
Sets an array of percentages of a concrete layer
(this is an hibrid layer)
|
getHiddenLayerInitialMaxNofneurons, getHiddenLayerInitiator, getHiddenLayerMaxNofneurons, getHiddenLayerMinNofneurons, getHiddenLayerType, getHiddenLayerWeightRange, getInitiatorNeuronTypes, getNeuralNetType, getNeuronTypes, getNOfHiddenLayers, getNOfInputs, getNOfOutputs, getOutputLayerInitiator, getOutputLayerType, getOutputLayerWeightRange, getPercentages, isHiddenLayerBiased, isOutputLayerBiased
public void setNOfHiddenLayers(int nOfHiddenLayers)
Sets number of hidden layers of the neural nets
nOfHiddenLayers
- Number of hidden layers
public void setNOfInputs(int nOfInputs)
Sets number of inputs of the neural nets
nOfInputs
- Number of hidden layers
public void setNOfOutputs(int nOfOutputs)
Sets number of outputs of the neural nets
nOfOutputs
- Number of hidden layers
public void setHiddenLayerWeightRange(int index, int indexRange, Interval hiddenLayerWeightRange)
Sets weight range of a hidden layer
index
- Index of the desired hidden layerindexRange
- Index of the desired range into the layer (useful for hibrid layer)hiddenLayerWeightRange
- New weight range
public void setOutputLayerWeightRange(int indexRange, Interval outputLayerWeightRange)
Sets weight range of the output layer
indexRange
- Index of the desired range into the layer (useful for hibrid layer)outputLayerWeightRange
- New weight range
public void setHiddenLayerMaxNofneurons(int index, int hiddenLayerMaxNofneurons)
Sets maximum number of neurons of a hidden layer
index
- Index of the desired hidden layerhiddenLayerMaxNofneurons
- Maximum number of neurons
public void setHiddenLayerMinNofneurons(int index, int hiddenLayerMinNofneurons)
Sets minimum number of neurons of a hidden layer
index
- Index of the desired hidden layerhiddenLayerMinNofneurons
- Minimum number of neurons
public void setHiddenLayerInitialNofneurons(int index, int hiddenLayerInitialMaxNofneurons)
Sets initial maximum number of neurons of a hidden layer
index
- Index of the desired hidden layerhiddenLayerInitialMaxNofneurons
- Initial maximum number of neurons
public void setHiddenLayerType(int index, java.lang.String hiddenLayerType)
Sets type of neurons of a hidden layer
index
- Index of the desired hidden layerhiddenLayerType
- Type of neurons
public void setOutputLayerType(java.lang.String outputLayerType)
Sets type of neurons of the output layer
outputLayerType
- Type of neurons
public void setHiddenLayerInitiator(int index, java.lang.String hiddenLayerInitiator)
Sets initiator of neurons of a hidden layer
index
- Index of the desired hidden layerhiddenLayerInitiator
- Initiator of neurons
public void setOutputLayerInitiator(java.lang.String outputLayerInitiator)
Sets initiator of neurons of the output layer
outputLayerInitiator
- Initiator of neurons
public void setHiddenLayerBiased(int index, boolean hiddenLayerBiased)
Sets a boolean indicating if a hidden layer is biased
index
- Index of the desired hidden layerhiddenLayerBiased
- Is hidden layer biased?
public void setOutputLayerBiased(boolean outputLayerBiased)
Sets a boolean indicating if the output layer is biased
outputLayerBiased
- Is output layer biased?
public void setNeuronTypes(int index, java.lang.String[] neuronTypes)
Sets an array of neuron types of a concrete layer (this is an hibrid layer)
index
- Index of the desired hidden layerneuronTypes
- Array of neurons types
public void setPercentages(int index, double[] percentages)
Sets an array of percentages of a concrete layer (this is an hibrid layer)
index
- Index of the desired hidden layerpercentages
- Array of percentages
public void setInitiatorNeuronTypes(int index, java.lang.String[] initiatorNeuronTypes)
Sets an array of initiators of neurons of hibrid layers
index
- Index of the desired hidden layerinitiatorNeuronTypes
- Array of initiators of neurons
public NeuralNetIndividual createIndividual()
Creates a new individual
public NeuralNetIndividual createIndividual(INeuralNet genotype)
Creates a new individual
genotype
- Genotype of the individualpublic INeuralNet createGenotype()
Creates the genotype of the individual
public boolean equals(java.lang.Object other)
Compare two individuals
equals
in class java.lang.Object
other
- other individual to compare with.public void configure(Configuration configuration)
Configuration parameters for this species are: input-layer.number-of-inputs (int) Number of inputs. Number of inputs of this species neural nets. output-layer.number-of-outputs (int) Number of inputs. Number of outputs of this species neural nets. hidden-layer(i).weight-range (complex) Weigth range of the hidden layer number "i". output-layer.weight-range (complex) Weigth range of the outputlayer. hidden-layer(i).maximum-number-of-neurons (int) Maximum number of neurons of hidden layer number "i". hidden-layer(i).initial-number-of-neurons (int) Initial number of neurons of hidden layer number "i". hidden-layer(i)[@type] (string) Layer type of the hidden layer number "i". output-layer[@type] (string) Layer type of the output layer. hidden-layer(i)[@biased] (string) Boolean indicating if hidden layer number "i" is biased. output-layer[@type] (string) Boolean indicating if the output layer is biased.
configuration
- Configuration if the Individual