<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.svm.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'tr',
  ),
  'this' => 
  array (
    0 => 'svm.train.php',
    1 => 'SVM::train',
    2 => 'Create a SVMModel based on training data',
  ),
  'up' => 
  array (
    0 => 'class.svm.php',
    1 => 'SVM',
  ),
  'prev' => 
  array (
    0 => 'svm.setoptions.php',
    1 => 'SVM::setOptions',
  ),
  'next' => 
  array (
    0 => 'class.svmmodel.php',
    1 => 'SVMModel',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/svm/svm/train.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="svm.train" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SVM::train</h1>
  <p class="verinfo">(PECL svm &gt;= 0.1.0)</p><p class="refpurpose"><span class="refname">SVM::train</span> &mdash; <span class="dc-title">Create a SVMModel based on training data</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-svm.train-description">
  <h3 class="title">Açıklama</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>svm::train</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.array.php" class="type array">array</a></span> <code class="parameter">$problem</code></span>, <span class="methodparam"><span class="type"><a href="language.types.array.php" class="type array">array</a></span> <code class="parameter">$weights</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="class.svmmodel.php" class="type SVMModel">SVMModel</a></span></div>

  <p class="simpara">
   Train a support vector machine based on the supplied training data.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-svm.train-parameters">
  <h3 class="title">Bağımsız Değişkenler</h3>
  <dl>
   
    <dt><code class="parameter">problem</code></dt>
    <dd>
     <span class="simpara">
      The problem can be provided in three different ways.
      An array, where the data should start with the class label
      (usually 1 or -1) then followed by a sparse data set of
      dimension =&gt; data pairs.
      A URL to a file containing a SVM Light formatted problem, with the
      each line being a new training example, the start of each line
      containing the class (1, -1) then a series of tab separated data
      values shows as key:value.
      A opened stream pointing to a data source formatted as in the file above.
     </span>
    </dd>
   
   
    <dt><code class="parameter">weights</code></dt>
    <dd>
     <span class="simpara">
      Weights are an optional set of weighting parameters for the different
      classes, to help account for unbalanced training sets. For example,
      if the classes were 1 and -1, and -1 had significantly more example
      than one, the weight for -1 could be 0.5. Weights should be in the range 0-1.
     </span>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-svm.train-returnvalues">
  <h3 class="title">Dönen Değerler</h3>
  <p class="simpara">
   Returns an SVMModel that can be used to classify previously unseen data.
   Throws SVMException on error
  </p>
 </div>


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