Skip to content

Commit 051074d

Browse files
committed
Update documentation
1 parent 4979b67 commit 051074d

36 files changed

+12983
-2890
lines changed

docs/.buildinfo

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 9f648684785d39ad0c3d79f2d0442fee
3+
config: a59b13492cdf6f01b979f2409c1bda99
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

docs/_sources/new_bandit.rst.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Here is, at a high-level, what you need to implement in your bandit policy:
113113
# These fields are declared here and initialized to zero.
114114
self.my_value_to_arm = dict.fromkeys(self.arms, 0)
115115
116-
def fit(self, decisions: np.ndarray, rewards: np.ndarray, contexts: np.ndarray = None) -> NoReturn:
116+
def fit(self, decisions: np.ndarray, rewards: np.ndarray, contexts: np.ndarray = None) -> None:
117117
# TODO:
118118
# This method trains your algorithm from scratch each time its called.
119119
# You might need to reset the internal fields
@@ -124,7 +124,7 @@ Here is, at a high-level, what you need to implement in your bandit policy:
124124
# This automatically activates parallelization in the training phase.
125125
self._parallel_fit(decisions, rewards, contexts)
126126
127-
def partial_fit(self, decisions: np.ndarray, rewards: np.ndarray, contexts: np.ndarray = None) -> NoReturn:
127+
def partial_fit(self, decisions: np.ndarray, rewards: np.ndarray, contexts: np.ndarray = None) -> None:
128128
# This method trains your algorithm in a continuous fashion.
129129
# Unlike fit() operation, the partial_fit() does not reset internal fields typically.
130130
# This allows us to continue learning online
@@ -147,7 +147,7 @@ Here is, at a high-level, what you need to implement in your bandit policy:
147147
# so that the user cannot accidentally break your policy.
148148
return self.arm_to_expectation.copy()
149149
150-
def warm_start(self, arm_to_features: Dict[Arm, List[Num]], distance_quantile: float) -> NoReturn:
150+
def warm_start(self, arm_to_features: Dict[Arm, List[Num]], distance_quantile: float) -> None:
151151
# This method warm starts untrained (cold) arms for which no decisions has been observed
152152
# A cold arm is warm started using a warm arm that is within some minimum distance from the cold arm
153153
# based on the given arm_to_features and distance_quantile inputs.
@@ -156,7 +156,7 @@ Here is, at a high-level, what you need to implement in your bandit policy:
156156
# Call _copy_arms from the base class.
157157
return super().warm_start(arm_to_features, distance_quantile)
158158
159-
def _copy_arms(self, cold_arm_to_warm_arm: Dict[Arm, Arm]) -> NoReturn:
159+
def _copy_arms(self, cold_arm_to_warm_arm: Dict[Arm, Arm]) -> None:
160160
# TODO:
161161
# This method tells the policy how to warm start cold arms, given a cold arm to warm arm mapping.
162162
# It will typically involve copying attributes from a warm arm to a cold arm, e.g.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
/* Compatability shim for jQuery and underscores.js.
2+
*
3+
* Copyright Sphinx contributors
4+
* Released under the two clause BSD licence
5+
*/
6+
7+
/**
8+
* small helper function to urldecode strings
9+
*
10+
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
11+
*/
12+
jQuery.urldecode = function(x) {
13+
if (!x) {
14+
return x
15+
}
16+
return decodeURIComponent(x.replace(/\+/g, ' '));
17+
};
18+
19+
/**
20+
* small helper function to urlencode strings
21+
*/
22+
jQuery.urlencode = encodeURIComponent;
23+
24+
/**
25+
* This function returns the parsed url parameters of the
26+
* current request. Multiple values per key are supported,
27+
* it will always return arrays of strings for the value parts.
28+
*/
29+
jQuery.getQueryParameters = function(s) {
30+
if (typeof s === 'undefined')
31+
s = document.location.search;
32+
var parts = s.substr(s.indexOf('?') + 1).split('&');
33+
var result = {};
34+
for (var i = 0; i < parts.length; i++) {
35+
var tmp = parts[i].split('=', 2);
36+
var key = jQuery.urldecode(tmp[0]);
37+
var value = jQuery.urldecode(tmp[1]);
38+
if (key in result)
39+
result[key].push(value);
40+
else
41+
result[key] = [value];
42+
}
43+
return result;
44+
};
45+
46+
/**
47+
* highlight a given string on a jquery object by wrapping it in
48+
* span elements with the given class name.
49+
*/
50+
jQuery.fn.highlightText = function(text, className) {
51+
function highlight(node, addItems) {
52+
if (node.nodeType === 3) {
53+
var val = node.nodeValue;
54+
var pos = val.toLowerCase().indexOf(text);
55+
if (pos >= 0 &&
56+
!jQuery(node.parentNode).hasClass(className) &&
57+
!jQuery(node.parentNode).hasClass("nohighlight")) {
58+
var span;
59+
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
60+
if (isInSVG) {
61+
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
62+
} else {
63+
span = document.createElement("span");
64+
span.className = className;
65+
}
66+
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
67+
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
68+
document.createTextNode(val.substr(pos + text.length)),
69+
node.nextSibling));
70+
node.nodeValue = val.substr(0, pos);
71+
if (isInSVG) {
72+
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
73+
var bbox = node.parentElement.getBBox();
74+
rect.x.baseVal.value = bbox.x;
75+
rect.y.baseVal.value = bbox.y;
76+
rect.width.baseVal.value = bbox.width;
77+
rect.height.baseVal.value = bbox.height;
78+
rect.setAttribute('class', className);
79+
addItems.push({
80+
"parent": node.parentNode,
81+
"target": rect});
82+
}
83+
}
84+
}
85+
else if (!jQuery(node).is("button, select, textarea")) {
86+
jQuery.each(node.childNodes, function() {
87+
highlight(this, addItems);
88+
});
89+
}
90+
}
91+
var addItems = [];
92+
var result = this.each(function() {
93+
highlight(this, addItems);
94+
});
95+
for (var i = 0; i < addItems.length; ++i) {
96+
jQuery(addItems[i].parent).before(addItems[i].target);
97+
}
98+
return result;
99+
};
100+
101+
/*
102+
* backward compatibility for jQuery.browser
103+
* This will be supported until firefox bug is fixed.
104+
*/
105+
if (!jQuery.browser) {
106+
jQuery.uaMatch = function(ua) {
107+
ua = ua.toLowerCase();
108+
109+
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
110+
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
111+
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
112+
/(msie) ([\w.]+)/.exec(ua) ||
113+
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
114+
[];
115+
116+
return {
117+
browser: match[ 1 ] || "",
118+
version: match[ 2 ] || "0"
119+
};
120+
};
121+
jQuery.browser = {};
122+
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
123+
}

docs/_static/basic.css

+46-27
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Sphinx stylesheet -- basic theme.
66
*
7-
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
7+
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
88
* :license: BSD, see LICENSE for details.
99
*
1010
*/
@@ -222,7 +222,7 @@ table.modindextable td {
222222
/* -- general body styles --------------------------------------------------- */
223223

224224
div.body {
225-
min-width: 450px;
225+
min-width: 360px;
226226
max-width: 800px;
227227
}
228228

@@ -237,14 +237,8 @@ a.headerlink {
237237
visibility: hidden;
238238
}
239239

240-
a.brackets:before,
241-
span.brackets > a:before{
242-
content: "[";
243-
}
244-
245-
a.brackets:after,
246-
span.brackets > a:after {
247-
content: "]";
240+
a:visited {
241+
color: #551A8B;
248242
}
249243

250244
h1:hover > a.headerlink,
@@ -335,12 +329,16 @@ p.sidebar-title {
335329
font-weight: bold;
336330
}
337331

332+
nav.contents,
333+
aside.topic,
338334
div.admonition, div.topic, blockquote {
339335
clear: left;
340336
}
341337

342338
/* -- topics ---------------------------------------------------------------- */
343339

340+
nav.contents,
341+
aside.topic,
344342
div.topic {
345343
border: 1px solid #ccc;
346344
padding: 7px;
@@ -379,13 +377,17 @@ div.body p.centered {
379377

380378
div.sidebar > :last-child,
381379
aside.sidebar > :last-child,
380+
nav.contents > :last-child,
381+
aside.topic > :last-child,
382382
div.topic > :last-child,
383383
div.admonition > :last-child {
384384
margin-bottom: 0;
385385
}
386386

387387
div.sidebar::after,
388388
aside.sidebar::after,
389+
nav.contents::after,
390+
aside.topic::after,
389391
div.topic::after,
390392
div.admonition::after,
391393
blockquote::after {
@@ -428,10 +430,6 @@ table.docutils td, table.docutils th {
428430
border-bottom: 1px solid #aaa;
429431
}
430432

431-
table.footnote td, table.footnote th {
432-
border: 0 !important;
433-
}
434-
435433
th {
436434
text-align: left;
437435
padding-right: 5px;
@@ -615,19 +613,26 @@ ul.simple p {
615613
margin-bottom: 0;
616614
}
617615

618-
dl.footnote > dt,
619-
dl.citation > dt {
616+
aside.footnote > span,
617+
div.citation > span {
620618
float: left;
621-
margin-right: 0.5em;
622619
}
623-
624-
dl.footnote > dd,
625-
dl.citation > dd {
620+
aside.footnote > span:last-of-type,
621+
div.citation > span:last-of-type {
622+
padding-right: 0.5em;
623+
}
624+
aside.footnote > p {
625+
margin-left: 2em;
626+
}
627+
div.citation > p {
628+
margin-left: 4em;
629+
}
630+
aside.footnote > p:last-of-type,
631+
div.citation > p:last-of-type {
626632
margin-bottom: 0em;
627633
}
628-
629-
dl.footnote > dd:after,
630-
dl.citation > dd:after {
634+
aside.footnote > p:last-of-type:after,
635+
div.citation > p:last-of-type:after {
631636
content: "";
632637
clear: both;
633638
}
@@ -644,10 +649,6 @@ dl.field-list > dt {
644649
padding-right: 5px;
645650
}
646651

647-
dl.field-list > dt:after {
648-
content: ":";
649-
}
650-
651652
dl.field-list > dd {
652653
padding-left: 0.5em;
653654
margin-top: 0em;
@@ -673,6 +674,16 @@ dd {
673674
margin-left: 30px;
674675
}
675676

677+
.sig dd {
678+
margin-top: 0px;
679+
margin-bottom: 0px;
680+
}
681+
682+
.sig dl {
683+
margin-top: 0px;
684+
margin-bottom: 0px;
685+
}
686+
676687
dl > dd:last-child,
677688
dl > dd:last-child > :last-child {
678689
margin-bottom: 0;
@@ -741,6 +752,14 @@ abbr, acronym {
741752
cursor: help;
742753
}
743754

755+
.translated {
756+
background-color: rgba(207, 255, 207, 0.2)
757+
}
758+
759+
.untranslated {
760+
background-color: rgba(255, 207, 207, 0.2)
761+
}
762+
744763
/* -- code displays --------------------------------------------------------- */
745764

746765
pre {

docs/_static/css/badge_only.css

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)