Ignore:
Timestamp:
02/06/12 09:44:17 (2 years ago)
Author:
anze <anze.staric@…>
Branch:
default
rebase_source:
b10cd20b8cbdf6275d7094dd3e776bb527e5f854
Message:

Added documentation for base Learner and Classifier.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/reference/rst/Orange.classification.rst

    r9642 r9666  
     1.. automodule:: Orange.classification 
     2 
    13################################### 
    24Classification (``classification``) 
    35################################### 
     6 
     7All classifiers in Orange consist of two parts, a Learner and a Classifier. A 
     8learner is constructed with all parameters that will be used for learning. 
     9When a data table is passed to its __call__ method, a model is fitted to the 
     10data and return in a form of a Classifier, which is then used for predicting 
     11the dependent variable(s) of new instances. 
     12 
     13.. class:: Learner() 
     14 
     15    Base class for all orange learners. 
     16 
     17    .. method:: __call__(instances) 
     18 
     19        Fit a model and return it as an instance of :class:`Classifier`. 
     20 
     21        This method is abstract and needs to be implemented on each learner. 
     22 
     23.. class:: Classifier() 
     24 
     25    Base class for all orange classifiers. 
     26 
     27    .. attribute:: GetValue 
     28 
     29        Return value of the target class when performing prediction. 
     30 
     31    .. attribute:: GetProbabilities 
     32 
     33        Return probability of each target class when performing prediction. 
     34 
     35    .. attribute:: GetBoth 
     36 
     37        Return a tuple of target class value and probabilities for each class. 
     38 
     39 
     40    .. method:: __call__(instances, return_type) 
     41 
     42        Classify a new instance using this model. 
     43 
     44        This method is abstract and needs to be implemented on each classifier. 
     45 
     46        :param instance: data instance to be classified. 
     47        :type instance: :class:`~Orange.data.Instance` 
     48 
     49        :param return_type: what needs to be predicted 
     50        :type return_type: :obj:`GetBoth`, 
     51                           :obj:`GetValue`, 
     52                           :obj:`GetProbabilities` 
     53 
     54        :rtype: :class:`~Orange.data.Value`, 
     55              :class:`~Orange.statistics.distribution.Distribution` or a 
     56              tuple with both 
     57 
     58Orange contains implementations of various classifiers that are described in 
     59detail on separate pages. 
    460 
    561.. toctree:: 
Note: See TracChangeset for help on using the changeset viewer.