Skip to content

Commit bbc08e8

Browse files
committed
first pass at theme change
1 parent f659908 commit bbc08e8

28 files changed

+490
-295
lines changed

.gitignore

+5-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ _build
66
*.egg-info
77
build/
88
dist/
9-
docs/_build/
10-
docs/build/
11-
docs/jupyter_execute/
129
*.vscode
1310
.coverage
1411
*.jupyterlab-workspace
12+
13+
# Sphinx documentation
14+
docs/build/
15+
docs/jupyter_execute/
16+
docs/source/api/generated/

causalpy/pymc_experiments.py

+1-12
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
"""
15-
Experiment routines for PyMC models.
16-
17-
- ExperimentalDesign base class
18-
- Pre-Post Fit
19-
- Interrupted Time Series
20-
- Synthetic Control
21-
- Difference in differences
22-
- Regression Discontinuity
23-
- Pretest/Posttest Nonequivalent Group Design
24-
25-
"""
14+
"""Quasi-Experiment classes for Bayesian causal inference"""
2615

2716
import warnings # noqa: I001
2817
from typing import Union

causalpy/pymc_models.py

+1-12
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
"""
15-
Defines generic PyMC ModelBuilder class and subclasses for
16-
17-
- WeightedSumFitter model for Synthetic Control experiments
18-
- LinearRegression model
19-
20-
Models are intended to be used from inside an experiment
21-
class (see :doc:`PyMC experiments</api_pymc_experiments>`).
22-
This is why the examples require some extra
23-
manipulation input data, often to ensure `y` has the correct shape.
24-
25-
"""
14+
"""PyMC models"""
2615

2716
from typing import Any, Dict, Optional
2817

causalpy/skl_experiments.py

+1-10
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
"""
15-
Experiments for Scikit-Learn models
16-
17-
- ExperimentalDesign: base class for scikit-learn experiments
18-
- PrePostFit: base class for synthetic control and interrupted time series
19-
- SyntheticControl
20-
- InterruptedTimeSeries
21-
- DifferenceInDifferences
22-
- RegressionDiscontinuity
23-
"""
14+
"""Quasi-Experiment classes for OLS inference"""
2415

2516
import warnings
2617
from typing import Optional

causalpy/skl_models.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
"""
15-
Scikit-Learn Models
16-
17-
- Weighted Proportion
18-
19-
"""
14+
"""Custom scikit-learn models for causal inference"""
2015

2116
from functools import partial
2217

docs/source/_static/custom.css

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/* Make each footer item in-line so they stack horizontally instead of vertically */
2+
.footer-item {
3+
display: inline-block;
4+
}
5+
6+
/* Add a separating border line for all but the last item */
7+
/*
8+
.footer-item:not(:last-child) {
9+
border-right: 1px solid var(--pst-color-text-base);
10+
margin-right: .5em;
11+
padding-right: .5em;
12+
}
13+
*/
14+
15+
.footer-item ul {
16+
list-style: none;
17+
display: flex;
18+
padding-left: 0;
19+
margin-bottom: 0;
20+
}
21+
22+
.footer-item ul li {
23+
padding-right: .5em;
24+
}
25+
26+
.footer-item li a.nav-link {
27+
color: var(--pst-color-text-muted);
28+
}
29+
30+
.footer-item li a.nav-link:hover {
31+
color: var(--pst-color-primary);
32+
text-decoration: none;
33+
}
34+
35+
/* Remove footer icon text for small screen width and increase icons size */
36+
@media (max-width: 660px) {
37+
.footer-item li a.nav-link i {
38+
padding-right: 0.5em;
39+
font-size: calc(var(--bs-body-font-size) * 1.5);
40+
}
41+
42+
.footer-item li a.nav-link span {
43+
font-size: 0;
44+
}
45+
}
46+
47+
footer.bd-footer {
48+
position: static;
49+
bottom: auto;
50+
background: var(--pst-color-on-background) !important;
51+
}
52+
53+
/* Make footer non-sticky when lines start to wrap-around*/
54+
@media (max-width: 520px) {
55+
footer.bd-footer {
56+
position: inherit;
57+
}
58+
}
59+
60+
.causalpy-name {
61+
padding-left: 2rem;
62+
}
63+
64+
@media (min-width: 960px) {
65+
.navbar-center-item {
66+
padding-right: 4em;
67+
}
68+
}
69+
70+
.no-border {
71+
border: none !important;
72+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{{ name | escape | underline}}
2+
3+
.. currentmodule:: {{ module }}
4+
5+
.. auto{{ objtype }}:: {{ objname }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{{ name | escape | underline}}
2+
3+
.. currentmodule:: {{ module }}
4+
5+
.. autoclass:: {{ objname }}
6+
7+
{% block methods %}
8+
{% if methods %}
9+
10+
.. rubric:: Methods
11+
12+
.. autosummary::
13+
:toctree:
14+
15+
{% for item in methods %}
16+
{{ objname }}.{{ item }}
17+
{%- endfor %}
18+
{% endif %}
19+
{% endblock %}
20+
21+
{% block attributes %}
22+
{% if attributes %}
23+
.. rubric:: Attributes
24+
25+
.. autosummary::
26+
{% for item in attributes %}
27+
~{{ name }}.{{ item }}
28+
{%- endfor %}
29+
{% endif %}
30+
{% endblock %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{{ objname | escape | underline}}
2+
3+
.. currentmodule:: {{ module }}
4+
5+
.. auto{{ objtype }}:: {{ objname }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{{ name | escape | underline}}
2+
3+
.. automodule:: {{ fullname }}
4+
5+
{% block attributes %}
6+
{% if attributes %}
7+
.. rubric:: {{ _('Module Attributes') }}
8+
9+
.. autosummary::
10+
{% for item in attributes %}
11+
{{ item }}
12+
{%- endfor %}
13+
{% endif %}
14+
{% endblock %}
15+
16+
{% block functions %}
17+
{% if functions %}
18+
.. rubric:: {{ _('Functions') }}
19+
20+
.. autosummary::
21+
:toctree:
22+
23+
{% for item in functions %}
24+
{{ item }}
25+
{%- endfor %}
26+
{% endif %}
27+
{% endblock %}
28+
29+
{% block classes %}
30+
{% if classes %}
31+
.. rubric:: {{ _('Classes') }}
32+
33+
.. autosummary::
34+
:toctree:
35+
36+
{% for item in classes %}
37+
{{ item }}
38+
{%- endfor %}
39+
{% endif %}
40+
{% endblock %}
41+
42+
{% block exceptions %}
43+
{% if exceptions %}
44+
.. rubric:: {{ _('Exceptions') }}
45+
46+
.. autosummary::
47+
{% for item in exceptions %}
48+
{{ item }}
49+
{%- endfor %}
50+
{% endif %}
51+
{% endblock %}
52+
53+
{% block modules %}
54+
{% if modules %}
55+
.. rubric:: Modules
56+
57+
.. autosummary::
58+
:toctree:
59+
:recursive:
60+
{% for item in modules %}
61+
{{ item }}
62+
{%- endfor %}
63+
{% endif %}
64+
{% endblock %}
+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<ul>
2+
3+
<li class="nav-item">
4+
<a class="nav-link" href="https://twitter.com/pymc_labs">
5+
<i class="fa-brands fa-twitter" aria-hidden="true"></i>
6+
<span>Twitter</span>
7+
</a>
8+
</li>
9+
10+
<li class="nav-item">
11+
<a class="nav-link" href="https://github.com/pymc-labs">
12+
<i class="fa-brands fa-github" aria-hidden="true"></i>
13+
<span>Github</span>
14+
</a>
15+
</li>
16+
17+
<li class="nav-item">
18+
<a class="nav-link" href="https://www.linkedin.com/company/pymc-labs/">
19+
<i class="fa-brands fa-linkedin" aria-hidden="true"></i>
20+
<span>LinkedIn</span>
21+
</a>
22+
</li>
23+
24+
<li class="nav-item">
25+
<a class="nav-link" href="https://www.youtube.com/c/PyMCLabs">
26+
<i class="fa-brands fa-youtube" aria-hidden="true"></i>
27+
<span>YouTube</span>
28+
</a>
29+
</li>
30+
31+
<li class="nav-item">
32+
<a class="nav-link" href="https://www.meetup.com/pymc-labs-online-meetup/">
33+
<i class="fa-brands fa-meetup" aria-hidden="true"></i>
34+
<span>Meetup</span>
35+
</a>
36+
</li>
37+
38+
</ul>
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<div class="causalpy-name">{{ project }} {{ version }}</div>

docs/source/api/index.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# API
2+
3+
## Modules
4+
```{eval-rst}
5+
.. currentmodule:: causalpy
6+
.. autosummary::
7+
:recursive:
8+
:toctree: generated/
9+
10+
data
11+
pymc_experiments
12+
pymc_models
13+
skl_experiments
14+
skl_models
15+
```

docs/source/api_datasets.rst

-9
This file was deleted.

docs/source/api_plot_utils.rst

-9
This file was deleted.

docs/source/api_pymc_experiments.rst

-10
This file was deleted.

docs/source/api_pymc_models.rst

-9
This file was deleted.

docs/source/api_skl_experiments.rst

-9
This file was deleted.

docs/source/api_skl_models.rst

-9
This file was deleted.

0 commit comments

Comments
 (0)