1.. currentmodule:: Orange.data
2
3#####################
4Data model (``data``)
5#####################
6
7Orange stores data in :obj:`Orange.data.Storage` classes. The most commonly used
8storage is :obj:`Orange.data.Table`, which stores all data in two-dimensional
9numpy arrays. Each row of the data represents a data instance.
10
11Individual data instances are represented as instances of
12:obj:`Orange.data.Instance`. Different storage classes may derive subclasses
13of :obj:`~Orange.data.Instance` to represent the retrieved rows in the data
14more efficiently and to allow modifying the data through modifying data
15instance. For example, if `table` is :obj:`Orange.data.Table`, `table[0]`
16returns the row as :obj:`Orange.data.RowInstance`.
17
18Every storage class and data instance has an associated domain description
19`domain` (an instance of :obj:`Orange.data.Domain`) that stores descriptions of
20data columns. Every column is described by an instance of a class derived from
21:obj:`Orange.data.Variable`. The subclasses correspond to continuous variables
22(:obj:`Orange.data.ContinuousVariable`), discrete variables
23(:obj:`Orange.data.DiscreteVariable`) and string variables
24(:obj:`Orange.data.StringVariable`). These descriptors contain the
25variable's name, symbolic values, number of decimals in printouts and similar.
26
27The data is divided into attributes (features, independent variables), class
28variables (classes, targets, outcomes, dependent variables) and meta
29attributes. This division applies to domain descriptions, data storages that
30contain separate arrays for each of the three parts of the data and data
31instances.
32
33Attributes and classes are represented with numeric values and are used in
34modelling. Meta attributes contain additional data which may be of any type.
35(Currently, only string values are supported in addition to continuous and
36numeric.)
37
38In indexing, columns can be referred to by their names,
39descriptors or an integer index. For example, if `inst` is a data instance
40and `var` is a descriptor of type :obj:`~Orange.data.Continuous`, referring to
41the first column in the data, which is also names "petal length", then
42`inst[var]`, `inst[0]` and `inst["petal length"]` refer to the first value
43of the instance. Negative indices are used for meta attributes, starting with
44-1.
45
46Continuous and discrete values can be represented by any numerical type; by
47default, Orange uses double precision (64-bit) floats. Discrete values are
48represented by whole numbers.
49
50.. toctree::
51    :maxdepth: 2
52
53    data.storage
54    data.table
55    data.sql
56    data.domain
57    data.variable
58    data.value
59    data.instance
60    data.filters
61    data.io
62
63.. index:: Data
64