Changeset 3520:ca13afc4347e in orange


Ignore:
Timestamp:
04/11/07 10:13:40 (7 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
67211c39b8a63d25dce137004d87014f671e5b41
Message:

documentation for coef, rho, nSV ...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/doc/reference/SupportVectorMachines.htm

    r2653 r3520  
    2323 <li>radial basis function: exp(-gamma*|u-v|^2)</li> 
    2424 <li>sigmoid: tanh(gamma*u'*v + coef0)</li> 
    25  <li>custom kernel (any function that remotely resembles a distance measure between two examples that can be implemented in python)</li> 
     25 <li>custom kernel (any function that remotely resembles a distance measure between two examples that can be implemented in python; note that if the function is not )</li> 
    2626</ul> 
    2727</p> 
     
    5959<h2>SVMClassifier</h2> 
    6060<p>Classifier used for classification, regression or distribution estimation (ONE_CLASS). In the later case the return value of the __call__ function can be 1.0 (positive case) or -1.0(negative case).</p> 
     61<p>For a multiclass classification problem with k classes there are k*(k-1)/2 1class vs. 1class internal binary classifiers being build. The multiclass classification is then performed by a majority vote.</p> 
    6162<p class=section>Attributes</p> 
    6263<dl class=attributes> 
     
    6465  <dd>Holds the examples used for training</dd> 
    6566  <dt>supportVectors</dt> 
    66   <dd>Holds the support vectors</dd> 
     67  <dd>Holds the support vectors. They are listed in the order of their classes (i.e. they are grouped by the order of classes as they apear in the domains <code>classVar.values</code>) </dd> 
     68  <dt>nSV</dt> 
     69  <dd>Number of support vectors for each class (the same order as above)</dd> 
     70  <dt>rho</dt> 
     71  <dd>Constants in decision functions in the order of 1v2, 1v3, ... 1vsN, 2vs3, 2vs4, ...</dd> 
     72  <dt>coef</dt> 
     73  <dd>Coefficients for support vectors in decision functions (coef[nClass-1][nSupportVectors]). If k is the total number of classes then, for each support vector there are k-1 coefficients y*alpha where alpha are dual solution of the following two class problems: 1 vs j, 2 vs j, ..., j-1 vs j, j vs j+1, j vs j+2, ..., j vs k; and y=1 in first j-1 coefficients, y=-1 in the remaining k-j coefficients</dd> 
     74</dl> 
     75<p class=section>Methods</p> 
     76<dl class=attributes> 
     77  <dt>getDecisionValues(example)</dt> 
     78  <dd>Return the decision values of all nClass*(nClass-1)/2 internal binary classifiers in the order of 1v2, 1v3, ... 1vsN, 2vs3, 2vs4, ...</dd> 
    6779</dl> 
    6880</p> 
     
    7587>>> l.probability=True 
    7688>>> c=l(data) 
    77 training 
    78 * 
    79 ... 
    8089>>> for e in data: 
    8190...  print e[-1], c(e), c(e, c.GetProbabilities) 
Note: See TracChangeset for help on using the changeset viewer.