Skip to content

Commit

Permalink
Release 2.1.0 (#412)
Browse files Browse the repository at this point in the history
  • Loading branch information
amageh committed Jun 2, 2021
1 parent ffb74aa commit 9a009af
Show file tree
Hide file tree
Showing 9 changed files with 92 additions and 689 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repos:
- id: debug-statements
- id: end-of-file-fixer
- repo: https://github.com/asottile/pyupgrade
rev: v2.18.2
rev: v2.19.0
hooks:
- id: pyupgrade
args: [--py36-plus]
Expand All @@ -19,7 +19,7 @@ repos:
hooks:
- id: reorder-python-imports
- repo: https://github.com/psf/black
rev: 21.5b1
rev: 21.5b2
hooks:
- id: black
- repo: https://github.com/asottile/blacken-docs
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
author = "The respy Development Team"

# The full version, including alpha/beta/rc tags.
release = "2.0.0"
release = "2.1.0"
version = ".".join(release.split(".")[:2])

# -- General configuration ------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/development/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ for contributors.
<div class="card-body flex-fill">
<h5 class="card-title">Releases</h5>
<p class="card-text">
Informatio on version numbering and how
Information on version numbering and how
to release a new version.
</p>
</div>
Expand Down
4 changes: 2 additions & 2 deletions docs/how_to_guides/how_to_likelihood.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@
" <span class=\"badge badge-info\">How-to Guide</span>\n",
"\n",
" To learn more about the model options see the guide <a\n",
" href=\"how_to_specify_model.html\">Specfiying a Model</a>.\n",
" href=\"how_to_specify_model.html\">Specifying a Model</a>.\n",
"</div>"
]
},
Expand Down Expand Up @@ -350,7 +350,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.10"
"version": "3.8.3"
}
},
"nbformat": 4,
Expand Down
42 changes: 28 additions & 14 deletions docs/how_to_guides/how_to_msm_estimation_exercise.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,22 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Setup Estimation\n",
"\n",
"## Setup Estimation"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-info\">\n",
"**Note:** This guide was created using version 0.0.31 of estimagic and version 2.0.0 of respy. Please note that the guide is not updated regularly so using newer versions of the packages may require adjustments to the code.\n",
"</div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Configure MSM Inputs"
]
},
Expand Down Expand Up @@ -906,7 +920,7 @@
" replace_nans=replace_nans,\n",
" empirical_moments=empirical_moments,\n",
" weighting_matrix=weighting_matrix,\n",
" return_scalar=False,\n",
" return_simulated_moments=True,\n",
")"
]
},
Expand All @@ -928,8 +942,8 @@
" fig, axes = plt.subplots(3, 2, figsize=(12, 10))\n",
" axes = axes.ravel()\n",
" for i, key in enumerate(params_dict):\n",
" out = get_simulated_moments(params_dict[key])\n",
" out[\"simulated_moments\"][moment_set].plot(ax=axes[i], title=key, ylim=[ymin, ymax])\n",
" _, moments = get_simulated_moments(params_dict[key])\n",
" moments[moment_set].plot(ax=axes[i], title=key, ylim=[ymin, ymax])\n",
" plt.tight_layout()\n",
"\n",
" empirical_moments[moment_set].plot(ax=axes[4], title=\"Observed\", ylim=[ymin, ymax])\n",
Expand Down Expand Up @@ -1047,7 +1061,7 @@
"metadata": {},
"outputs": [],
"source": [
"out = get_simulated_moments(params_dict[\"(4) Final result\"])"
"_, simulated_moments = get_simulated_moments(params_dict[\"(4) Final result\"])"
]
},
{
Expand All @@ -1060,7 +1074,7 @@
"source": [
"diff = {}\n",
"diff[\"Choice Frequencies\"] = (\n",
" empirical_moments[\"Choice Frequencies\"] - out[\"simulated_moments\"][\"Choice Frequencies\"]\n",
" empirical_moments[\"Choice Frequencies\"] - simulated_moments[\"Choice Frequencies\"]\n",
")"
]
},
Expand All @@ -1078,7 +1092,7 @@
"outputs": [],
"source": [
"diff[\"Wage Distribution\"] = (\n",
" empirical_moments[\"Wage Distribution\"] - out[\"simulated_moments\"][\"Wage Distribution\"]\n",
" empirical_moments[\"Wage Distribution\"] - simulated_moments[\"Wage Distribution\"]\n",
") / empirical_moments[\"Wage Distribution\"]"
]
},
Expand Down Expand Up @@ -1296,7 +1310,7 @@
"metadata": {},
"outputs": [],
"source": [
"out = get_simulated_moments(rslt_constants[1])"
"_, simulated_moments = get_simulated_moments(rslt_constants[1])"
]
},
{
Expand All @@ -1311,10 +1325,10 @@
" title=\"Choices Empirical\", ax=axes[0, 0]\n",
" )\n",
" empirical_moments[\"Wage Distribution\"].plot(title=\"Wages Empirical\", ax=axes[0, 1])\n",
" out[\"simulated_moments\"][\"Choice Frequencies\"].plot(\n",
" simulated_moments[\"Choice Frequencies\"].plot(\n",
" title=\"Choices Simulated\", ax=axes[1, 0]\n",
" )\n",
" out[\"simulated_moments\"][\"Wage Distribution\"].plot(title=\"Wages Simulated\", ax=axes[1, 1])"
" simulated_moments[\"Wage Distribution\"].plot(title=\"Wages Simulated\", ax=axes[1, 1])"
]
},
{
Expand Down Expand Up @@ -1412,7 +1426,7 @@
"metadata": {},
"outputs": [],
"source": [
"out = get_simulated_moments(rslt_refined[1])"
"_, simulated_moments = get_simulated_moments(rslt_refined[1])"
]
},
{
Expand All @@ -1434,7 +1448,7 @@
}
],
"source": [
"plot_all_moments(empirical_moments, out[\"simulated_moments\"])"
"plot_all_moments(empirical_moments, simulated_moments)"
]
},
{
Expand Down Expand Up @@ -1491,7 +1505,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.10"
"version": "3.8.3"
},
"toc": {
"base_numbering": 1,
Expand Down

0 comments on commit 9a009af

Please sign in to comment.