1. biolab
  2. Untitled project
  3. orange

Commits

Blaz Zupan  committed f21218b

Updated documentation for File widget (use of stamper.py to render images).

  • Participants
  • Parent commits 9a0d8f7
  • Branches default

Comments (0)

Files changed (10)

File Orange/OrangeWidgets/Data/OWFile.py

View file
                 self.warnings.setText(str(ex))
                 return
 
-        self.infoa.setText('%d example(s), ' % len(data) +
-                           '%d attribute(s), ' % len(data.domain.attributes) +
-                           '%d meta attribute(s).' % len(data.domain.getmetas()))
+        self.infoa.setText("%d data instance%s, " %
+                           (len(data), 's' if len(data) > 1 else '') +
+                           "%d feature%s, " %
+                           (len(data.domain.attributes),
+                            's' if len(data.domain.attributes) > 1 else '') +
+                           '%d meta attribute%s.' %
+                           (len(data.domain.getmetas()),
+                            's' if len(data.domain.getmetas()) > 1 else ''))
         cl = data.domain.class_var
         if cl is not None:
             if isinstance(cl, Orange.feature.Continuous):
                 self.infob.setText('Regression; Numerical class.')
             elif isinstance(cl, Orange.feature.Discrete):
                 self.infob.setText(
-                    'Classification; Discrete class with %d value(s).' %
-                    len(cl.values)
+                    'Classification; Discrete class with %d value%s.' %
+                    (len(cl.values), 's' if len(cl.values) > 1 else '')
                 )
             else:
                 self.infob.setText("Class is neither discrete nor continuous.")

File docs/widgets/rst/data/file.rst

View file
    - None
 
 Outputs:
-   - Examples (ExampleTable)
-       	Attribute-valued data set read from the input file.
+   - Data
+         Attribute-valued data set read from the input file.
 
 Description
 -----------
 
-.. image:: images/File.png
-   :alt: File widget with loaded ionosphere.tab data set
-   
-This is the widget you will probably use in every schema. It reads the input data file 
+This is the widget you will probably use in every schema. It reads the input data file
 (data table with examples) and sends the data set to the output channel. It maintains
-a history of most recently used data files. For convenience, the history also includes 
+a history of most recently used data files. For convenience, the history also includes
 a directory with the sample data sets that come with Orange.
 
-To browse for a data file press .... Reload button reloads the file.
+File can read data from simple tab-delimited or comma-separated files, as well as
+files Weka's .arrf format.
 
-The widget can read data from simple tab-delimited or comma-separated files, as well as
-files in C4.5 format and Weka's .arrf files.
+.. image:: images/File-stamped.png
+   :alt: File widget with loaded Iris data set
+   :align: right
 
-The info box at the bottom of the widget displays information on the number of examples, 
-attributes and meta attributes, and information on class variable (if defined in a file).
+1. Browse for a data file.
+#. Browse through previously opened data files, or load any of the sample data
+   files.
+#. Reloads currently selected data file.
+#. Information on loaded data set (data set size, number and types of
+   data features).
+#. Opens a sub-window with advanced settings.
+#. Adds a report on data set info (size, features).
 
-The controls in between are for more advanced users.
+.. container:: clearer
 
-Tab-delimited file can have user defined symbols for undefined values. The symbols for 
+    .. image :: images/spacer.png
+
+Advanced Options
+----------------
+
+.. image:: images/File-Advanced-stamped.png
+   :alt: Advanced options of File widget
+   :align: right
+
+1. Symbol for don't care data entry.
+#. Symbol for don't know data entry.
+#. Settings for treatment of feature names in the feature space of Orange.
+
+.. container:: clearer
+
+    .. image :: images/spacer.png
+
+Tab-delimited data file can include user defined symbols for undefined values. The symbols for
 "don't care" and "don't know" values can be specified in the corresponding edit lines. 
 The default values for "don't know" and "don't care" depend upon format. Most users will 
 use tab-delimited files: keep the field empty or put a question mark in there and that's 
 it. Most algorithms do not differ between don't know and don't care values, so consider 
 them both to mean undefined.
 
-The part which most will probably neither understand nor need is related to construction 
-of new attributes. It becomes important when multiple data sets are loaded, usually with 
-multiple File widgets. A typical example is loading separate training and testing data 
-from two files. In this case Orange will usually treat the attributes with the same name 
+Orange will usually treat the attributes with the same name
 but appearing in different files as the same attribute, so a classifier which uses the 
 attribute "petal length" from the first will use the attribute of the same name from 
 the second. In cases when attributes from different files just accidentally bear different 
 names, one can instruct Orange to either always construct new attribute or construct them when 
-they differ in their domains. Use this option with great care (if at all).
+they differ in their domains. Use the options on dealing with new attributes
+with great care (if at all).
 
-Examples
---------
+Example
+-------
 
-Any of your schemas should probably start with the :ref:`File` widget. In the schema below,
-the widget is used to read the data that is then sent to both :ref:`Data Table` widget and 
+Most Orange workflows would probably start with the :ref:`File` widget. In the schema below,
+the widget is used to read the data that is sent to both :ref:`Data Table` widget and
 to widget that displays :ref:`Attribute Statistics`.
 
 .. image:: images/File_schema.png

File docs/widgets/rst/data/images/File-Advanced-stamped.png

Added
New image

File docs/widgets/rst/data/images/File-Advanced-tags.txt

View file
+0	128	56
+1	128	87
+2	371	170

File docs/widgets/rst/data/images/File-Advanced.png

Added
New image

File docs/widgets/rst/data/images/File-stamped.png

Added
New image

File docs/widgets/rst/data/images/File-tags.txt

View file
+0	329	39
+1	242	66
+2	431	75
+3	337	144
+4	157	192
+5	145	259

File docs/widgets/rst/data/images/File.png

Old
Old image
New
New image

File docs/widgets/rst/data/images/File_schema.png

Old
Old image
New
New image

File docs/widgets/rst/data/images/spacer.png

Added
New image