<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<appendix xml:id="fann.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 &reftitle.constants;
 &extension.constants;
 <para>
  <variablelist xml:id="constants.fann-train">
   <title>Training algorithms</title>
   <varlistentry xml:id="constant.fann-train-incremental">
    <term>
     <constant>FANN_TRAIN_INCREMENTAL</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <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.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-train-batch">
    <term>
     <constant>FANN_TRAIN_BATCH</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <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 a 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 a better
      solutions with this algorithm.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-train-rprop">
    <term>
     <constant>FANN_TRAIN_RPROP</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      A more advanced batch training algorithm which achieves good results for many problems. The RPROP
      training algorithm is adaptive, and does therefore 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 an variety
      of the standard RPROP training algorithm.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-train-quickprop">
    <term>
     <constant>FANN_TRAIN_QUICKPROP</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <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 in how the quickprop
      training algorithm works. The quickprop training algorithm is described by [Fahlman, 1988].
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-train-sarprop">
    <term>
     <constant>FANN_TRAIN_SARPROP</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Even more advance training algorithm. Only for version 2.2
     </simpara>
    </listitem>
   </varlistentry>
  </variablelist>
  <variablelist xml:id="constants.fann-activation-funcs">
   <title>Activation functions</title>
   <varlistentry xml:id="constant.fann-linear">
    <term>
     <constant>FANN_LINEAR</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Linear activation function.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-threshold">
    <term>
     <constant>FANN_THRESHOLD</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Threshold activation function.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-threshold-symmetric">
    <term>
     <constant>FANN_THRESHOLD_SYMMETRIC</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Threshold activation function.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-sigmoid">
    <term>
     <constant>FANN_SIGMOID</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Sigmoid activation function.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-sigmoid-stepwise">
    <term>
     <constant>FANN_SIGMOID_STEPWISE</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Stepwise linear approximation to sigmoid.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-sigmoid-symmetric">
    <term>
     <constant>FANN_SIGMOID_SYMMETRIC</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Symmetric sigmoid activation function, aka. tanh.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-sigmoid-symmetric-stepwise">
    <term>
     <constant>FANN_SIGMOID_SYMMETRIC_STEPWISE</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Stepwise linear approximation to symmetric sigmoid
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-gaussian">
    <term>
     <constant>FANN_GAUSSIAN</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Gaussian activation function.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-gaussian-symmetric">
    <term>
     <constant>FANN_GAUSSIAN_SYMMETRIC</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Symmetric gaussian activation function.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-gaussian-stepwise">
    <term>
     <constant>FANN_GAUSSIAN_STEPWISE</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Stepwise gaussian activation function.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-elliot">
    <term>
     <constant>FANN_ELLIOT</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Fast (sigmoid like) activation function defined by David Elliott.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-elliot-symmetric">
    <term>
     <constant>FANN_ELLIOT_SYMMETRIC</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Fast (symmetric sigmoid like) activation function defined by David Elliott.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-linear-piece">
    <term>
     <constant>FANN_LINEAR_PIECE</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Bounded linear activation function.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-linear-piece-symmetric">
    <term>
     <constant>FANN_LINEAR_PIECE_SYMMETRIC</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Bounded linear activation function.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-sin-symmetric">
    <term>
     <constant>FANN_SIN_SYMMETRIC</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Periodical sinus activation function.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-cos-symmetric">
    <term>
     <constant>FANN_COS_SYMMETRIC</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Periodical cosinus activation function.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-sin">
    <term>
     <constant>FANN_SIN</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Periodical sinus activation function.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-cos">
    <term>
     <constant>FANN_COS</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Periodical cosinus activation function.
     </simpara>
    </listitem>
   </varlistentry>
  </variablelist>
  <variablelist xml:id="constants.fann-errorfunc">
   <title>Error function used during training</title>
   <varlistentry xml:id="constant.fann-errorfunc-linear">
    <term>
     <constant>FANN_ERRORFUNC_LINEAR</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Standard linear error function.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-errorfunc-tanh">
    <term>
     <constant>FANN_ERRORFUNC_TANH</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <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, while not targeting outputs that only differ slightly.
      Not recommended for cascade or incremental training.
     </simpara>
    </listitem>
   </varlistentry>
  </variablelist>
  <variablelist xml:id="constants.fann-stopfunc">
   <title>Stop criteria used during training</title>
   <varlistentry xml:id="constant.fann-stopfunc-mse">
    <term>
     <constant>FANN_STOPFUNC_MSE</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Stop criteria is Mean Square Error (MSE) value.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-stopfunc-bit">
    <term>
     <constant>FANN_STOPFUNC_BIT</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Stop criteria is number of bits that fail.  The number of bits means the number of output neurons
      which differs 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.
     </simpara>
    </listitem>
   </varlistentry>
  </variablelist>
  <variablelist xml:id="constants.fann-nettype">
   <title>Definition of network types used by <function>fann_get_network_type</function></title>
   <varlistentry xml:id="constant.fann-nettype-layer">
    <term>
     <constant>FANN_NETTYPE_LAYER</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Each layer only has connections to the next layer.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-nettype-shortcut">
    <term>
     <constant>FANN_NETTYPE_SHORTCUT</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Each layer has connections to all following layers
     </simpara>
    </listitem>
   </varlistentry>
   </variablelist>
  <variablelist xml:id="constants.fann-e">
   <title>Errors</title>
   <varlistentry xml:id="constant.fann-e-no-error">
    <term>
     <constant>FANN_E_NO_ERROR</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      No error.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-e-cant-open-config-r">
    <term>
     <constant>FANN_E_CANT_OPEN_CONFIG_R</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Unable to open configuration file for reading.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-e-cant-open-config-w">
    <term>
     <constant>FANN_E_CANT_OPEN_CONFIG_W</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Unable to open configuration file for writing.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-e-wrong-config-version">
    <term>
     <constant>FANN_E_WRONG_CONFIG_VERSION</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Wrong version of configuration file.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-e-cant-read-config">
    <term>
     <constant>FANN_E_CANT_READ_CONFIG</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Error reading info from configuration file.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-e-cant-read-neuron">
    <term>
     <constant>FANN_E_CANT_READ_NEURON</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Error reading neuron info from configuration file.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-e-cant-read-connections">
    <term>
     <constant>FANN_E_CANT_READ_CONNECTIONS</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Error reading connections from configuration file.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-e-wrong-num-connections">
    <term>
     <constant>FANN_E_WRONG_NUM_CONNECTIONS</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Number of connections not equal to the number expected.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-e-cant-open-td-w">
    <term>
     <constant>FANN_E_CANT_OPEN_TD_W</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Unable to open train data file for writing.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-e-cant-open-td-r">
    <term>
     <constant>FANN_E_CANT_OPEN_TD_R</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Unable to open train data file for reading.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-e-cant-read-td">
    <term>
     <constant>FANN_E_CANT_READ_TD</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Error reading training data from file.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-e-cant-allocate-mem">
    <term>
     <constant>FANN_E_CANT_ALLOCATE_MEM</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Unable to allocate memory.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-e-cant-train-activation">
    <term>
     <constant>FANN_E_CANT_TRAIN_ACTIVATION</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Unable to train with the selected activation function.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-e-cant-use-activation">
    <term>
     <constant>FANN_E_CANT_USE_ACTIVATION</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Unable to use the selected activation function.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-e-train-data-mismatch">
    <term>
     <constant>FANN_E_TRAIN_DATA_MISMATCH</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Irreconcilable differences between two struct fann_train_data structures.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-e-cant-use-train-alg">
    <term>
     <constant>FANN_E_CANT_USE_TRAIN_ALG</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Unable to use the selected training algorithm.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-e-train-data-subset">
    <term>
     <constant>FANN_E_TRAIN_DATA_SUBSET</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Trying to take subset which is not within the training set.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-e-index-out-of-bound">
    <term>
     <constant>FANN_E_INDEX_OUT_OF_BOUND</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Index is out of bound.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-e-scale-not-present">
    <term>
     <constant>FANN_E_SCALE_NOT_PRESENT</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      Scaling parameters not present.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-e-input-no-match">
    <term>
     <constant>FANN_E_INPUT_NO_MATCH</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      The number of input neurons in the ann and data do not match
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="constant.fann-e-output-no-match">
    <term>
     <constant>FANN_E_OUTPUT_NO_MATCH</constant>
     (<type>int</type>)
    </term>
    <listitem>
     <simpara>
      The number of output neurons in the ann and data do not match.
     </simpara>
    </listitem>
   </varlistentry>
  </variablelist>
 </para>
</appendix>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
