Changeset 7269:774ec2cea938 in orange


Ignore:
Timestamp:
02/02/11 23:00:48 (3 years ago)
Author:
anze <anze.staric@…>
Branch:
default
Convert:
990c541dba9d92344e2b7fd273e9ca9389df9cf3
Message:

doc for result_type

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/classification/bayes.py

    r7252 r7269  
    228228            self.__dict__[k] = v 
    229229   
    230     def __call__(self, instance, *args, **kwdargs): 
     230    def __call__(self, instance, result_type=Orange.core.Classifier.GetValue, 
     231                 *args, **kwdargs): 
    231232        """Classify a new instance 
     233         
    232234        :param instance: instance to be classifier 
    233235        :type instance: :class:`Orange.data.Instance` 
    234         :rtype: :class:Orange.data.` 
     236        :param result_type: :class:`Orange.core.Classifier.GetValue` or \ 
     237              :class:`Orange.core.Classifier.GetProbabilities` or 
     238              :class:`Orange.core.Classifier.GetBoth` 
     239         
     240        :rtype: :class:`Orange.data.Value`,  
     241              :class:`Orange.statistics.Distribution` or a tuple with both 
    235242        """ 
    236243        self.nativeBayesClassifier(instance, *args, **kwdargs) 
     
    246253    def p(self, class_, instance): 
    247254        """Return probability of single class 
    248          
    249255        Probability is not normalized and can be different from probability 
    250256        returned from __call__ 
     257         
     258        :param class_: 
     259        :type class_: 
     260        :param instance: instance to be classified 
     261        :type instance: :class:`Orange.data.Instance` 
     262         
    251263        """ 
    252264        return self.nativeBayesClassifier.p(class_, instance) 
Note: See TracChangeset for help on using the changeset viewer.