<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.fann.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.fann-init-weights.php',
    1 => 'fann_init_weights',
    2 => 'Initialize the weights using Widrow + Nguyen&rsquo;s algorithm',
  ),
  'up' => 
  array (
    0 => 'ref.fann.php',
    1 => 'Fann Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.fann-get-training-algorithm.php',
    1 => 'fann_get_training_algorithm',
  ),
  'next' => 
  array (
    0 => 'function.fann-length-train-data.php',
    1 => 'fann_length_train_data',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/fann/functions/fann-init-weights.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.fann-init-weights" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">fann_init_weights</h1>
  <p class="verinfo">(PECL fann &gt;= 1.0.0)</p><p class="refpurpose"><span class="refname">fann_init_weights</span> &mdash; <span class="dc-title">Initialize the weights using Widrow + Nguyen’s algorithm</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.fann-init-weights-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>fann_init_weights</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$ann</code></span>, <span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$train_data</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Initialize the weights using Widrow + Nguyen’s algorithm.
  </p>
  <p class="para">
   This function behaves similarly to <span class="function"><a href="function.fann-randomize-weights.php" class="function">fann_randomize_weights()</a></span>. It will use the algorithm developed by
   Derrick Nguyen and Bernard Widrow to set the weights in such a way as to speed up training. This technique is not always
   successful, and in some cases can be less efficient than a purely random initialization.
  </p>
  <p class="para">
   The algorithm requires access to the range of the input data (for example largest and smallest input), and therefore
   accepts a second argument, data, which is the training data that will be used to train the network.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.fann-init-weights-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <dl>
   
    <dt><code class="parameter">ann</code></dt>
    <dd>
     <p class="para">Neural network <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>.</p>
    </dd>
   
   
    <dt><code class="parameter">train_data</code></dt>
    <dd>
     <p class="para">Neural network training data <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>.</p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.fann-init-weights-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">Returns <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> on success, or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> otherwise.</p>
 </div>


  <div class="refsect1 seealso" id="refsect1-function.fann-init-weights-seealso">
  <h3 class="title">Vedere anche:</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.fann-randomize-weights.php" class="function" rel="rdfs-seeAlso">fann_randomize_weights()</a> - Give each connection a random weight between min_weight and max_weight</span></li>
    <li><span class="function"><a href="function.fann-read-train-from-file.php" class="function" rel="rdfs-seeAlso">fann_read_train_from_file()</a> - Reads a file that stores training data</span></li>
   </ul>
  </p>
 </div>



</div><?php manual_footer($setup); ?>