Conversation
|
Hello @shizejin! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2019-07-05 03:58:57 UTC |
quantecon/lqcontrol.py
Outdated
| deterministic (and :math:`C` is set to a zero matrix of appropriate | ||
| dimension). | ||
|
|
||
| The optiaml value function :math:`V(x_t, s_t)` takes the form |
quantecon/lqcontrol.py
Outdated
|
|
||
| def __init__(self, Π, Qs, Rs, As, Bs, Cs=None, Ns=None, beta=1): | ||
|
|
||
| # == Make sure all matrices can be treated as 3D arrays == # |
There was a problem hiding this comment.
Here I was trying to see that all the arrays (Qs, Rs, etc.) consist of 2d arrays, but I guess it is confusing. Would "Make sure all matrices for each state are 2D arrays" be a little better?
There was a problem hiding this comment.
No, I just mean this: In your comment on line 423, you say 3D but do you actually intend to say 2D?
There was a problem hiding this comment.
I actually intended to say 3D since I was referring to the shape of Qs array (and Rs etc.) and Qs has shape m (number of Markov states) x n (number of state variables) x n, but after you pointed this out, I realized Qs is not a matrix and saying "matrices are 3D arrays" does not make any sense.. so I think maybe the comment I proposed above would be a little more clear
|
Beautifully written code. Great work @shizejin Regarding suggestions 1--2, let's wait and see if there's demand before we make those changes (but thanks for the suggestions). Rather than those additions, please have a think about the tests and see if you can keep coverage high. |
3e75ac6 to
dcad72a
Compare
|
Hi @jstac, I added more tests and the newly added lines in 4 changed files are fully covered. I think this is ready to be merged :) |
|
Thanks @shizejin . As far as I can tell, you don't have a test for |
|
Thanks @jstac for your suggestion! I had a look at the coverage report and the lines in I think the following is what causes our confusion: For each PR, we run two build jobs on Travis, one for
But since
This is why we observe a decrease in the coverage. I am trying to fix this by #490, which modifies Travis file to make sure that we only update coverage badge by reports from the |
|
Just a comment on naming: I guess in Python usually underscores are not used in a class name; if that is the case, would According to PEP8:
Does "CapWords convention" exclude use of an underscore? |
bb9b784 to
976ec7b
Compare
976ec7b to
9bf2c24
Compare
c1f4922 to
6924613
Compare
|
Very nice work. I approve this PR. |
|
@mmcky It would be good to have this merged soon, as we'll follow it up with some new lectures. Please have a look when you can. Thanks. |

Integrating the code for solving Markov jump LQ dynamic programming problems from the notebook in the sandpit repository.
The modifications I have made comparing to the original code:
LQclass,dictand adoptndarrayto store transition, payoff matrices, policies, and value function arrays,Here is a demonstration for this
qe.LQ_Markovclass.Two points that I would like to have your opinions before I move on:
I will add more tests in the next few days.