package |
ANN |
access |
public |
Methods
__construct()
__construct(integer $intNumberOfHiddenLayers, integer $intNumberOfNeuronsPerLayer, integer $intNumberOfOutputs)
uses |
\ANN\Exception::__construct() |
uses |
\ANN\setMaxExecutionTime() |
uses |
\ANN\createHiddenLayers() |
uses |
\ANN\createOutputLayer() |
Parameters
$intNumberOfHiddenLayers
integer
(Default: 1)
$intNumberOfNeuronsPerLayer
integer
(Default: 6)
$intNumberOfOutputs
integer
(Default: 1)
Exceptions
__invoke()
__invoke(integer $intLevel)
Parameters
$intLevel
integer
(Default: 2)
__toString()
__toString() : string
uses |
\ANN\getPrintNetwork() |
Returns
string
__wakeup()
__wakeup()
uses |
\ANN\setMaxExecutionTime() |
getNetworkInfo()
getNetworkInfo() : array
uses |
\ANN\getCPULimit() |
uses |
\ANN\getMaxExecutionTime() |
uses |
\ANN\getNetworkError() |
uses |
\ANN\getNumberInputs() |
uses |
\ANN\getTrainedInputsPercentage() |
used_by |
\ANN\Controller\ControllerPrintNetwork::Content() |
used_by |
\ANN\Controller\ControllerPrintNetwork::getNeurons() |
Returns
array
getNumberHiddenLayers()
getNumberHiddenLayers() : integer
used_by |
\ANN\NetworkGraph::__construct() |
Returns
integer
getNumberHiddens()
getNumberHiddens() : integer
used_by |
\ANN\NetworkGraph::__construct() |
Returns
integer
getNumberOutputs()
getNumberOutputs() : integer
used_by |
\ANN\NetworkGraph::__construct() |
Returns
integer
Get the output values
getOutputs() : array
Get the output values to the related input values set by setValues(). This
method returns the output values as a two-dimensional array.
uses |
\ANN\activate() |
uses |
\ANN\getCountInputs() |
uses |
\ANN\Layer::getOutputs() |
uses |
\ANN\Layer::getThresholdOutputs() |
uses |
\ANN\setInputsToTrain() |
Returns
array
two-dimensional array
getTotalLoops()
getTotalLoops() : integer
loadFromFile()
loadFromFile(string $strFilename) : \ANN\Network
Static
uses |
\ANN\parent::loadFromFile() |
uses |
\ANN\getDefaultFilename() |
used_by |
\ANN\Server::loadFromHost() |
Parameters
$strFilename
string
(Default: null)
Exceptions
Returns
loadFromHost()
loadFromHost(string $strUsername, string $strPassword, string $strHost) : \ANN\Network
Static
Parameters
$strUsername
string
$strPassword
string
$strHost
string
Exceptions
Returns
Log network errors while training in CSV format
logNetworkErrorsToFile(string $strFilename)
uses |
\ANN\Logging::__construct() |
uses |
\ANN\Logging::setFilename() |
Parameters
$strFilename
string
Log weights while training in CSV format
logWeightsToFile(string $strFilename)
uses |
\ANN\Logging::__construct() |
uses |
\ANN\Logging::setFilename() |
Parameters
$strFilename
string
printNetwork()
printNetwork()
uses |
\ANN\Controller\ControllerPrintNetwork::__construct() |
saveToFile()
saveToFile(string $strFilename)
uses |
\ANN\parent::saveToFile() |
uses |
\ANN\getDefaultFilename() |
used_by |
\ANN\Server::saveToHost() |
used_by |
\ANN\Server::trainByHost() |
Parameters
$strFilename
string
(Default: null)
Exceptions
saveToHost()
saveToHost(string $strUsername, string $strPassword, string $strHost)
Parameters
$strUsername
string
$strPassword
string
$strHost
string
Exceptions
setMomentum()
setMomentum(float $floatMomentum)
uses |
\ANN\Exception::__construct() |
Parameters
$floatMomentum
float
(Default: 0.95) (0 .. 1)
Exceptions
Setting the percentage of output error in comparison to the desired output
setOutputErrorTolerance(float $floatOutputErrorTolerance)
Parameters
$floatOutputErrorTolerance
float
(Default: 0.02)
Set Values for training or using network
setValues(\ANN\Values $objValues)
Set Values of inputs and outputs for training or just inputs for using
already trained network.
$objNetwork = new \ANN\Network(2, 4, 1);
$objValues = new \ANN\Values;
$objValues->train()
->input(0.12, 0.11, 0.15)
->output(0.56);
$objNetwork->setValues($objValues);
uses |
\ANN\Values::getInputsArray() |
uses |
\ANN\Values::getOutputsArray() |
uses |
\ANN\setInputs() |
uses |
\ANN\setOutputs() |
since |
2.0.6 |
Parameters
train()
train() : boolean
uses |
\ANN\Exception::__construct() |
uses |
\ANN\setInputs() |
uses |
\ANN\setOutputs() |
uses |
\ANN\hasTimeLeftForTraining() |
uses |
\ANN\isTrainingComplete() |
uses |
\ANN\isTrainingCompleteByEpoch() |
uses |
\ANN\setInputsToTrain() |
uses |
\ANN\training() |
uses |
\ANN\isEpoch() |
uses |
\ANN\logWeights() |
uses |
\ANN\logNetworkErrors() |
uses |
\ANN\getNextIndexInputsToTrain() |
uses |
\ANN\isTrainingCompleteByInputKey() |
uses |
\ANN\setDynamicLearningRate() |
uses |
\ANN\detectOutputType() |
used_by |
\ANN\Server::trainByHost() |
Exceptions
Returns
boolean
trainByHost()
trainByHost(string $strUsername, string $strPassword, string $strHost) : \ANN\Network
Parameters
$strUsername
string
$strPassword
string
$strHost
string
Exceptions
Returns
activate()
activate()
uses |
\ANN\Layer::setInputs() |
uses |
\ANN\Layer::activate() |
uses |
\ANN\Layer::getOutputs() |
createHiddenLayers()
createHiddenLayers(integer $intNumberOfHiddenLayers, integer $intNumberOfNeuronsPerLayer)
uses |
\ANN\Layer::__construct() |
Parameters
$intNumberOfHiddenLayers
integer
$intNumberOfNeuronsPerLayer
integer
createOutputLayer()
createOutputLayer(integer $intNumberOfOutputs)
uses |
\ANN\Layer::__construct() |
Parameters
$intNumberOfOutputs
integer
detectOutputType()
detectOutputType()
uses |
\ANN\setOutputType() |
getCPULimit()
getCPULimit() : integer
getDefaultFilename()
getDefaultFilename() : string
Static
getMaxExecutionTime()
getMaxExecutionTime() : integer
getNetworkError()
getNetworkError() : float
hasTimeLeftForTraining()
hasTimeLeftForTraining() : boolean
isEpoch()
isEpoch() : boolean
isTrainingComplete()
isTrainingComplete() : boolean
isTrainingCompleteByEpoch()
isTrainingCompleteByEpoch() : boolean
logNetworkErrors()
logNetworkErrors()
uses |
\ANN\getNetworkError() |
uses |
\ANN\Logging::logData() |
logWeights()
logWeights()
uses |
\ANN\Layer::getNeurons() |
uses |
\ANN\Logging::logData() |
uses |
\ANN\Neuron::getWeights() |
uses |
\ANN\getNetworkError() |
Dynamic Learning Rate
setDynamicLearningRate(integer $intLoop)
Setting learning rate all 1000 loops dynamically
uses |
\ANN\setLearningRate() |
Parameters
$intLoop
integer
Setting the learning rate
setLearningRate(float $floatLearningRate)
uses |
\ANN\Exception::__construct() |
Parameters
$floatLearningRate
float
(Default: 0.7) (0.1 .. 0.9)
Exceptions
setMaxExecutionTime()
setMaxExecutionTime()
uses |
\ANN\getCPULimit() |
uses |
\ANN\getMaxExecutionTime() |
Exceptions
setOutputType()
setOutputType(integer $intType)
uses |
\ANN\Exception::__construct() |
Parameters
$intType
integer
(Default: Network::OUTPUT_LINEAR)
Exceptions
setOutputs()
setOutputs(array $arrOutputs)
uses |
\ANN\Exception::__construct() |
uses |
\ANN\Layer::getNeuronsCount() |
Parameters
$arrOutputs
array
Exceptions
training()
training(array $arrOutputs)
uses |
\ANN\activate() |
uses |
\ANN\Layer::calculateHiddenDeltas() |
uses |
\ANN\Layer::adjustWeights() |
uses |
\ANN\Layer::calculateOutputDeltas() |
uses |
\ANN\getNetworkError() |
Parameters
$arrOutputs
array
Properties
$boolFirstEpochOfTraining : boolean
$boolFirstLoopOfTraining : boolean
$floatLearningRate : float
$arrTrainingComplete : array
$boolLoggingNetworkErrors : boolean
$boolLoggingWeights : boolean
$boolNetworkActivated : boolean
$floatOutputErrorTolerance : float
$intMaxExecutionTime : integer
$intNumberEpoch : integer
$intNumberOfHiddenLayers : integer
$intNumberOfHiddenLayersDec : integer
$intNumberOfNeuronsPerLayer : integer
$intTotalActivations : integer
$intTotalActivationsRequests : integer
$intTotalTrainings : integer
$intTrainingTime : integer
Constants
Binary output type
OUTPUT_BINARY
Linear output type
OUTPUT_LINEAR