package ANN
access public
since 2.0.6

 Methods

Unserializing \ANN\Values

__wakeup() 

After calling unserialize the train mode is set to false. Therefore it is possible to use a saved object of \ANN\Values to use inputs not for training purposes.

You would not use unserialize in your application but you can call loadFromFile() to load the saved object to your application.

Get internal saved input array

getInputsArray() : array

Actually there is no reason to call this method in your application. This method is used by \ANN\Network only.

used_by \ANN\Network::setValues()

Returns

array

Get internal saved output array

getOutputsArray() : array

Actually there is no reason to call this method in your application. This method is used by Network only.

used_by \ANN\Network::setValues()

Returns

array

Input values

input() : \ANN\Values

List all input values comma separated

$objValues = new \ANN\Values;

$objValues->train()
          ->input(0.12, 0.11, 0.15)
          ->output(0.56);
$objValues = new \ANN\Values;

$objValues->input(0.12, 0.11, 0.15)
          ->input(0.13, 0.12, 0.16)
          ->input(0.14, 0.13, 0.17);
uses \ANN\Exception::__construct()

Exceptions

\ANN\Exception

Returns

loadFromFile()

loadFromFile(string $strFilename) : \ANN\Network | \ANN\InputValue | \ANN\OutputValue | \ANN\Values | \ANN\StringValue | \ANN\Classification | \ANN\InterfaceLoadable
InheritedStatic
uses \ANN\Exception::__construct()
inherited_from \ANN\Filesystem::loadFromFile()

Parameters

$strFilename

string

(Default: null)

Exceptions

\ANN\Exception

Returns

Output values

output() : \ANN\Values

List all output values comma separated. Before you can call this method you have to call input(). After calling output() you cannot call the same method again. You have to call input() again first.

$objValues = new \ANN\Values;

$objValues->train()
          ->input(0.12, 0.11, 0.15)
          ->output(0.56);
uses \ANN\Exception::__construct()

Exceptions

\ANN\Exception

Returns

Reset saved input and output values

reset() : \ANN\Values

All internal saved input and output values will be deleted after calling reset(). If train() was called before, train state does not change by calling reset().

$objValues = new \ANN\Values;

$objValues->train()
          ->input(0.12, 0.11, 0.15)
          ->output(0.56)
          ->reset()
          ->input(0.12, 0.11, 0.15)
          ->output(0.56);

Returns

saveToFile()

saveToFile(string $strFilename) 
Inherited
uses \ANN\Exception::__construct()
inherited_from \ANN\Filesystem::saveToFile()

Parameters

$strFilename

string

(Default: null)

Exceptions

\ANN\Exception

train()

train() : \ANN\Values

Returns

 Properties

 

$arrInputs : array
 

$arrOutputs : array
 

$boolLastActionInput : boolean
 

$boolTrain : boolean
 

$intCountInputs : integer
 

$intCountOutputs : integer