Skip to content

Commit c46df99

Browse files
committed
Fixed many formatting issues with the documentation.
1 parent 9ea7081 commit c46df99

10 files changed

+57
-37
lines changed
File renamed without changes.
File renamed without changes.

doc/source/conf.py

+18-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
]
3838

3939
# Add any paths that contain templates here, relative to this directory.
40-
templates_path = ["misc/_templates"]
40+
templates_path = ["_templates"]
4141

4242
# List of patterns, relative to source directory, that match files and
4343
# directories to ignore when looking for source files.
@@ -55,7 +55,7 @@
5555
# Add any paths that contain custom static files (such as style sheets) here,
5656
# relative to this directory. They are copied after the builtin static files,
5757
# so a file named "default.css" will overwrite the builtin "default.css".
58-
html_static_path = [ "misc/_statics" ]
58+
html_static_path = [ ]
5959

6060
html_theme_options = {
6161
#'analytics_id': 'G-XXXXXXXXXX', # Provided by Google in your dashboard
@@ -94,9 +94,23 @@
9494
9595
.. raw:: html
9696
97+
<style>
98+
/*Make children of section and not (nbinput/nboutput)
99+
followed by (nbinput/nboutput) have24px padding. This
100+
is what the rtd_theme uses.*/
101+
:is(section > :not(section):last-child,
102+
section > :not(:is(
103+
.nbinput:has (+ .nboutput, + .nbinput),
104+
.nboutput:has(+ .nboutput, + .nbinput)
105+
))
106+
) {
107+
margin-bottom: 24px !important
108+
}
109+
</style>
110+
97111
<div class="admonition note">
98-
To view an interactive online version of this page
99-
<a href="https://mybinder.org/v2/gh/vowpalWabbit/coba/{{ env.config.release|e }}?filepath={{ docname|e }}"><img alt="Binder badge" src="https://mybinder.org/badge_logo.svg" style="vertical-align:text-bottom"></a> (takes time to initialize).
112+
To interact with this Notebook:
113+
<a href="https://mybinder.org/v2/gh/vowpalWabbit/coba/{{ env.config.release|e }}?filepath={{ docname|e }}"><img alt="Binder badge" src="https://mybinder.org/badge_logo.svg" style="vertical-align:text-bottom"></a>. To download this Notebook: <a href="{{ env.docname.split('/')|last|e + '.ipynb' }}" download>click here</a>.
100114
</div>
101115
"""
102116

doc/source/misc/_statics/workflow.svg

-1
This file was deleted.

doc/source/notebooks/Environments.ipynb

+13-11
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,12 @@
244244
"source": [
245245
"### Environments From Local Supervised Datasets\n",
246246
"\n",
247-
"Next we can incorporate new environments from local datasets. Coba has built-in support for the following formats:\n",
248-
"* CSV\n",
249-
"* ARFF (i.e., https://waikato.github.io/weka-wiki/formats_and_processing/arff_stable/)\n",
250-
"* Libsvm (e.g., https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass.html)\n",
251-
"* Manik (e.g., http://manikvarma.org/downloads/XC/XMLRepository.html)\n",
247+
"Next we can incorporate new environments from local datasets in the following formats:\n",
248+
"\n",
249+
"+ CSV\n",
250+
"+ ARFF (i.e., https://waikato.github.io/weka-wiki/formats_and_processing/arff_stable/)\n",
251+
"+ Libsvm (e.g., https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass.html)\n",
252+
"+ Manik (e.g., http://manikvarma.org/downloads/XC/XMLRepository.html)\n",
252253
"\n",
253254
"For example, we may have the iris dataset saved in `iris.arff` in the arff format. To create an environment from this dataset we can."
254255
]
@@ -287,11 +288,12 @@
287288
"source": [
288289
"### Environments From Synthetic Datasets\n",
289290
"\n",
290-
"Coba provides access to several synthetic data generators from many function class families. Coba has built-in support for the following formats:\n",
291-
"* Linear -- `cb.Environments.from_linear_synthetic`\n",
292-
"* Nearest Neighbors -- `cb.Environments.from_neighbors_synthetic`\n",
293-
"* Kernel Methods -- `cb.Environments.from_kernel_synthetic`\n",
294-
"* Multilayer Perceptrons -- `cb.Environments.from_mlp_synthetic`\n",
291+
"Coba provides access to several synthetic data generators from many function class:\n",
292+
"\n",
293+
"+ Linear -- `cb.Environments.from_linear_synthetic`\n",
294+
"+ Nearest Neighbors -- `cb.Environments.from_neighbors_synthetic`\n",
295+
"+ Kernel Methods -- `cb.Environments.from_kernel_synthetic`\n",
296+
"+ Multilayer Perceptrons -- `cb.Environments.from_mlp_synthetic`\n",
295297
"\n",
296298
"For example, below we create a synthetic dataset whose expected reward function is linear with respect to action features:"
297299
]
@@ -704,7 +706,7 @@
704706
"source": [
705707
"### Filters that apply to rewards\n",
706708
"\n",
707-
"1. binary -- Turn rewards into 1/0 with max reward being 1 and all other 0."
709+
"1. `binary` -- Turn rewards into 1/0 with max reward being 1 and all other 0."
708710
]
709711
},
710712
{

doc/source/notebooks/Evaluators.ipynb

+4-3
Original file line numberDiff line numberDiff line change
@@ -449,9 +449,10 @@
449449
"source": [
450450
"## Built-in Evaluators\n",
451451
"Coba comes with three built-in evaluators:\n",
452-
"1. SequentialCB -- the default evaluator, it can perform on-policy and off-policy learning/evaluation for Learners\n",
453-
"2. RejectionCB -- unbiased estimation of of exploration algorithm performance using logged interactions\n",
454-
"3. SequentialIGL -- evaluation for interaction grounded learning algorithms with both feedback and rewards"
452+
"\n",
453+
"1. SequentialCB -- sequential on/off-policy learning/evaluation (default evaluator)\n",
454+
"2. RejectionCB -- sequential on-policy learning/evaluation using logged data\n",
455+
"3. SequentialIGL -- sequential interaction grounded learning/evaluation"
455456
]
456457
},
457458
{

doc/source/notebooks/Interactions.ipynb

+7-7
Original file line numberDiff line numberDiff line change
@@ -56,34 +56,34 @@
5656
" ```python\n",
5757
" 1 or 'a' or None\n",
5858
" ```\n",
59-
" <br>\n",
6059
"2. Dense sequences of values such as:\n",
6160
" ```python\n",
6261
" [1,2,3] or ['a',1,'b'] or (1,2,3)\n",
6362
" ```\n",
64-
" <br>\n",
6563
"3. Sparse mappings of values (where missing values are assumed to be 0):\n",
6664
" ```python\n",
6765
" {1:2, 'a':3}\n",
6866
" ```\n",
6967
"\n",
7068
"A few more notes:\n",
69+
"\n",
7170
"* Individual values and dense values with strings can be thought of as sparse collections. That is,\n",
7271
" ```python\n",
7372
" [1,'a',5.2] ~= {0:1, 'a':1, 2:5.2}\n",
7473
" ```\n",
75-
" <br>\n",
7674
"* Coba learners that support feature interactions assume 'x' is context features and 'a' is action features. So,\n",
7775
" ```python\n",
7876
" #Given given context ['a','b'] and action 'c' learner features 'x xx xa' would use as features\n",
7977
" ['a', 'b'] + ['aa', 'ab', 'bb'] + ['ac','bc']\n",
8078
" ```\n",
81-
" <br>\n",
8279
"* An easy trap to fall into is using numerical features when what is wanted are one-hot or string features\n",
8380
" ```python\n",
84-
" {'actions':[1,2,3]} #Three actions with one continuous feature. This can cause high-correlation among action rewards.\n",
85-
" {'actions':[(1,0,0),(0,1,0),(0,0,1)]} #Three actions with disjoint features. Actions have independent predictions.\n",
86-
" {'actions':['1','2','3']} #Equivalent to one-hot-encoding based on ['1','2','3'] ~= [{'1':1},{'2':1},{'3':1}]\n",
81+
" #Three actions with one continuous feature. This can cause high-correlation among action rewards.\n",
82+
" {'actions':[1,2,3]}\n",
83+
" #Three actions with disjoint features. Actions have independent predictions.\n",
84+
" {'actions':[(1,0,0),(0,1,0),(0,0,1)]}\n",
85+
" #Equivalent to one-hot-encoding based on ['1','2','3'] ~= [{'1':1},{'2':1},{'3':1}]\n",
86+
" {'actions':['1','2','3']}\n",
8787
" ```"
8888
]
8989
},

doc/source/notebooks/Results.ipynb

+15-11
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@
66
"metadata": {},
77
"source": [
88
"# Results\n",
9-
"The **Result** class the outcome of an **Experiment**. It has several features to support easy analysis. In this notebook we will learn:\n",
10-
"1. **Result Creation**: How to create a Result from an Experiment.\n",
11-
"2. **Result Plotting**: How to create plots of the learners that were evaluted by an experiment\n",
12-
"3. **Result Loading**: How to load results from disk\n",
13-
"4. **Result Filtering**: How to use filtering to create custom plots from a large experiment result \n",
14-
"5. **Result to Pandas**: How to turn Result into a collection of Pandas dataframes for more in-depth analysis\n",
159
"\n",
16-
"## Creation\n",
10+
"A **Result** is the outcome of an **Experiment**. It has several features to support easy analysis. \n",
11+
"\n",
12+
"In this notebook we will learn about **Result**...\n",
13+
"\n",
14+
"1. ...Creating: How to create a Result from an Experiment\n",
15+
"2. ...Plotting: How to create plots from a Result\n",
16+
"3. ...Loading: How to load Result from disk\n",
17+
"4. ...Selecting: How to select which Result data to analyze\n",
18+
"5. ...Pandas: How to turn Result into Panda Dataframes\n",
19+
"\n",
20+
"## Creating\n",
1721
"\n",
1822
"**Results** are created by running an Experiment. Below is a simple example of this:"
1923
]
@@ -189,9 +193,9 @@
189193
"id": "c470df2f",
190194
"metadata": {},
191195
"source": [
192-
"### Filtering to Finished Environments\n",
196+
"### Selecting Finished Environments\n",
193197
"\n",
194-
"One particularly useful feature is looking at the results of an experiment while it runs (this can be done by loading an Experiment restoration file at any time while the experiment is running). When doing this it is useful to filter the results down to just the Environments that have been fully processed. Otherwise some learners may look better or worse simply because they have been evaluated against a particularly easy/hard environment. Filtering to just finished environments looks like this."
198+
"One particularly useful feature is looking at the results of an experiment while it runs (this can be done by loading an a Result from experiment logs while the experiment is running). When doing this it is useful to select just the Environments that have been fully processed. If we didn't some learners may look better or worse simply because of missing or extra data. Selecting down to only finished environments looks like this."
195199
]
196200
},
197201
{
@@ -220,9 +224,9 @@
220224
"id": "3b9f2d3f",
221225
"metadata": {},
222226
"source": [
223-
"### Filtering In General\n",
227+
"### Selecting In General\n",
224228
"\n",
225-
"When running very large experiments it can often be useful to filter down to specific learners or environments. This can be done using the `where` method. Below is an example where we filter down to just the vw learner. When using strings it will perform a regex match so this can be very powerful."
229+
"When running very large experiments it can often be useful to select down to specific learners or environments to answer questions. This can be done using the `where` method. Below is an example where we select down to just the vw learner. When selecting on strings Coba will perform a regex match so this can be very powerful."
226230
]
227231
},
228232
{

0 commit comments

Comments
 (0)