-
-
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
Add fit_discrete_mc #681
Add fit_discrete_mc #681
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Smit-create
- This part is missing:
QuantEcon.py/quantecon/markov/approximation.py
Lines 371 to 373 in 745c0d4
# Assign the visited states in the cartesian product as the state values prod = cartesian(V, order=order) mc.state_values = prod[mc.state_values] - Add tests
-
Examples
section will be helpful
There are a few points open for discussion:
- What shape should
X
be of? - Is the name
S
of the second argument appropriate? - Is this for approximation or estimation (which of
approximation.py
orestimate.py
to include this code in)?
Thanks for the review @oyamad . I think this should be in estimate.py because there is no specified model to approximate. I suggest a better name for S is grids. I am away from my computer so I won't give further feedback. @Smit-create , it would be great if you could coordinate with @oyamad to finish this PR. |
Thanks, @oyamad. I have addressed these questions and added the missing part. If the current diff looks good, I can start working on Examples and tests. |
|
I kept it as
Sure will change that. |
Both @oyamad and @Smit-create 's opinions are sensible on this point. Another option --- combining these opinions but with a breaking change --- is to convert This is more work but I personally prefer it, so that we have consistency across all of these functions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When n=1
, it is supposed to pass for example X = [[0.1], [0.6], [1.2], [0.2]]
and grids = ([0., 0.5, 1.],)
. Is there any clever way to detect this case and allow passing X = [0.1, 0.6, 1.2, 0.2]
and grids = [0., 0.5, 1.]
?
Thanks for the review. I am not sure if we should support this as we are clearly expecting the input shape of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Smit-create Thanks!
Many thanks @Smit-create and @oyamad |
#678