-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update from original (#1) #558
Conversation
* Added basic inequality mesasures: lorenz curve and gini Tests added, passed nosetests * Add jitted newton methods for root finding Based on Scipy's newton methods, we add two variants of newton root finding - Newton Raphson and secant method. All methods are jitted through Numba with nopython mode. Relevant information (apart from the root) is also returned in the result as python namedtuple since Numba supports it. * Add test cases for newton methods * Add newton halley method and modify returning The third and last newton method for root finding is now added with its test cases. Each newton method is modified to include only a single return statement. * EHN: Add `qhull_options` to `game_theory.vertex_enumeration` * Add bisection and brent's method for root finding I added two jitted robust root finding methods: Bisection and Brentq which are based on Scipy's version which is written in C. They both follow the previous jitted root finding procedures by returning a namedtuple with relevant information. I also added a basic test for each method. * Fix import to list items * Add default args in docstring and Format code I have included optional default arguments in the docstring of all functions. All trailing whitespaces are now fixed conforming to PEP8. The check is done via pycodestyle and http://pep8online.com/. * initial commit of dle code from Sebastian Graves * adjustments for package * update to new rtd requirements spec * add reference to environment spec * test use of pip requirements file instead of conda * remove old yml config for rtd-environment, consolidate on pip-requirements for now * DOC: Add doc entry for root_finding * increment version to 0.4.0 * updating auto-generated CHANGELOG * add v0.4.0 summary to README * fix badge link for RTD * update code with docstrings * remove pylab imports * move from pylab Matrix to np.matrix * update to use nullspace from quantecon * correct algebra for use of quantecon nullspace method * Add LGTM.com code quality badges * add test for transformation of problem to LQ type problem using known solutions verified by matlab programs * reduce line lengths in docstrings * revert use of quantecon nullspace as representations are not exactly the same ... need to investigate * migrate to using quantecon nullspace method * fix test for steadystate * add atol for comparing small values * add test for canonical * add dle to documentation * DOC: Fix the doc of `root_finding.py` to display nicely * Release of version 0.4.1 * Add AS algorithm. * FIX: Force tuple elements to have the same dtype Fix QuantEcon#434 * Remove `from future import ...` * Add method option in robustlq.py * Modify variable names. * Modify `intersection` and `find_C`. * Incorporate with `RepeatedGame` class. * Compare vertex values in the test. * Changed gini from class to function to simplify the use of numba * fix docstring of x_hat in Kalman class * Add docstrings. * Fix issue#367 * revise 'Fix issue#367' * Revise 'Fix QuantEcon#367' again * Revise 'Fix issue#367' again * Change docs to reflect changes from object to function * fix brent_max docstring * FEAT: Add Nelder-Mead algorithm - Jitting is commented out for generating coverage report * Uncomment `@njit` * FIX: Disallow 0 actions * FIX: is_dominated: Return False if num_actions == 1 * Add Player.delete_action * Add NormalFormGame.delete_action * FIX: solve the bug of cached keyword `u`. * Minor fixes * Modify docstrings. * FIX: change keyword 'u' to 'u_init' in test. * FIX: minor modifications. * Use `equilibrium_payoffs` interface. * FIX: minor modification of docstrings. * Minor modifications of docstrings. * Modification of `_best_dev_gains`. * Release version 0.4.2 * update CHANGELOG for 0.4.2 release * FIX: test `method` keyword of `RepeatedGame.equilibrium_payoffs()`. * Add Shorrock inequality index * add mobility to description * add docs * Travis: Add macOS to the build matrix * Travis: Add miniconda cache * TestTicTacToc: Skip test_loop and test_timer for darwin * Add error for invalid inputs * Fix warning in test_pure_nash * README: Update coveralls badge to use svg * update documentation * update RST in nelder mead docstring * tests/util: Remove old merge resolution * fix docstring in inequality * update to use inline math * fix typo * restore to initial displaymath * Travis: Move dependency installs with wheels available to pip * Travis: Remove miniconda cache * Travis: Move statsmodels to pip * Travis: Move pytables to pip since it requires numpy * discrete_rv: Remove unused import * Isolate rtd-specific requirements to doc-requirements.txt * fix inequality docs * add raw flag * quad: Import sympy only when necessary * util.notebooks: Import requests only when necessary * pip-requirements: Remove unused statsmodels import * Travis: Disable performance tests They should be run only from time to time, e.g. between releases, or when the commit specifically states the perf modification of the relevant code. * random.utilities: Cache guvectorize * quantecon.arma: Import scipy.signal functions only when necessary * fix for lorenz documentation * add matplotlib import * remove matplotlib * Release for version 0.4.3 * Update generated CHANGELOG for 0.4.3 * quantecon/tests: Fix F401 unused imports * quantecon/util: Fix F401 unused imports * quantecon/markov: Fix F401 unused imports * quantecon.arma: Fix F401 unused imports * quantecon/optimize: Fix F401 unused imports * quantecon/game_theory: Fix F401 unused imports * Disable flake8 on __init__.py files * Travis: Do F401 check before running the tests * TEST: Fix the names of tests for `brent_max` * DOC: Update example for `nelder_mead` * Apply `autopep8 -ir --select E501 quantecon/util` * Fix all E231 errors * Travis: Add E231 check * Apply `autopep8 -ir --select E501 quantecon` * Fix all F405 error and check on Travis * Fix some of F841 errors * lss: Fix formatting of a ValueError * add matplotlib to environment * specify matplotlib lts release * fix syntax * Delete the unnecessary assignment in quantecon/estepec.py * Delete the unnecessary assignment in quantecon/compute_fp.py * Delete the unnecessary assignment in quantecon/repeated_game.py * FIX: Raise correct error when `A` is not square in `LinearStateSpace` * Add random_pure_actions and random_mixed_actions and related tests. * Fix `sample_without_replacement` using guvectorize * FIX: Import scipy.sparse.linalg Fix QuantEcon#481 * Add drift term keyword to `markov.tauchen`. * Release of version 0.4.4 * FIX: DOC: Remove `matplotlib.sphinxext.only_directives` * FIX: DOC: Fix Examples section in `brent_max` * TRAVIS: Set coverage branch. * increase `tol` in `rouwenhorst` test. * Add LQMarkov. * update version number * update major changes in README * add newline for PEP8 * Release of version 0.4.5 * update travis to python=3.7 * update distribution to xenial * FIX: bug of computing state values in the last period of `LQMarkov` model * FIX: avoid solving stationary values for multiple times * FIX: random.draw: Replace `random_sample` with `random` Fix QuantEcon#502 * FIX: Player.is_dominated: Fix warnings Fix QuantEcon#501 * EHN: Player.is_dominated: Add `'revised simplex'` method For SciPy >= 1.3.0 * FIX: Fix RuntimeWarning in lq_control.py * FIX: Fix RuntimeWarning in ivp.py * FIX: Fix Pandas related FutureWarnings in test_quad.py. * Raise value error if C != 0 and beta >= 1. * Tweak assignment of beta in test_robustlq.py to prevent test failiures. * Fix PEP8 Indent Error. * Edit assignment of beta in test_robustlq.py.
Hello @daniel-schaefer! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:
|
hey @daniel-schaefer thanks for this PR! There are some great changes in here. Given the large number of proposed changes it will take some time to review it. Usually it is best to break changes into smaller chunks that address a single issue -- and setup multiple PRs. That way review for some items doesn't hold up others and we can merge the easy ones straight away. I will update a It's late here -- so I will take a closer look tomorrow. |
@daniel-schaefer would you be able to fetch the latest |
Wow @daniel-schaefer , this is huge! Thank you!! I noticed you are in Linz. It looks beautiful. And your research on wage inequality looks interesting. With these kinds of contributions, the best method is to open a whole lot of PRs, one for each separate topic. This is partly because a big contribution is hard to review in a timely way --- in which case merge conflicts and other issues will arise --- and partly because it's small changes requested in some parts will delay merging good code. I hate to ask this of you, given all this great work, but I also want to conform to best practice and make sure we do the best work possible, so might you be willing to close this PR and then start to open small PRs, usually involving only one topic / one or two files, so we can merge progressively? With each PR, it's really helpful if you can provide a bit of background in the discussion on the PR. |
Hello @jstac thanks, Linz is really beautiful. Hopefully you can come and visit some day once the travel restrictions are lifted. Sure, I'll close the PR - should have put more thought into it. Best wishes, |
Thanks @daniel-schaefer , I'll definitely be looking forward to seeing your new PRs. |
thanks @daniel-schaefer -- looking forward to the new PRs also. There are some great changes in there. |
@daniel-schaefer would love some of these changes brought in via PR if you have time to set them up (based on features, improvements etc.). Let me know if I can assist with this in any way. There were some great improvements in that change set. |
Tests added, passed nosetests
Based on Scipy's newton methods, we add two variants of newton root
finding - Newton Raphson and secant method. All methods are jitted
through Numba with nopython mode. Relevant information (apart from the
root) is also returned in the result as python namedtuple since Numba
supports it.
Add test cases for newton methods
Add newton halley method and modify returning
The third and last newton method for root finding is now added with its
test cases. Each newton method is modified to include only a single
return statement.
EHN: Add
qhull_options
togame_theory.vertex_enumeration
Add bisection and brent's method for root finding
I added two jitted robust root finding methods: Bisection and Brentq
which are based on Scipy's version which is written in C. They both
follow the previous jitted root finding procedures by returning a
namedtuple with relevant information.
I also added a basic test for each method.
Fix import to list items
Add default args in docstring and Format code
I have included optional default arguments in the docstring of all
functions.
All trailing whitespaces are now fixed conforming to PEP8. The check is
done via pycodestyle and http://pep8online.com/.
initial commit of dle code from Sebastian Graves
adjustments for package
update to new rtd requirements spec
add reference to environment spec
test use of pip requirements file instead of conda
remove old yml config for rtd-environment, consolidate on pip-requirements for now
DOC: Add doc entry for root_finding
increment version to 0.4.0
updating auto-generated CHANGELOG
add v0.4.0 summary to README
fix badge link for RTD
update code with docstrings
remove pylab imports
move from pylab Matrix to np.matrix
update to use nullspace from quantecon
correct algebra for use of quantecon nullspace method
Add LGTM.com code quality badges
add test for transformation of problem to LQ type problem using known solutions verified by matlab programs
reduce line lengths in docstrings
revert use of quantecon nullspace as representations are not exactly the same ... need to investigate
migrate to using quantecon nullspace method
fix test for steadystate
add atol for comparing small values
add test for canonical
add dle to documentation
DOC: Fix the doc of
root_finding.py
to display nicelyRelease of version 0.4.1
Add AS algorithm.
FIX: Force tuple elements to have the same dtype
Fix #434
Remove
from future import ...
Add method option in robustlq.py
Modify variable names.
Modify
intersection
andfind_C
.Incorporate with
RepeatedGame
class.Compare vertex values in the test.
Changed gini from class to function to simplify the use of numba
fix docstring of x_hat in Kalman class
Add docstrings.
Fix issue#367
revise 'Fix issue#367'
Revise 'Fix kalman.py: Add
method
option #367' againRevise 'Fix issue#367' again
Change docs to reflect changes from object to function
fix brent_max docstring
FEAT: Add Nelder-Mead algorithm
Uncomment
@njit
FIX: Disallow 0 actions
FIX: is_dominated: Return False if num_actions == 1
Add Player.delete_action
Add NormalFormGame.delete_action
FIX: solve the bug of cached keyword
u
.Minor fixes
Modify docstrings.
FIX: change keyword 'u' to 'u_init' in test.
FIX: minor modifications.
Use
equilibrium_payoffs
interface.FIX: minor modification of docstrings.
Minor modifications of docstrings.
Modification of
_best_dev_gains
.Release version 0.4.2
update CHANGELOG for 0.4.2 release
FIX: test
method
keyword ofRepeatedGame.equilibrium_payoffs()
.Add Shorrock inequality index
add mobility to description
add docs
Travis: Add macOS to the build matrix
Travis: Add miniconda cache
TestTicTacToc: Skip test_loop and test_timer for darwin
Add error for invalid inputs
Fix warning in test_pure_nash
README: Update coveralls badge to use svg
update documentation
update RST in nelder mead docstring
tests/util: Remove old merge resolution
fix docstring in inequality
update to use inline math
fix typo
restore to initial displaymath
Travis: Move dependency installs with wheels available to pip
Travis: Remove miniconda cache
Travis: Move statsmodels to pip
Travis: Move pytables to pip since it requires numpy
discrete_rv: Remove unused import
Isolate rtd-specific requirements to doc-requirements.txt
fix inequality docs
add raw flag
quad: Import sympy only when necessary
util.notebooks: Import requests only when necessary
pip-requirements: Remove unused statsmodels import
Travis: Disable performance tests
They should be run only from time to time, e.g. between releases, or
when the commit specifically states the perf modification of the
relevant code.
random.utilities: Cache guvectorize
quantecon.arma: Import scipy.signal functions only when necessary
fix for lorenz documentation
add matplotlib import
remove matplotlib
Release for version 0.4.3
Update generated CHANGELOG for 0.4.3
quantecon/tests: Fix F401 unused imports
quantecon/util: Fix F401 unused imports
quantecon/markov: Fix F401 unused imports
quantecon.arma: Fix F401 unused imports
quantecon/optimize: Fix F401 unused imports
quantecon/game_theory: Fix F401 unused imports
Disable flake8 on init.py files
Travis: Do F401 check before running the tests
TEST: Fix the names of tests for
brent_max
DOC: Update example for
nelder_mead
Apply
autopep8 -ir --select E501 quantecon/util
Fix all E231 errors
Travis: Add E231 check
Apply
autopep8 -ir --select E501 quantecon
Fix all F405 error and check on Travis
Fix some of F841 errors
lss: Fix formatting of a ValueError
add matplotlib to environment
specify matplotlib lts release
fix syntax
Delete the unnecessary assignment in quantecon/estepec.py
Delete the unnecessary assignment in quantecon/compute_fp.py
Delete the unnecessary assignment in quantecon/repeated_game.py
FIX: Raise correct error when
A
is not square inLinearStateSpace
Add random_pure_actions and random_mixed_actions and related tests.
Fix
sample_without_replacement
using guvectorizeFIX: Import scipy.sparse.linalg
Fix #481
Add drift term keyword to
markov.tauchen
.Release of version 0.4.4
FIX: DOC: Remove
matplotlib.sphinxext.only_directives
FIX: DOC: Fix Examples section in
brent_max
TRAVIS: Set coverage branch.
increase
tol
inrouwenhorst
test.Add LQMarkov.
update version number
update major changes in README
add newline for PEP8
Release of version 0.4.5
update travis to python=3.7
update distribution to xenial
FIX: bug of computing state values in the last period of
LQMarkov
modelFIX: avoid solving stationary values for multiple times
FIX: random.draw: Replace
random_sample
withrandom
Fix #502
Fix #501
'revised simplex'
methodFor SciPy >= 1.3.0
FIX: Fix RuntimeWarning in lq_control.py
FIX: Fix RuntimeWarning in ivp.py
FIX: Fix Pandas related FutureWarnings in test_quad.py.
Raise value error if C != 0 and beta >= 1.
Tweak assignment of beta in test_robustlq.py to prevent test failiures.
Fix PEP8 Indent Error.
Edit assignment of beta in test_robustlq.py.