[harrison_kreps] Update lecture#763
Conversation
|
📖 Netlify Preview Ready! Preview URL: https://pr-763--sunny-cactus-210e3e.netlify.app (f4ecd4b) 📚 Changed Lecture Pages: harrison_kreps |
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
📖 Netlify Preview Ready!Preview URL: https://pr-763--sunny-cactus-210e3e.netlify.app Commit: 📚 Changed LecturesBuild Info
|
|
Thanks @xuanguang-li , much appreciated. I've reviewed the PR. Actually I don't think switching to JAX is justified in this lecture. In the computations of the stationary distribution at the start, we will be using NumPy internally, since that's all qe.MarkovChain can work with. In the later computation, with the for loop, JAX is probably slower, since the array computations are very low dimensional and the main task is iterative. I think it might be best to close this PR. @HumphreyYang or @mmcky, what do you think? If we do close this, let's tick it off or remove it from the meta issue, so we know not to try again. |
|
Many thanks @jstac, I agree! @xuanguang-li also has some other valuable edits in this PR so I can revert the JAX edits and keep others. |
This pull request updates the Harrison-Kreps model lecture to use JAX and improves code consistency and formatting throughout the document.
Replaced
numpy(np) andscipy.linalg(la) imports and usages withjax.numpy(jnp) equivalents throughout code cells, but keptforandwhileloops for simplicity.Formatting and terminology improvements: standardized section and subsection titles, and improved consistency in emphasis (e.g., italicizing instead of bolding, fixing typos in comments and variable names).