Changeset 9651:5fca80300e31 in orange


Ignore:
Timestamp:
02/06/12 00:30:11 (2 years ago)
Author:
markotoplak
Branch:
default
rebase_source:
626addb6766efc86ee45b28c99b44c9e97ed8b92
Message:

Aliases for trees.

Files:
2 edited

Legend:

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

    r9607 r9651  
    5151        Complete contingency matrices for the learning instances. 
    5252 
    53     .. attribute:: examples, weightID 
     53    .. attribute:: instances, weightID 
    5454 
    5555        Learning instances and the ID of weight meta attribute. The root 
     
    217217The default stopping parameters are: 
    218218 
    219     >>> print learner.stop.max_majority, learner.stop.min_examples 
     219    >>> print learner.stop.max_majority, learner.stop.min_instances 
    220220    1.0 0.0 
    221221 
     
    19611961        me = getattr(self, "min_instances", 0) 
    19621962        if me: 
    1963             stop.min_examples = self.min_instances 
     1963            stop.min_instances = self.min_instances 
    19641964        return stop 
    19651965 
     
    25712571    @Orange.misc.deprecated_keywords({"fileName": "file_name", \ 
    25722572        "leafStr": "leaf_str", "nodeStr": "node_str", \ 
    2573         "userFormats": "user_formats", "minExamples": "min_examples", \ 
     2573        "userFormats": "user_formats", "minExamples": "min_instances", \ 
     2574        "min_examples": "min_instances", \ 
    25742575        "maxDepth": "max_depth", "simpleFirst": "simple_first"}) 
    25752576    def to_string(self, leaf_str="", node_str="", \ 
    2576             user_formats=[], min_examples=0, max_depth=1e10, \ 
     2577            user_formats=[], min_instances=0, max_depth=1e10, \ 
    25772578            simple_first=True): 
    25782579        """ 
     
    25912592          printed out. 
    25922593        :type max_depth: integer 
    2593         :arg min_examples: If set, the subtrees with less than the given  
     2594        :arg min_instances: If set, the subtrees with less than the given  
    25942595          number of examples are not printed. 
    2595         :type min_examples: integer 
     2596        :type min_instances: integer 
    25962597        :arg simple_first: If True (default), the branches with a single  
    25972598          node are printed before the branches with larger subtrees.  
     
    26042605        """ 
    26052606        return _TreeDumper(leaf_str, node_str, user_formats + 
    2606             _TreeDumper.defaultStringFormats, min_examples, 
     2607            _TreeDumper.defaultStringFormats, min_instances, 
    26072608            max_depth, simple_first, self).dumpTree() 
    26082609 
     
    26122613        "leafStr": "leaf_str", "nodeStr": "node_str", \ 
    26132614        "leafShape": "leaf_shape", "nodeShape": "node_shape", \ 
    2614         "userFormats": "user_formats", "minExamples": "min_examples", \ 
     2615        "userFormats": "user_formats", \ 
     2616        "minExamples": "min_instances", \ 
     2617        "min_examples": "min_instances", \ 
    26152618        "maxDepth": "max_depth", "simpleFirst": "simple_first"}) 
    26162619    def dot(self, file_name, leaf_str="", node_str="", \ 
    26172620            leaf_shape="plaintext", node_shape="plaintext", \ 
    2618             user_formats=[], min_examples=0, max_depth=1e10, \ 
     2621            user_formats=[], min_instances=0, max_depth=1e10, \ 
    26192622            simple_first=True): 
    26202623        """ Print the tree to a file in a format used by `GraphViz 
     
    26362639 
    26372640        _TreeDumper(leaf_str, node_str, user_formats + 
    2638             _TreeDumper.defaultStringFormats, min_examples, 
     2641            _TreeDumper.defaultStringFormats, min_instances, 
    26392642            max_depth, simple_first, self, 
    26402643            leafShape=leaf_shape, nodeShape=node_shape, fle=fle).dotTree() 
  • source/orange/_aliases.txt

    r9636 r9651  
    3232filterbool filter_bool 
    3333randomexample random_example 
    34 randomexample random_instance 
     34random_instance random_example 
    3535 
    3636ClassifierByExampleTable 
     
    4747treesize tree_size 
    4848removestoredinfo remove_stored_info 
     49instances examples 
     50 
     51TreeStopCriteria_common 
     52min_instances min_examples 
    4953 
    5054TreeClassifier 
Note: See TracChangeset for help on using the changeset viewer.