Changeset 11605:a35955141513 in orange


Ignore:
Timestamp:
07/01/13 12:28:13 (10 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Added some basic documentation for the LIBLINEAR based classifiers.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Orange/classification/logreg.py

    r11459 r11605  
    10271027 
    10281028class LibLinearLogRegLearner(Orange.core.LinearLearner): 
    1029     """A logistic regression learner from `LIBLINEAR`_. 
     1029    """ 
     1030    A logistic regression learner from `LIBLINEAR`_. 
    10301031 
    10311032    Supports L2 regularized learning. 
    10321033 
    10331034    .. _`LIBLINEAR`: http://www.csie.ntu.edu.tw/~cjlin/liblinear/ 
     1035 
     1036    .. note:: 
     1037        Unlike :class:`LogRegLearner` this one supports multi-class 
     1038        classification using one vs. rest strategy. 
    10341039 
    10351040    """ 
     
    10851090 
    10861091    def __call__(self, data, weight_id=None): 
     1092        """ 
     1093        Return a classifier trained on the `data` (`weight_id` is ignored). 
     1094 
     1095        :param Orange.data.Table data: 
     1096            Training data set. 
     1097        :param int weight_id: 
     1098            Ignored. 
     1099        :rval: Orange.core.LinearClassifier 
     1100 
     1101        .. note:: 
     1102            The :class:`Orange.core.LinearClassifier` is same class as 
     1103            :class:`Orange.classification.svm.LinearClassifier`. 
     1104 
     1105        """ 
    10871106        if not isinstance(data.domain.class_var, Orange.feature.Discrete): 
    10881107            raise TypeError("Can only learn a discrete class.") 
  • docs/reference/rst/Orange.classification.logreg.rst

    r10886 r11605  
    152152.. autofunction:: dump 
    153153 
     154 
    154155.. autoclass:: LibLinearLogRegLearner 
    155156   :members: 
     157   :member-order: bysource 
    156158 
    157159 
  • docs/reference/rst/Orange.classification.svm.rst

    r10696 r11605  
    6666subclasses. A down side is that they support only a linear kernel and 
    6767can not estimate probabilities. 
     68 
    6869    
    6970.. autoclass:: Orange.classification.svm.LinearSVMLearner 
    7071   :members: 
     72 
    7173    
    7274.. autoclass:: Orange.classification.svm.MultiClassSVMLearner 
    7375   :members: 
     76 
     77 
     78.. class:: LinearClassifier 
     79 
     80   The classifier returned by LIBLINEAR based learners. 
     81 
     82   .. attribute:: weights 
     83 
     84      A 2 dim table of computed feature weights of the classifier, 
     85      one for each one vs. rest underlying binary classifier (i.e. 
     86      ``classifier.weights[i]`` contains the i'th class vs. rest 
     87      binary classifier weights. If :attr:`bias` > 0 then the bias 
     88      weight term is appended as the last element of the weight 
     89      vector. 
     90 
     91   .. attribute:: bias 
     92 
     93      The bias parameter as passed to the learner. 
    7494    
    7595    
Note: See TracChangeset for help on using the changeset viewer.