Changeset 7306:edfa72151fb1 in orange


Ignore:
Timestamp:
02/03/11 11:51:26 (3 years ago)
Author:
jzbontar <jure.zbontar@…>
Branch:
default
Convert:
3746ac6d54359e357cefcd9fb2d9a30767f19b6f
Message:

corrections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/classification/svm/__init__.py

    r7294 r7306  
    1212 
    1313.. note:: On some data-sets SVM can perform very badly. It is a known fact that 
    14           SVM's can be very sensitive to the proper choice of the parameters. 
    15           If you are having problems with learner's accuracy try scaling the 
     14          SVM can be very sensitive to the proper choice of the parameters. 
     15          If you are having problems with the learner's accuracy try scaling the 
    1616          data and using different parameters or choose an easier approach 
    17           and use the `SVMLearnerEasy` class which does this automatically 
    18           (it is similar to the easy.py script in the LibSVM distribution). 
     17          and use the :obj:`SVMLearnerEasy` class which does this automatically 
     18          (it is similar to the `svm-easy.py`_ script in the LibSVM distribution). 
    1919 
    2020.. autoclass:: Orange.classification.svm.SVMLearner 
     
    154154     
    155155class SVMLearner(_SVMLearner): 
     156    """:param svm_type: defines the type of SVM (can be C_SVC, Nu_SVC (default), OneClass, Epsilon_SVR, Nu_SVR) 
     157    :type svm_type: SVMLearner.SVMType 
     158    :param kernel_type: defines the type of a kernel to use for learning 
     159        (can be kernels.RBF (default), kernels.Linear, kernels.Polynomial,  
     160        kernels.Sigmoid, kernels.Custom) 
     161    :type kernel_type: classification.kernels.Kernel 
     162    :param degree: kernel parameter (for Polynomial) (default 3) 
     163    :type degree: int 
     164    :param gamma: kernel parameter (Polynomial/RBF/Sigmoid) 
     165        (default 1/number_of_examples) 
     166    :type gamma: float 
     167    :param coef0: kernel parameter (Polynomial/Sigmoid) (default 0) 
     168    :type coef0: int 
     169    :param kernelFunc: function that will be called if `kernel_type` is 
     170        `Custom`. It must accept two `data.Instance` arguments and 
     171        return a float (the distance between the examples). 
     172    :type kernelFunc: callable function 
     173    :param C: C parameter for C_SVC, Epsilon_SVR, Nu_SVR 
     174    :type C: float 
     175    :param nu: Nu parameter for Nu_SVC, Nu_SVR and OneClass (default 0.5) 
     176    :type nu: float 
     177    :param p: epsilon in loss-function for Epsilon_SVR 
     178    :type p: float 
     179    :param cache_size: cache memory size in MB (default 100) 
     180    :type cache_size: int 
     181    :param eps: tolerance of termination criterion (default 0.001) 
     182    :type eps: float 
     183    :param probability: determines if a probability model should be build 
     184        (default False) 
     185    :type probability: bool 
     186    :param shrinking: determines whether to use shrinking heuristics  
     187        (default True) 
     188    :type shrinking: bool 
     189    :param weights: a list of class weights 
     190    :type weights: list 
     191     
     192    """ 
    156193    __new__ = _orange__new__(_SVMLearner) 
    157194     
     
    167204                 cache_size=200, eps=0.001, normalization=True, 
    168205                 weight=[], **kwargs): 
    169         """:param svm_type: defines the type of SVM (can be C_SVC,  
    170             Nu_SVC (default), OneClass, Epsilon_SVR, Nu_SVR) 
    171         :type svm_type: SVMLearner.SVMType 
    172         :param kernel_type: defines the type of a kernel to use for learning 
    173             (can be kernels.RBF (default), kernels.Linear, kernels.Polynomial,  
    174             kernels.Sigmoid, kernels.Custom) 
    175         :type kernel_type: classification.kernels.Kernel 
    176         :param degree: kernel parameter (for Polynomial) (default 3) 
    177         :type degree: int 
    178         :param gamma: kernel parameter (Polynomial/RBF/Sigmoid) 
    179             (default 1/number_of_examples) 
    180         :type gamma: float 
    181         :param coef0: kernel parameter (Polynomial/Sigmoid) (default 0) 
    182         :type coef0: int 
    183         :param kernelFunc: function that will be called if `kernel_type` is 
    184             `Custom`. It must accept two `data.Instance` arguments and 
    185             return a float (the distance between the examples). 
    186         :type kernelFunc: callable function 
    187         :param C: C parameter for C_SVC, Epsilon_SVR, Nu_SVR 
    188         :type C: float 
    189         :param nu: Nu parameter for Nu_SVC, Nu_SVR and OneClass (default 0.5) 
    190         :type nu: float 
    191         :param p: epsilon in loss-function for Epsilon_SVR 
    192         :type p: float 
    193         :param cache_size: cache memory size in MB (default 100) 
    194         :type cache_size: int 
    195         :param eps: tolerance of termination criterion (default 0.001) 
    196         :type eps: float 
    197         :param probability: determines if a probability model should be build 
    198             (default False) 
    199         :type probability: bool 
    200         :param shrinking: determines whether to use shrinking heuristics  
    201             (default True) 
    202         :type shrinking: bool 
    203         :param weights: a list of class weights 
    204         :type weights: list 
    205          
    206         """ 
    207206        self.svm_type = SVMLearner.Nu_SVC 
    208207        self.kernel_type = kernel_type 
Note: See TracChangeset for help on using the changeset viewer.