Skip to content

Commit cd5a48c

Browse files
authored
Merge pull request #3505 from ajdapretnar/docs-to-md
[DOC] Transform documentation to .md
2 parents 4174f2c + 8b3f6f5 commit cd5a48c

File tree

156 files changed

+3120
-4599
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+3120
-4599
lines changed

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ environment:
1818
# disable threaded builds on Python 3.5+ when using numpy's distutils
1919
# (https://github.com/numpy/numpy/issues/7607)
2020
BUILD_GLOBAL_OPTIONS: build -j1
21-
BUILD_ENV: wheel==0.29.0 pip==9.0.1 numpy==1.9.3 sphinx==1.8.2
21+
BUILD_ENV: wheel==0.29.0 pip==9.0.1 numpy==1.9.3 -r requirements-doc.txt
2222
# SIP 4.19.4+ with PyQt5==5.9.1+ segfault our tests (GH-2756)
2323
TEST_ENV: sip==4.19.6 PyQt5==5.9.2 numpy~=1.14.0 scipy~=1.0.0 scikit-learn pandas==0.21.1
2424

doc/visual-programming/source/conf.py

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
import sys
1717
import os
18-
import shlex
18+
from recommonmark.parser import CommonMarkParser
1919

2020
# If extensions (or modules to document with autodoc) are in another directory,
2121
# add these directories to sys.path here. If the directory is relative to the
@@ -39,15 +39,17 @@
3939
'sphinx.ext.todo',
4040
'sphinx.ext.imgmath',
4141
'sphinx.ext.ifconfig',
42-
'sphinx.ext.viewcode',
42+
'sphinx.ext.viewcode'
4343
]
4444

4545
# Add any paths that contain templates here, relative to this directory.
4646
templates_path = ['_templates']
4747

48+
source_parsers = {'.md': CommonMarkParser}
49+
4850
# The suffix(es) of source filenames.
4951
# You can specify multiple suffix as a list of string:
50-
source_suffix = ['.rst']
52+
source_suffix = ['.md', '.rst']
5153

5254
# The encoding of source files.
5355
#source_encoding = 'utf-8-sig'
@@ -214,7 +216,7 @@
214216

215217
# -- Options for LaTeX output ---------------------------------------------
216218

217-
latex_elements = {
219+
# latex_elements = {
218220
# The paper size ('letterpaper' or 'a4paper').
219221
#'papersize': 'letterpaper',
220222

@@ -226,14 +228,15 @@
226228

227229
# Latex figure (float) alignment
228230
#'figure_align': 'htbp',
229-
}
231+
# }
230232

231233
# Grouping the document tree into LaTeX files. List of tuples
232234
# (source start file, target name, title,
233235
# author, documentclass [howto, manual, or own class]).
234236
latex_documents = [
235-
(master_doc, 'OrangeVisualProgramming.tex', 'Orange Visual Programming Documentation',
236-
'Orange Data Mining', 'manual'),
237+
(master_doc, 'OrangeVisualProgramming.tex',
238+
'Orange Visual Programming Documentation',
239+
'Orange Data Mining', 'manual'),
237240
]
238241

239242
# The name of an image file (relative to this directory) to place at the top of
@@ -262,7 +265,8 @@
262265
# One entry per manual page. List of tuples
263266
# (source start file, name, description, authors, manual section).
264267
man_pages = [
265-
(master_doc, 'orangevisualprogramming', 'Orange Visual Programming Documentation',
268+
(master_doc, 'orangevisualprogramming',
269+
'Orange Visual Programming Documentation',
266270
[author], 1)
267271
]
268272

@@ -276,9 +280,10 @@
276280
# (source start file, target name, title, author,
277281
# dir menu entry, description, category)
278282
texinfo_documents = [
279-
(master_doc, 'OrangeVisualProgramming', 'Orange Visual Programming Documentation',
280-
author, 'OrangeVisualProgramming', 'One line description of project.',
281-
'Miscellaneous'),
283+
(master_doc, 'OrangeVisualProgramming',
284+
'Orange Visual Programming Documentation', author,
285+
'OrangeVisualProgramming', 'One line description of project.',
286+
'Miscellaneous'),
282287
]
283288

284289
# Documents to append as an appendix to all manuals.
@@ -366,7 +371,3 @@
366371

367372
# Example configuration for intersphinx: refer to the Python standard library.
368373
intersphinx_mapping = {'https://docs.python.org/': None}
369-
370-
371-
def setup(app):
372-
app.add_stylesheet('style.css')
Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,59 @@
11
Color
22
=====
33

4-
Set color legend for variables.
4+
Set color legend for variables.
55

6-
Inputs
7-
Data
8-
input dataset
6+
**Inputs**
97

10-
Outputs
11-
Data
12-
dataset with a new color legend
8+
- Data: input data set
139

10+
**Outputs**
1411

15-
The **Color** widget enables you to set the color legend in your visualizations
16-
according to your own preferences. This option provides you with the tools for
17-
emphasizing your results and offers a great variety of color options for presenting your data. It can be combined with most visualizations widgets.
12+
- Data: data set with a new color legend
1813

19-
.. figure:: images/Color-stamped.png
14+
The **Color** widget enables you to set the color legend in your visualizations according to your own preferences. This option provides you with the tools for emphasizing your results and offers a great variety of color options for presenting your data. It can be combined with most visualizations widgets.
2015

21-
1. A list of discrete variables. You can set the color of each variable by double-clicking on it and opening the *Color palette* or the *Select color* window. The widget also enables text-editing. By clicking on a variable, you can change its name.
22-
2. A list of continuous variables. You can customize the color gradients by double-clicking on them. The widget also enables text-editing. By clicking on a variable, you can change its name. If you hover over the right side side of the gradient, *Copy to all* appears. You can then apply your customized color gradient to all variables.
16+
![](images/Color-stamped.png)
17+
18+
1. A list of discrete variables. You can set the color of each variable by double-clicking on it and opening the *Color palette* or the *Select color* window. The widget also enables text-editing. By clicking on a variable, you can change its name.
19+
2. A list of continuous variables. You can customize the color gradients by double-clicking on them. The widget also enables text-editing. By clicking on a variable, you can change its name. If you hover over the right side side of the gradient, *Copy to all* appears. You can then apply your customized color gradient to all variables.
2320
3. Produce a report.
24-
4. Apply changes. If *Apply automatically* is ticked, changes will be communicated automatically. Alternatively, just click *Apply*.
21+
4. Apply changes. If *Apply automatically* is ticked, changes will be communicated automatically. Alternatively, just click *Apply*.
2522

2623
Discrete variables
2724
------------------
2825

29-
.. figure:: images/Color-palette-discrete-stamped.png
26+
![](images/Color-palette-discrete-stamped.png)
3027

31-
1. Choose a desired color from the palette of basic colors.
32-
2. Move the cursor to choose a custom color from the color palette.
28+
1. Choose a desired color from the palette of basic colors.
29+
2. Move the cursor to choose a custom color from the color palette.
3330
3. Choose a custom color from your previously saved color choices.
3431
4. Specify the custom color by:
35-
36-
- entering the red, green, and blue components of the color as values between 0 (darkest) and 255 (brightest)
37-
- entering the hue, saturation and luminescence components of the color as values in the range 0 to 255
38-
32+
- entering the red, green, and blue components of the color as values between 0 (darkest) and 255 (brightest)
33+
- entering the hue, saturation and luminescence components of the color as values in the range 0 to 255
3934
5. Add the created color to your custom colors.
40-
6. Click *OK* to save your choices or *Cancel* to exit the the color palette.
35+
6. Click *OK* to save your choices or *Cancel* to exit the the color palette.
4136

4237
Numeric variables
4338
-----------------
4439

45-
.. figure:: images/Color-palette-numeric-stamped.png
40+
![](images/Color-palette-numeric-stamped.png)
4641

47-
1. Choose a gradient from your saved profiles. The default profile is already set.
42+
1. Choose a gradient from your saved profiles. The default profile is already set.
4843
2. The gradient palette
49-
3. Select the left side of the gradient. Double clicking the color opens the *Select Color* window.
50-
4. Select the right side of the gradient. Double clicking the color opens the *Select Color* window.
44+
3. Select the left side of the gradient. Double clicking the color opens the *Select Color* window.
45+
4. Select the right side of the gradient. Double clicking the color opens the *Select Color* window.
5146
5. Pass through black.
52-
6. Click *OK* to save your choices or *Cancel* to exit the color palette.
47+
6. Click *OK* to save your choices or *Cancel* to exit the color palette.
5348

5449
Example
5550
-------
5651

57-
We chose to work with the *Iris* dataset. We opened the color palette and selected three new colors for the three types of Irises. Then we opened the :doc:`Scatter Plot<../visualize/scatterplot>` widget and viewed the changes made to the scatter plot.
58-
59-
.. figure:: images/Color-Example-1.png
52+
We chose to work with the *Iris* data set. We opened the color palette and selected three new colors for the three types of Irises. Then we opened the [Scatter Plot](../visualize/scatterplot.md) widget and viewed the changes made to the scatter plot.
6053

61-
For our second example, we wished to demonstrate the use of the **Color** widget with continuous variables. We put different types of Irises on the x axis and petal length on the y axis. We created a new color gradient and named it greed (green + red).
62-
In order to show that sepal length is not a deciding factor in differentiating between different types of Irises, we chose to color the points according to sepal width.
54+
![](images/Color-Example-1.png)
6355

56+
For our second example, we wished to demonstrate the use of the **Color** widget with continuous variables. We put different types of Irises on the x axis and petal length on the y axis. We created a new color gradient and named it greed (green + red).
57+
In order to show that sepal length is not a deciding factor in differentiating between different types of Irises, we chose to color the points according to sepal width.
6458

65-
.. figure:: images/Color-Example-2.png
59+
![](images/Color-Example-2.png)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Concatenate
2+
===========
3+
4+
Concatenates data from multiple sources.
5+
6+
**Inputs**
7+
8+
- Primary Data: data set that defines the attribute set
9+
- Additional Data: additional data set
10+
11+
**Outputs**
12+
13+
- Data: concatenated data
14+
15+
The widget concatenates multiple sets of instances (data sets). The merge is “vertical”, in a sense that two sets of 10 and 5 instances yield a new set of 15 instances.
16+
17+
![](images/Concatenate-stamped.png)
18+
19+
1. Set the attribute merging method.
20+
2. Add the identification of source data sets to the output data set.
21+
3. Produce a report.
22+
4. If *Apply automatically* is ticked, changes are communicated automatically. Otherwise, click *Apply*.
23+
24+
If one of the tables is connected to the widget as the primary table, the resulting table will contain its own attributes. If there is no primary table, the attributes can be either a union of all attributes that appear in the tables specified as *Additional Tables*, or their intersection, that is, a list of attributes common to all the connected tables.
25+
26+
Example
27+
-------
28+
29+
As shown below, the widget can be used for merging data from two separate files. Let's say we have two data sets with the same attributes, one containing instances from the first experiment and the other instances from the second experiment and we wish to join the two data tables together. We use the **Concatenate** widget to merge the data sets by attributes (appending new rows under existing attributes).
30+
31+
Below, we used a modified *Zoo* data set. In the [first](http://file.biolab.si/datasets/zoo-first.tab) [File](../data/file.md) widget, we loaded only the animals beginning with the letters A and B and in the [second](http://file.biolab.si/datasets/zoo-second.tab) one only the animals beginning with the letter C. Upon concatenation, we observe the new data in the [Data Table](../data/datatable.md) widget, where we see the complete table with animals from A to C.
32+
33+
![](images/Concatenate-Example.png)

doc/visual-programming/source/widgets/data/concatenate.rst

Lines changed: 0 additions & 51 deletions
This file was deleted.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
Continuize
2+
==========
3+
4+
Turns discrete attributes into continuous dummy variables.
5+
6+
**Inputs**
7+
8+
- Data: input data set
9+
10+
**Outputs**
11+
12+
- Data: data set with continuized instances
13+
14+
The **Continuize** widget receives a data set in the input and outputs the same data set in which the discrete attributes (including binary attributes) are replaced with continuous ones.
15+
16+
![](images/Continuize-stamped.png)
17+
18+
1. [Continuization methods](https://en.wikipedia.org/wiki/Continuity_correction), which define the treatment of multivalued discrete attributes. Say that we have a discrete attribute status with the values low, middle and high, listed in that order. Options for their transformation are:
19+
20+
- **Target or First value as base**: the attribute will be transformed into two continuous attributes, status=middle with values 0 or 1 signifying whether the original attribute had value middle on a particular example, and similarly, status=high. Hence, a three-valued attribute is transformed into two continuous attributes, corresponding to all except the first value of the attribute.
21+
- **Most frequent value as base**: similar to the above, except that the data is analyzed and the most frequent value is used as a base. So, if most examples have the value middle, the two newly constructed continuous attributes will be status=low and status=high.
22+
- **One attribute per value**: this would construct three continuous attributes out of a three-valued discrete one.
23+
- **Ignore multinominal attributes**: removes the multinominal attributes from the data.
24+
- **Treat as ordinal**: converts the attribute into a continuous attribute with values 0, 1, and 2.
25+
- **Divide by number of values**: same as above, except that the values are normalized into range 0-1. So, our case would give values 0, 0.5 and 1.
26+
27+
2. Define the treatment of continuous attributes. You will usually prefer the *Leave them as they are* option. The alternative is *Normalize by span*, which will subtract the lowest value found in the data and divide by the span, so all values will fit into [0, 1]. Finally,*Normalize by standard deviation* subtracts the average and divides by the deviation.
28+
3. Define the treatment of class attributes. Besides leaving it as it is, there are also a couple of options available for multinominal attributes, except for those options which split the attribute into more than one attribute - this obviously cannot be supported since you cannot have more than one class attribute.
29+
4. With *value range*, you can define the values of new attributes. In the above text, we supposed the range *from 0 to 1*. You can change it to *from -1 to 1*.
30+
5. Produce a report.
31+
6. If *Apply automatically* is ticked, changes are committed automatically. Otherwise, you have to press *Apply* after each change.
32+
33+
Examples
34+
--------
35+
36+
First, let's see what is the output of the **Continuize** widget. We feed the original data (the *Heart disease* data set) into the [Data Table](../data/datatable) and see how they look like. Then we continuize the discrete values and observe them in another [Data Table](../data/datatable).
37+
38+
![](images/Continuize-Example1.png)
39+
40+
In the second example, we show a typical use of this widget - in order to properly plot the linear projection of the data, discrete attributes need to be converted to continuous ones and that is why we put the data through the **Continuize** widget before drawing it. The attribute "*chest pain*" originally had four values and was transformed into three continuous attributes; similar happened to gender, which was transformed into a single attribute "*gender=female*".
41+
42+
![](images/Continuize-Example2.png)

0 commit comments

Comments
 (0)