Skip to content

Commit ef3011c

Browse files
authored
SEO Optimizations (#107)
* Improve SEO and add FAQ to docs. Signed-off-by: Vivek Joshy <8206808+vivekjoshy@users.noreply.github.com> * Format with black Signed-off-by: Vivek Joshy <8206808+vivekjoshy@users.noreply.github.com> * Format ipynb files with Black Signed-off-by: Vivek Joshy <8206808+vivekjoshy@users.noreply.github.com> --------- Signed-off-by: Vivek Joshy <8206808+vivekjoshy@users.noreply.github.com>
1 parent a7b9058 commit ef3011c

File tree

16 files changed

+1771
-160
lines changed

16 files changed

+1771
-160
lines changed

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ version: 2
77

88
# Set the version of Python and other tools you might need
99
build:
10-
os: ubuntu-20.04
10+
os: ubuntu-22.04
1111
tools:
1212
python: "3.11"
1313

CONTRIBUTORS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Contributors
1+
# Contributors
22

33
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
44

docs/doc_requires.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
sphinx~=7.0
2-
shibuya~=2023.3
2+
nbsphinx~=0.9
33
pygments~=2.15
4+
shibuya~=2023.3
5+
ipykernel~=6.25
46
myst_parser~=2.0 # Must Be Underscore, not Hyphen
57
sphinx-intl~=2.1
68
sphinx_favicon~=1.0

docs/source/_static/css/custom.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ html.dark {
2626
0 -4px 8px 0 rgba(0, 0, 0, 0.2);
2727
--docsearch-logo-color: rgb(255, 255, 255);
2828
--docsearch-muted-color: rgb(127, 132, 151);
29+
30+
/* NB SPHINX */
31+
--dataframe-tr: #0a0a0a
2932
}
3033

3134
html.light {
@@ -72,4 +75,16 @@ html.light {
7275
--docsearch-footer-background: #fff;
7376
--docsearch-footer-shadow: 0 -1px 0 0 rgb(224, 227, 232),
7477
0 -3px 6px 0 rgba(69, 98, 155, 0.12);
78+
79+
--dataframe-tr: #f5f5f5;
80+
}
81+
82+
83+
/* NB Sphinx */
84+
.jp-RenderedHTMLCommon tbody, div.rendered_html tbody {
85+
color: var(--sy-c-text);
86+
}
87+
88+
.jp-RenderedHTMLCommon tbody tr:nth-child(odd), div.rendered_html tbody tr:nth-child(odd) {
89+
background: var(--dataframe-tr) !important;
7590
}

docs/source/_templates/base.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{% extends "!base.html" %}
2+
3+
{% block htmltitle %}
4+
<!-- Google Tag Manager -->
5+
<script>
6+
<!-- Google Tag Manager -->
7+
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
8+
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
9+
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
10+
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
11+
})(window,document,'script','dataLayer','GTM-N57WGC8D');</script>
12+
<!-- End Google Tag Manager -->
13+
</script>
14+
<!-- End Google Tag Manager -->
15+
{{ super() }}
16+
{% endblock %}
17+
18+
{% block document %}
19+
<!-- Google Tag Manager (noscript) -->
20+
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-N57WGC8D"
21+
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
22+
<!-- End Google Tag Manager (noscript) -->
23+
{{ super() }}
24+
{%- endblock -%}

docs/source/api/openskill/models/weng_lin/bradley_terry_full/index.rst

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Classes
3939

4040
:param mu: Represents the initial belief about the skill of
4141
a player before any matches have been played. Known
42-
mostly as the mean of the Gaussian prior distribution.
42+
mostly as the mean of the Guassian prior distribution.
4343

4444
*Represented by:* :math:`\mu`
4545

@@ -89,7 +89,7 @@ Classes
8989
A_q = |\{s: r(s) = r(q)\}|, q = 1,...,k
9090
9191
:param team_ratings: The whole rating of a list of teams in a game.
92-
:return: A list of integers.
92+
:return: A list of Decimals.
9393

9494

9595
.. py:method:: _c(team_ratings)
@@ -123,7 +123,7 @@ Classes
123123
:return: A list of ranks for each team in the game.
124124

125125

126-
.. py:method:: _calculate_team_ratings(game, ranks = None, scores = None)
126+
.. py:method:: _calculate_team_ratings(game, ranks = None)
127127
128128
Get the team ratings of a game.
129129

@@ -132,8 +132,6 @@ Classes
132132

133133
:param ranks: A list of ranks for each team in the game.
134134

135-
:param scores: A list of scores for each team in the game.
136-
137135
:return: A list of :class:`BradleyTerryFullTeamRating` objects.
138136

139137

@@ -162,7 +160,7 @@ Classes
162160

163161
:param c: The square root of the collective team sigma.
164162

165-
:return: A list of integers.
163+
:return: A list of Decimals.
166164

167165

168166
.. py:method:: create_rating(rating, name = None)
@@ -219,12 +217,11 @@ Classes
219217
:param teams: A list of teams where each team is a list of
220218
:class:`BradleyTerryFullRating` objects.
221219

222-
:param ranks: A list of integers where the lower values
220+
:param ranks: A list of Decimals where the lower values
223221
represent winners.
224222

225-
:param scores: A list of integers where higher values
226-
represent winners. Will be used to incorporate
227-
margin of victory into the model.
223+
:param scores: A list of Decimals where higher values
224+
represent winners.
228225

229226
:param tau: Additive dynamics parameter that prevents sigma from
230227
getting too small to increase rating change volatility.
@@ -236,15 +233,15 @@ Classes
236233
:class:`BradleyTerryFullRating` objects.
237234

238235

239-
.. py:method:: rating(mu = None, sigma = None, weight = 1.0, name = None)
236+
.. py:method:: rating(mu = None, sigma = None, name = None)
240237
241238
Returns a new rating object with your default parameters. The given
242239
parameters can be overriden from the defaults provided by the main
243240
model, but is not recommended unless you know what you are doing.
244241

245242
:param mu: Represents the initial belief about the skill of
246243
a player before any matches have been played. Known
247-
mostly as the mean of the Gaussian prior distribution.
244+
mostly as the mean of the Guassian prior distribution.
248245

249246
*Represented by:* :math:`\mu`
250247

@@ -254,16 +251,13 @@ Classes
254251
where :math:`z` is an integer that represents the
255252
variance of the skill of a player.
256253

257-
:param weight: The weight of the player. This is used to determine
258-
the contribution of the player to the team's score.
259-
260254
:param name: Optional name for the player.
261255

262256
:return: :class:`BradleyTerryFullRating` object
263257

264258

265259

266-
.. py:class:: BradleyTerryFullRating(mu, sigma, weight = 1.0, name = None)
260+
.. py:class:: BradleyTerryFullRating(mu, sigma, name = None)
267261
268262
269263
Bradley-Terry Full Pairing player rating data.
@@ -272,7 +266,7 @@ Classes
272266

273267
:param mu: Represents the initial belief about the skill of
274268
a player before any matches have been played. Known
275-
mostly as the mean of the Gaussian prior distribution.
269+
mostly as the mean of the Guassian prior distribution.
276270

277271
*Represented by:* :math:`\mu`
278272

@@ -282,9 +276,6 @@ Classes
282276
where :math:`z` is an integer that represents the
283277
variance of the skill of a player.
284278

285-
:param weight: The weight of the player. This is used to determine
286-
the contribution of the player to the team's score.
287-
288279
:param name: Optional name for the player.
289280

290281
.. py:method:: ordinal(z = 3.0)

docs/source/api/openskill/models/weng_lin/bradley_terry_part/index.rst

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Classes
8989
A_q = |\{s: r(s) = r(q)\}|, q = 1,...,k
9090
9191
:param team_ratings: The whole rating of a list of teams in a game.
92-
:return: A list of integers.
92+
:return: A list of Decimals.
9393

9494

9595
.. py:method:: _c(team_ratings)
@@ -123,7 +123,7 @@ Classes
123123
:return: A list of ranks for each team in the game.
124124

125125

126-
.. py:method:: _calculate_team_ratings(game, ranks = None, scores = None)
126+
.. py:method:: _calculate_team_ratings(game, ranks = None)
127127
128128
Get the team ratings of a game.
129129

@@ -132,8 +132,6 @@ Classes
132132

133133
:param ranks: A list of ranks for each team in the game.
134134

135-
:param scores: A list of scores for each team in the game.
136-
137135
:return: A list of :class:`BradleyTerryPartTeamRating` objects.
138136

139137

@@ -162,7 +160,7 @@ Classes
162160

163161
:param c: The square root of the collective team sigma.
164162

165-
:return: A list of integers.
163+
:return: A list of Decimals.
166164

167165

168166
.. py:method:: create_rating(rating, name = None)
@@ -219,10 +217,10 @@ Classes
219217
:param teams: A list of teams where each team is a list of
220218
:class:`BradleyTerryPartRating` objects.
221219

222-
:param ranks: A list of integers where the lower values
220+
:param ranks: A list of Decimals where the lower values
223221
represent winners.
224222

225-
:param scores: A list of integers where higher values
223+
:param scores: A list of Decimals where higher values
226224
represent winners.
227225

228226
:param tau: Additive dynamics parameter that prevents sigma from

docs/source/api/openskill/models/weng_lin/plackett_luce/index.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Classes
9090
A_q = |\{s: r(s) = r(q)\}|, q = 1,...,k
9191
9292
:param team_ratings: The whole rating of a list of teams in a game.
93-
:return: A list of integers.
93+
:return: A list of Decimals.
9494

9595

9696
.. py:method:: _c(team_ratings)
@@ -160,7 +160,7 @@ Classes
160160

161161
:param c: The square root of the collective team sigma.
162162

163-
:return: A list of integers.
163+
:return: A list of Decimals.
164164

165165

166166
.. py:method:: create_rating(rating, name = None)
@@ -217,10 +217,10 @@ Classes
217217
:param teams: A list of teams where each team is a list of
218218
:class:`PlackettLuceRating` objects.
219219

220-
:param ranks: A list of integers where the lower values
220+
:param ranks: A list of Decimals where the lower values
221221
represent winners.
222222

223-
:param scores: A list of integers where higher values
223+
:param scores: A list of Decimals where higher values
224224
represent winners.
225225

226226
:param tau: Additive dynamics parameter that prevents sigma from

docs/source/api/openskill/models/weng_lin/thurstone_mosteller_full/index.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Classes
9090
A_q = |\{s: r(s) = r(q)\}|, q = 1,...,k
9191
9292
:param team_ratings: The whole rating of a list of teams in a game.
93-
:return: A list of integers.
93+
:return: A list of Decimals.
9494

9595

9696
.. py:method:: _c(team_ratings)
@@ -161,7 +161,7 @@ Classes
161161

162162
:param c: The square root of the collective team sigma.
163163

164-
:return: A list of integers.
164+
:return: A list of Decimals.
165165

166166

167167
.. py:method:: create_rating(rating, name = None)
@@ -218,10 +218,10 @@ Classes
218218
:param teams: A list of teams where each team is a list of
219219
:class:`ThurstoneMostellerFullRating` objects.
220220

221-
:param ranks: A list of integers where the lower values
221+
:param ranks: A list of Decimals where the lower values
222222
represent winners.
223223

224-
:param scores: A list of integers where higher values
224+
:param scores: A list of Decimals where higher values
225225
represent winners.
226226

227227
:param tau: Additive dynamics parameter that prevents sigma from

docs/source/api/openskill/models/weng_lin/thurstone_mosteller_part/index.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Classes
9191
A_q = |\{s: r(s) = r(q)\}|, q = 1,...,k
9292
9393
:param team_ratings: The whole rating of a list of teams in a game.
94-
:return: A list of integers.
94+
:return: A list of Decimals.
9595

9696

9797
.. py:method:: _c(team_ratings)
@@ -162,7 +162,7 @@ Classes
162162

163163
:param c: The square root of the collective team sigma.
164164

165-
:return: A list of integers.
165+
:return: A list of Decimals.
166166

167167

168168
.. py:method:: create_rating(rating, name = None)
@@ -219,10 +219,10 @@ Classes
219219
:param teams: A list of teams where each team is a list of
220220
:class:`ThurstoneMostellerPartRating` objects.
221221

222-
:param ranks: A list of integers where the lower values
222+
:param ranks: A list of Decimals where the lower values
223223
represent winners.
224224

225-
:param scores: A list of integers where higher values
225+
:param scores: A list of Decimals where higher values
226226
represent winners.
227227

228228
:param tau: Additive dynamics parameter that prevents sigma from

0 commit comments

Comments
 (0)