source: orange/orange/doc/modules/orngDisc.htm @ 6538:a5f65d7f0b2c

Revision 6538:a5f65d7f0b2c, 3.3 KB checked in by Mitar <Mitar@…>, 4 years ago (diff)

Made XPM version of the icon 32x32.

Line 
1<html><HEAD>
2<LINK REL=StyleSheet HREF="../style.css" TYPE="text/css">
3</HEAD>
4<body>
5<h1>orngDisc: Orange Discretization Module</h1>
6<index name="modules+discretization">
7<br>
8
9<p>Module orngDisc implements some functions and classes that can be
10used for categorization of continuous attributes. While core Orange
11already has several classes that can help in this task, currently,
12orngDisc provides a function that may help in entropy-based
13discretization (Fayyad &amp; Irani), and a wrapper around classes for
14categorization that can be used for learning.</p>
15
16<dl class="attributes">
17<dt>entropyDiscretization(data)</dt>
18<dd class="ddfun">A function that takes the classified data set
19(<em>data</em>) and categorizes all continuous attributes using the
20entropy based discretization (orange.EntropyDiscretization). After
21categorization, attribute that were categorized to a single interval
22(to a constant value) are removed from the data set. Returns the data
23set that includes all categorical and discretized continuous
24attributes from the original data set <em>data</em>.</dd>
25
26<dt>EntropyDiscretization([data])</dt>
27<index name="classes/EntropyDiscretization (in orngDisc)">
28<dd class="ddfun">This is simple wrapper class around the function
29<code>entropyDiscretization</code>. Once invoked it would either
30create an object that can be passed a data set for discretization, or
31if invoked with the data set, would return a discretized data set:
32
33<xmp class="code">discretizer = orngDisc.EntropyDiscretization()
34disc_data = discretizer(data)
35another_disc_data = orngDisc.EntropyDiscretization(data)
36</xmp>
37</dd>
38
39<dt>DiscretizedLearner([baseLearner[, examples[, discretizer[, name]]]])</dt>
40<index name="classes/DiscretizedLearner (in orngDisc)"><index name="classifiers/with discretization">
41<dd>This class allows to set an learner object, such that before
42learning a data passed to a learner is discretized. In this way we can
43prepare an object that lears without giving it the data, and, for
44instance, use it in some standard testing procedure that repeats
45learning/testing on several data samples. Default procedure for
46discretization (<em>discretizer</em>) is
47<code>orngDisc.EntropyDiscretization</code>.  An example on how such
48learner is set and used in ten-fold cross validation is given
49below:</p>
50<xmp class="code">bayes = orange.BayesLearner()
51dBayes = orngDisc.DiscretizedLearner(bayes, name='disc bayes')
52dbayes2 = orngDisc.DiscretizedLearner(bayes, name="EquiNBayes", \
53            discretizer=orange.Preprocessor_discretize(\
54            method=orange.EquiNDiscretization(numberOfIntervals=10)))
55results = orngEval.CrossValidation([dBayes], data)
56classifier = orngDisc.DiscretizedLearner(bayes, examples=data)
57</xmp>
58</dd>
59
60</dl>
61
62<h2>Examples</h2>
63
64<p>A chapter on <a href="../ofb/o_fss.htm">feature subset selection</a> in Orange for Beginners tutorial shows the use of DiscretizedLearner. Other discretization classes from core Orange are listed in chapter on <a href="../ofb/o_categorization.htm">categorization</a> of the same tutorial.</p>
65
66
67<h2>References</h2>
68
69<p>UM Fayyad and KB Irani. Multi-interval discretization of continuous valued attributes for classification learning. In <em>Proceedings of the 13th International Joint Conference on Artificial Intelligence</em>, pages 1022--1029, Chambery, France, 1993.</p>
70
71</body>
72</html>
Note: See TracBrowser for help on using the repository browser.