Changeset 7241:2e9b571a1957 in orange


Ignore:
Timestamp:
02/02/11 21:12:23 (3 years ago)
Author:
miha <miha.stajdohar@…>
Branch:
default
Convert:
6c7b2f71efdd9d3b4f15ae5bb8e03ccb2625cd1b
Message:
 
Location:
orange/Orange/classification/svm
Files:
2 edited

Legend:

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

    r7231 r7241  
    2727   :members: 
    2828    
     29================= 
    2930Usefull functions 
    3031================= 
     
    3637.. automethod:: Orange.classification.svm.exampleTableToSVMFormat 
    3738 
    38  
     39=============== 
    3940Kernel Wrappers 
    40 --------------- 
     41=============== 
    4142 
    4243.. autoclass:: Orange.classification.svm.kernels.KernelWrapper 
     
    7172.. literalinclude:: code/svm-custom-kernel.py 
    7273 
    73  
     74=========================== 
    7475SVM derived feature weights 
    75 --------------------------- 
     76=========================== 
    7677 
    7778.. autoclass:: Orange.classification.svm.MeasureAttribute_SVMWeights 
    7879   :members: 
    7980 
    80  
     81======================================= 
    8182SVM based Recursive Feature Elimination 
    82 --------------------------------------- 
     83======================================= 
    8384 
    8485.. autoclass:: Orange.classification.svm.RFE 
     
    168169                 cache_size=200, eps=0.001, normalization=True, 
    169170                 weight=[], **kwargs): 
    170         """:param svm_type: Defines the type of SVM (can be C_SVC,  
     171        """:param svm_type: defines the type of SVM (can be C_SVC,  
    171172            Nu_SVC (default), OneClass, Epsilon_SVR, Nu_SVR) 
    172173        :type svm_type: SVMLearner.SVMType 
    173         :param kernel_type: Defines the type of a kernel to use for learning 
     174        :param kernel_type: defines the type of a kernel to use for learning 
    174175            (can be kernels.RBF (default), kernels.Linear, kernels.Polynomial,  
    175176            kernels.Sigmoid, kernels.Custom) 
    176177        :type kernel_type: classification.kernels.Kernel 
    177         :param degree: Kernel parameter (for Polynomial) (default 3) 
     178        :param degree: kernel parameter (for Polynomial) (default 3) 
    178179        :type degree: int 
    179         :param gamma: Kernel parameter (Polynomial/RBF/Sigmoid) 
     180        :param gamma: kernel parameter (Polynomial/RBF/Sigmoid) 
    180181            (default 1/number_of_examples) 
    181182        :type gamma: float 
    182         :param coef0: Kernel parameter (Polynomial/Sigmoid) (default 0) 
     183        :param coef0: kernel parameter (Polynomial/Sigmoid) (default 0) 
    183184        :type coef0: int 
    184         :param kernelFunc: Function that will be called if `kernel_type` is 
    185             `Custom`. It must accept two `data.Example` arguments and 
     185        :param kernelFunc: function that will be called if `kernel_type` is 
     186            `Custom`. It must accept two `data.Instance` arguments and 
    186187            return a float (the distance between the examples). 
    187188        :type kernelFunc: callable function 
     
    190191        :param nu: Nu parameter for Nu_SVC, Nu_SVR and OneClass (default 0.5) 
    191192        :type nu: float 
    192         :param p: Epsilon in loss-function for Epsilon_SVR 
     193        :param p: epsilon in loss-function for Epsilon_SVR 
    193194        :type p: float 
    194         :param cache_size: Cache memory size in MB (default 100) 
     195        :param cache_size: cache memory size in MB (default 100) 
    195196        :type cache_size: int 
    196         :param eps: Tolerance of termination criterion (default 0.001) 
     197        :param eps: tolerance of termination criterion (default 0.001) 
    197198        :type eps: float 
    198         :param probability: Determines if a probability model should be build 
     199        :param probability: determines if a probability model should be build 
    199200            (default False) 
    200201        :type probability: bool 
    201         :param shrinking: Determines whether to use shrinking heuristics  
     202        :param shrinking: determines whether to use shrinking heuristics  
    202203            (default True) 
    203204        :type shrinking: bool 
     
    283284        :param parameters: if not set defaults to ["nu", "C", "gamma"] 
    284285        :param folds: number of folds used for cross validation 
    285         :param verbose: 
     286        :param verbose: default False 
    286287        :param progressCallback: a callback function to report progress 
    287288             
     
    394395        transformer=Orange.core.DomainContinuizer() 
    395396        transformer.multinomialTreatment=Orange.core.DomainContinuizer.NValues 
    396         transformer.continuousTreatment=Orange.core.DomainContinuizer.NormalizeBySpan 
     397        transformer.continuousTreatment= \ 
     398            Orange.core.DomainContinuizer.NormalizeBySpan 
    397399        transformer.classTreatment=Orange.core.DomainContinuizer.Ignore 
    398400        newdomain=transformer(examples) 
     
    547549     
    548550    def __init__(self, learner=None, **kwargs): 
    549         """:param learner: Learner used for weight esstimation (default LinearLearner(solver_type=L2Loss_SVM_Dual)) 
     551        """:param learner: Learner used for weight esstimation  
     552            (default LinearLearner(solver_type=L2Loss_SVM_Dual)) 
    550553        :type learner: Orange.core.Learner  
    551554         
     
    593596    def getAttrScores(self, data, stopAt=0, progressCallback=None): 
    594597        """Return a dict mapping attributes to scores (scores are not scores  
    595         in a general meaning they represent the step number at which they  
     598        in a general meaning; they represent the step number at which they  
    596599        were removed from the recursive evaluation). 
    597600         
  • orange/Orange/classification/svm/kernels.py

    r7219 r7241  
    9797    def __init__(self, wrapped1, wrapped2, l=0.5): 
    9898        DualKernelWrapper.__init__.__doc__ + """\ 
    99         :param l: 
     99        :param l:  
    100100         
    101101        """ 
    102102        DualKernelWrapper.__init__(self, wrapped1, wrapped2) 
    103103        self.l=l 
     104         
    104105    def __call__(self, example1, example2): 
    105106        """Return 
    106107         
    107108        .. math:: l * wrapped1(example1, example2) + (1 - l) *  
    108         wrapped2(example1, example2) 
     109            wrapped2(example1, example2) 
    109110             
    110111        """ 
Note: See TracChangeset for help on using the changeset viewer.