source: orange/orange/Orange/regression/tree.py @ 9349:fa13a2c52fcd

Revision 9349:fa13a2c52fcd, 3.1 KB checked in by mitar, 2 years ago (diff)

Changed way of linking to code in documentation.

Line 
1"""
2.. index:: regression tree
3
4.. index::
5   single: regression; tree
6
7****************
8Regression trees
9****************
10
11Regression tree shares its implementation with Orange.classification.tree.TreeLearner,
12but uses a different set of functions to evaluate node splitting and stop
13criteria. Usage of regression trees is straightforward as demonstrated on the
14following example (:download:`regression-tree-run.py <code/regression-tree-run.py>`, uses :download:`servo.tab <code/servo.tab>`):
15
16.. literalinclude:: code/regression-tree-run.py
17   :lines: 7-
18
19.. autoclass:: TreeLearner
20    :members:
21
22.. autoclass:: TreeClassifier
23    :members:
24
25=================
26SimpleTreeLearner
27=================
28
29.. include:: /SimpleTreeLearner.txt
30
31A basic example of using a SimpleTreeLearner is shown below:
32
33.. literalinclude:: code/simple_tree_regression.py
34
35"""
36
37
38from Orange.core import \
39         TreeLearner as _TreeLearner, \
40         TreeClassifier as _TreeClassifier, \
41         TreeDescender as Descender, \
42              TreeDescender_UnknownMergeAsBranchSizes as Descender_UnknownMergeAsBranchSizes, \
43              TreeDescender_UnknownMergeAsSelector as Descender_UnknownMergeAsSelector, \
44              TreeDescender_UnknownToBranch as Descender_UnknownToBranch, \
45              TreeDescender_UnknownToCommonBranch as Descender_UnknownToCommonBranch, \
46              TreeDescender_UnknownToCommonSelector as Descender_UnknownToCommonSelector, \
47         TreeExampleSplitter as Splitter, \
48              TreeExampleSplitter_IgnoreUnknowns as Splitter_IgnoreUnknowns, \
49              TreeExampleSplitter_UnknownsAsBranchSizes as Splitter_UnknownsAsBranchSizes, \
50              TreeExampleSplitter_UnknownsAsSelector as Splitter_UnknownsAsSelector, \
51              TreeExampleSplitter_UnknownsToAll as Splitter_UnknownsToAll, \
52              TreeExampleSplitter_UnknownsToBranch as Splitter_UnknownsToBranch, \
53              TreeExampleSplitter_UnknownsToCommon as Splitter_UnknownsToCommon, \
54              TreeExampleSplitter_UnknownsToRandom as Splitter_UnknownsToRandom, \
55         TreeNode as Node, \
56         TreeNodeList as NodeList, \
57         TreePruner as Pruner, \
58              TreePruner_SameMajority as Pruner_SameMajority, \
59              TreePruner_m as Pruner_m, \
60         TreeSplitConstructor as SplitConstructor, \
61              TreeSplitConstructor_Combined as SplitConstructor_Combined, \
62              TreeSplitConstructor_Measure as SplitConstructor_Measure, \
63                   TreeSplitConstructor_Attribute as SplitConstructor_Feature, \
64                   TreeSplitConstructor_ExhaustiveBinary as SplitConstructor_ExhaustiveBinary, \
65                   TreeSplitConstructor_OneAgainstOthers as SplitConstructor_OneAgainstOthers, \
66                   TreeSplitConstructor_Threshold as SplitConstructor_Threshold, \
67         TreeStopCriteria as StopCriteria, \
68              TreeStopCriteria_Python as StopCriteria_Python, \
69              TreeStopCriteria_common as StopCriteria_common, \
70         SimpleTreeLearner, \
71         SimpleTreeClassifier
72
73             
74from Orange.classification.tree import TreeLearner, TreeClassifier
75
Note: See TracBrowser for help on using the repository browser.