<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/book.fann.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'fann.constants.php',
    1 => 'Costanti predefinite',
    2 => 'Costanti predefinite',
  ),
  'up' => 
  array (
    0 => 'book.fann.php',
    1 => 'FANN',
  ),
  'prev' => 
  array (
    0 => 'fann.resources.php',
    1 => 'Tipi di risorse',
  ),
  'next' => 
  array (
    0 => 'fann.examples.php',
    1 => 'Esempi',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/fann/constants.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="fann.constants" class="appendix">
 <h1 class="title">Costanti predefinite</h1>

 <p class="simpara">
Queste costanti sono definite da questa estensione e 
sono disponibili solo se l&#039;estensione è stata compilata
nel PHP o se è stata caricata dinamicamente a runtime.
</p>
 <p class="para">
  <dl id="constants.fann-train">
   <strong class="title">Training algorithms</strong>
   
    <dt id="constant.fann-train-incremental">
     <strong><code><a href="fann.constants.php#constant.fann-train-incremental">FANN_TRAIN_INCREMENTAL</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Standard backpropagation algorithm, where the weights are updated after each training pattern.
      This means that the weights are updated many times during a single epoch. For this reason some problems,
      will train very fast with this algorithm, while other more advanced problems will not train very well.
     </span>
    </dd>
   
   
    <dt id="constant.fann-train-batch">
     <strong><code><a href="fann.constants.php#constant.fann-train-batch">FANN_TRAIN_BATCH</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Standard backpropagation algorithm, where the weights are updated after calculating the mean square error
      for the whole training set. This means that the weights are only updated once during an epoch.
      For this reason, some problems will train slower with this algorithm. But since the mean square
      error is calculated more correctly than in incremental training, some problems will reach better
      solutions with this algorithm.
     </span>
    </dd>
   
   
    <dt id="constant.fann-train-rprop">
     <strong><code><a href="fann.constants.php#constant.fann-train-rprop">FANN_TRAIN_RPROP</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      A more advanced batch training algorithm which achieves good results for many problems. The RPROP
      training algorithm is adaptive, and therefore does not use the learning_rate. Some other parameters
      can however be set to change the way the RPROP algorithm works, but it is only recommended
      for users with insight in how the RPROP training algorithm works. The RPROP training algorithm
      is described by [Riedmiller and Braun, 1993], but the actual learning algorithm used here is
      the iRPROP- training algorithm which is described by [Igel and Husken, 2000] which is a variety
      of the standard RPROP training algorithm.
     </span>
    </dd>
   
   
    <dt id="constant.fann-train-quickprop">
     <strong><code><a href="fann.constants.php#constant.fann-train-quickprop">FANN_TRAIN_QUICKPROP</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      A more advanced batch training algorithm which achieves good results for many problems.
      The quickprop training algorithm uses the learning_rate parameter along with other more advanced parameters,
      but it is only recommended to change these advanced parameters for users with insight into how the quickprop
      training algorithm works. The quickprop training algorithm is described by [Fahlman, 1988].
     </span>
    </dd>
   
   
    <dt id="constant.fann-train-sarprop">
     <strong><code><a href="fann.constants.php#constant.fann-train-sarprop">FANN_TRAIN_SARPROP</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Even more advance training algorithm. Only for version 2.2
     </span>
    </dd>
   
  </dl>
  <dl id="constants.fann-activation-funcs">
   <strong class="title">Activation functions</strong>
   
    <dt id="constant.fann-linear">
     <strong><code><a href="fann.constants.php#constant.fann-linear">FANN_LINEAR</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Linear activation function.
     </span>
    </dd>
   
   
    <dt id="constant.fann-threshold">
     <strong><code><a href="fann.constants.php#constant.fann-threshold">FANN_THRESHOLD</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Threshold activation function.
     </span>
    </dd>
   
   
    <dt id="constant.fann-threshold-symmetric">
     <strong><code><a href="fann.constants.php#constant.fann-threshold-symmetric">FANN_THRESHOLD_SYMMETRIC</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Threshold activation function.
     </span>
    </dd>
   
   
    <dt id="constant.fann-sigmoid">
     <strong><code><a href="fann.constants.php#constant.fann-sigmoid">FANN_SIGMOID</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Sigmoid activation function.
     </span>
    </dd>
   
   
    <dt id="constant.fann-sigmoid-stepwise">
     <strong><code><a href="fann.constants.php#constant.fann-sigmoid-stepwise">FANN_SIGMOID_STEPWISE</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Stepwise linear approximation to sigmoid.
     </span>
    </dd>
   
   
    <dt id="constant.fann-sigmoid-symmetric">
     <strong><code><a href="fann.constants.php#constant.fann-sigmoid-symmetric">FANN_SIGMOID_SYMMETRIC</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Symmetric sigmoid activation function, aka. tanh.
     </span>
    </dd>
   
   
    <dt id="constant.fann-sigmoid-symmetric-stepwise">
     <strong><code><a href="fann.constants.php#constant.fann-sigmoid-symmetric-stepwise">FANN_SIGMOID_SYMMETRIC_STEPWISE</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Stepwise linear approximation to symmetric sigmoid
     </span>
    </dd>
   
   
    <dt id="constant.fann-gaussian">
     <strong><code><a href="fann.constants.php#constant.fann-gaussian">FANN_GAUSSIAN</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Gaussian activation function.
     </span>
    </dd>
   
   
    <dt id="constant.fann-gaussian-symmetric">
     <strong><code><a href="fann.constants.php#constant.fann-gaussian-symmetric">FANN_GAUSSIAN_SYMMETRIC</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Symmetric Gaussian activation function.
     </span>
    </dd>
   
   
    <dt id="constant.fann-gaussian-stepwise">
     <strong><code><a href="fann.constants.php#constant.fann-gaussian-stepwise">FANN_GAUSSIAN_STEPWISE</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Stepwise Gaussian activation function.
     </span>
    </dd>
   
   
    <dt id="constant.fann-elliot">
     <strong><code><a href="fann.constants.php#constant.fann-elliot">FANN_ELLIOT</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Fast (sigmoid-like) activation function defined by David Elliott.
     </span>
    </dd>
   
   
    <dt id="constant.fann-elliot-symmetric">
     <strong><code><a href="fann.constants.php#constant.fann-elliot-symmetric">FANN_ELLIOT_SYMMETRIC</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Fast (symmetric sigmoid-like) activation function defined by David Elliott.
     </span>
    </dd>
   
   
    <dt id="constant.fann-linear-piece">
     <strong><code><a href="fann.constants.php#constant.fann-linear-piece">FANN_LINEAR_PIECE</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Bounded linear activation function.
     </span>
    </dd>
   
   
    <dt id="constant.fann-linear-piece-symmetric">
     <strong><code><a href="fann.constants.php#constant.fann-linear-piece-symmetric">FANN_LINEAR_PIECE_SYMMETRIC</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Bounded linear activation function.
     </span>
    </dd>
   
   
    <dt id="constant.fann-sin-symmetric">
     <strong><code><a href="fann.constants.php#constant.fann-sin-symmetric">FANN_SIN_SYMMETRIC</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Periodical sinus activation function.
     </span>
    </dd>
   
   
    <dt id="constant.fann-cos-symmetric">
     <strong><code><a href="fann.constants.php#constant.fann-cos-symmetric">FANN_COS_SYMMETRIC</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Periodical cosinus activation function.
     </span>
    </dd>
   
   
    <dt id="constant.fann-sin">
     <strong><code><a href="fann.constants.php#constant.fann-sin">FANN_SIN</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Periodical sinus activation function.
     </span>
    </dd>
   
   
    <dt id="constant.fann-cos">
     <strong><code><a href="fann.constants.php#constant.fann-cos">FANN_COS</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Periodical cosinus activation function.
     </span>
    </dd>
   
  </dl>
  <dl id="constants.fann-errorfunc">
   <strong class="title">Error function used during training</strong>
   
    <dt id="constant.fann-errorfunc-linear">
     <strong><code><a href="fann.constants.php#constant.fann-errorfunc-linear">FANN_ERRORFUNC_LINEAR</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Standard linear error function.
     </span>
    </dd>
   
   
    <dt id="constant.fann-errorfunc-tanh">
     <strong><code><a href="fann.constants.php#constant.fann-errorfunc-tanh">FANN_ERRORFUNC_TANH</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Tanh error function; usually better but may require a lower learning rate. This error function aggressively
      targets outputs that differ much from the desired output, while not targeting outputs that differ only slightly.
      Not recommended for cascade or incremental training.
     </span>
    </dd>
   
  </dl>
  <dl id="constants.fann-stopfunc">
   <strong class="title">Stop criteria used during training</strong>
   
    <dt id="constant.fann-stopfunc-mse">
     <strong><code><a href="fann.constants.php#constant.fann-stopfunc-mse">FANN_STOPFUNC_MSE</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Stop criteria is Mean Square Error (MSE) value.
     </span>
    </dd>
   
   
    <dt id="constant.fann-stopfunc-bit">
     <strong><code><a href="fann.constants.php#constant.fann-stopfunc-bit">FANN_STOPFUNC_BIT</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Stop criterion is number of bits that fail. The number of bits means the number of output neurons
      which differ more than the bit fail limit (see fann_get_bit_fail_limit, fann_set_bit_fail_limit). The bits are counted
      in all of the training data, so this number can be higher than the number of training data.
     </span>
    </dd>
   
  </dl>
  <dl id="constants.fann-nettype">
   <strong class="title">Definition of network types used by <span class="function"><a href="function.fann-get-network-type.php" class="function">fann_get_network_type()</a></span></strong>
   
    <dt id="constant.fann-nettype-layer">
     <strong><code><a href="fann.constants.php#constant.fann-nettype-layer">FANN_NETTYPE_LAYER</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Each layer only has connections to the next layer.
     </span>
    </dd>
   
   
    <dt id="constant.fann-nettype-shortcut">
     <strong><code><a href="fann.constants.php#constant.fann-nettype-shortcut">FANN_NETTYPE_SHORTCUT</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Each layer has connections to all following layers
     </span>
    </dd>
   
   </dl>
  <dl id="constants.fann-e">
   <strong class="title">Errors</strong>
   
    <dt id="constant.fann-e-no-error">
     <strong><code><a href="fann.constants.php#constant.fann-e-no-error">FANN_E_NO_ERROR</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      No error.
     </span>
    </dd>
   
   
    <dt id="constant.fann-e-cant-open-config-r">
     <strong><code><a href="fann.constants.php#constant.fann-e-cant-open-config-r">FANN_E_CANT_OPEN_CONFIG_R</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Unable to open configuration file for reading.
     </span>
    </dd>
   
   
    <dt id="constant.fann-e-cant-open-config-w">
     <strong><code><a href="fann.constants.php#constant.fann-e-cant-open-config-w">FANN_E_CANT_OPEN_CONFIG_W</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Unable to open configuration file for writing.
     </span>
    </dd>
   
   
    <dt id="constant.fann-e-wrong-config-version">
     <strong><code><a href="fann.constants.php#constant.fann-e-wrong-config-version">FANN_E_WRONG_CONFIG_VERSION</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Wrong version of configuration file.
     </span>
    </dd>
   
   
    <dt id="constant.fann-e-cant-read-config">
     <strong><code><a href="fann.constants.php#constant.fann-e-cant-read-config">FANN_E_CANT_READ_CONFIG</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Error reading info from configuration file.
     </span>
    </dd>
   
   
    <dt id="constant.fann-e-cant-read-neuron">
     <strong><code><a href="fann.constants.php#constant.fann-e-cant-read-neuron">FANN_E_CANT_READ_NEURON</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Error reading neuron info from configuration file.
     </span>
    </dd>
   
   
    <dt id="constant.fann-e-cant-read-connections">
     <strong><code><a href="fann.constants.php#constant.fann-e-cant-read-connections">FANN_E_CANT_READ_CONNECTIONS</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Error reading connections from configuration file.
     </span>
    </dd>
   
   
    <dt id="constant.fann-e-wrong-num-connections">
     <strong><code><a href="fann.constants.php#constant.fann-e-wrong-num-connections">FANN_E_WRONG_NUM_CONNECTIONS</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Number of connections not equal to the number expected.
     </span>
    </dd>
   
   
    <dt id="constant.fann-e-cant-open-td-w">
     <strong><code><a href="fann.constants.php#constant.fann-e-cant-open-td-w">FANN_E_CANT_OPEN_TD_W</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Unable to open train data file for writing.
     </span>
    </dd>
   
   
    <dt id="constant.fann-e-cant-open-td-r">
     <strong><code><a href="fann.constants.php#constant.fann-e-cant-open-td-r">FANN_E_CANT_OPEN_TD_R</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Unable to open train data file for reading.
     </span>
    </dd>
   
   
    <dt id="constant.fann-e-cant-read-td">
     <strong><code><a href="fann.constants.php#constant.fann-e-cant-read-td">FANN_E_CANT_READ_TD</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Error reading training data from file.
     </span>
    </dd>
   
   
    <dt id="constant.fann-e-cant-allocate-mem">
     <strong><code><a href="fann.constants.php#constant.fann-e-cant-allocate-mem">FANN_E_CANT_ALLOCATE_MEM</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Unable to allocate memory.
     </span>
    </dd>
   
   
    <dt id="constant.fann-e-cant-train-activation">
     <strong><code><a href="fann.constants.php#constant.fann-e-cant-train-activation">FANN_E_CANT_TRAIN_ACTIVATION</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Unable to train with the selected activation function.
     </span>
    </dd>
   
   
    <dt id="constant.fann-e-cant-use-activation">
     <strong><code><a href="fann.constants.php#constant.fann-e-cant-use-activation">FANN_E_CANT_USE_ACTIVATION</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Unable to use the selected activation function.
     </span>
    </dd>
   
   
    <dt id="constant.fann-e-train-data-mismatch">
     <strong><code><a href="fann.constants.php#constant.fann-e-train-data-mismatch">FANN_E_TRAIN_DATA_MISMATCH</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Irreconcilable differences between two struct fann_train_data structures.
     </span>
    </dd>
   
   
    <dt id="constant.fann-e-cant-use-train-alg">
     <strong><code><a href="fann.constants.php#constant.fann-e-cant-use-train-alg">FANN_E_CANT_USE_TRAIN_ALG</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Unable to use the selected training algorithm.
     </span>
    </dd>
   
   
    <dt id="constant.fann-e-train-data-subset">
     <strong><code><a href="fann.constants.php#constant.fann-e-train-data-subset">FANN_E_TRAIN_DATA_SUBSET</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Trying to take subset which is not within the training set.
     </span>
    </dd>
   
   
    <dt id="constant.fann-e-index-out-of-bound">
     <strong><code><a href="fann.constants.php#constant.fann-e-index-out-of-bound">FANN_E_INDEX_OUT_OF_BOUND</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Index is out of bound.
     </span>
    </dd>
   
   
    <dt id="constant.fann-e-scale-not-present">
     <strong><code><a href="fann.constants.php#constant.fann-e-scale-not-present">FANN_E_SCALE_NOT_PRESENT</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      Scaling parameters not present.
     </span>
    </dd>
   
   
    <dt id="constant.fann-e-input-no-match">
     <strong><code><a href="fann.constants.php#constant.fann-e-input-no-match">FANN_E_INPUT_NO_MATCH</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      The number of input neurons in the ann and data do not match
     </span>
    </dd>
   
   
    <dt id="constant.fann-e-output-no-match">
     <strong><code><a href="fann.constants.php#constant.fann-e-output-no-match">FANN_E_OUTPUT_NO_MATCH</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
    </dt>
    <dd>
     <span class="simpara">
      The number of output neurons in the ann and data do not match.
     </span>
    </dd>
   
  </dl>
 </p>
</div>
<?php manual_footer($setup); ?>