Changeset 10092:cb849cfe6729 in orange


Ignore:
Timestamp:
02/08/12 16:36:19 (2 years ago)
Author:
Lan Zagar <lan.zagar@…>
Branch:
default
rebase_source:
0b16306e90b55fa0e1bb8502a4399905ffb20a2c
Message:

Added checking for missing class values.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/multitarget/tree.py

    r9994 r10092  
    171171    def __init__(self, **kwargs): 
    172172        """ 
    173         The constructor simply passes all given arguments to 
     173        The constructor passes all arguments to 
    174174        :class:`~Orange.classification.tree.TreeLearner`'s constructor 
    175175        :obj:`Orange.classification.tree.TreeLearner.__init__`. 
     
    191191        """ 
    192192         
     193        for ins in data: 
     194            for cval in ins.get_classes(): 
     195                if cval.is_special(): 
     196                    raise ValueError('Data has missing class values.') 
    193197        # TreeLearner does not work on class-less domains, 
    194198        # so we set the class if necessary 
Note: See TracChangeset for help on using the changeset viewer.