source: orange/docs/widgets/rst/data/continuize.rst @ 11778:ecd4beec2099

Revision 11778:ecd4beec2099, 3.7 KB checked in by Ales Erjavec <ales.erjavec@…>, 5 months ago (diff)

Use new SVG icons in the widget documentation.

Line 
1.. _Continuize:
2
3Continuize
4==========
5
6.. image:: ../../../../Orange/OrangeWidgets/Data/icons/Continuize.svg
7
8Turns discrete attributes into continuous dummy variables.
9
10Signals
11-------
12
13Inputs:
14   - Examples (ExampleTable)
15      Input data set.
16
17Outputs:
18   - Examples (ExampleTable)
19      Output data set.
20
21
22Description
23-----------
24
25Continuize widget receives a data set on the input and outputs the same data in
26which the discrete attributes (including binary attributes) are replaced with
27continuous using the methods specified by the user.
28
29.. image:: images/Continuize.png
30
31
32The first box, :obj:`Multinominal attributes`, defines the treatment of
33multivalued discrete attributes. Say that we have a discrete attribute status
34with values low, middle and high, listed in that order. Options for its
35transformation are
36
37   - :obj:`Target or First value as base`: the attribute will be transformed
38     into two continuous attributes, status=middle with values 0 or 1
39     signifying whether the original attribute had value middle on a
40     particular example, and similarly, status=high. Hence, a three-valued
41     attribute is transformed into two continuous attributes, corresponding to
42     all except the first value of the attribute.
43
44   - :obj:`Most frequent value as base`: similar to the above, except that the
45     data is analyzed and the most frequent value is used as a base. So, if
46     most examples have the value middle, the two newly constructed continuous
47     attributes will be status=low and status=high.
48
49   - :obj:`One attribute per value`: this would construct three continuous
50     attributes out of a three-valued discrete one.
51
52   - :obj:`Ignore multinominal attributes`: removes the multinominal attributes
53     from the data.
54
55   - :obj:`Treat as ordinal:` converts the attribute into a continuous
56     attribute with values 0, 1, and 2.
57
58   - :obj:`Divide by number of values:` same as above, except that the values
59     are normalized into range 0-1. So, our case would give values 0, 0.5 and
60     1.
61
62
63Next box defines the treatment of continuous attributes. You will usually
64prefer :obj:`Leave as is` option. The alternative is :obj:`Normalize by span`
65which will subtract the lowest value found in the data and divide by the span,
66so all values will fit into [0, 1]. Finally, :obj:`Normalize by variance`
67subtracts the average and divides by the variance.
68
69Finally, you can decide what happens with the class if it is discrete. Besides
70leaving it as it is, there are also the options which are available for
71multinominal attributes, except for those options which split the attribute
72into more than one attribute - this obviously cannot be supported since you
73cannot have more than one class attribute. Additionally, you can
74:obj:`specify a target value`; this will transform the class into a continuous
75attribute with value 1 if the value of the original attribute equals the target
76and 0 otherwise.
77
78With :obj:`value range`, you can define the values of the new attributes. In
79the above text we supposed the range :obj:`from 0 to 1`. You can change it to
80:obj:`from -1 to 1`.
81
82If :obj:`Send automatically` is set, the data set is committed on any change.
83Otherwise, you have to press :obj:`Send data` after each change.
84
85Examples
86--------
87
88The schema below shows a typical use of this widget: in order to properly plot
89linear projection of the data, discrete attributes need to be converted to
90continuous, therefore we put the data through Continuize widget before drawing
91it. Attribute "chest pain" originally had four values and was transformed into
92three continuous attributes; similar happened to gender, which was transformed
93into a single attribute gender=female.
94
95.. image:: images/Continuize-Schema.png
Note: See TracBrowser for help on using the repository browser.