Skip to content

[kalman_2] Update code and descriptions#907

Open
HumphreyYang wants to merge 5 commits into
mainfrom
update-kalman2
Open

[kalman_2] Update code and descriptions#907
HumphreyYang wants to merge 5 commits into
mainfrom
update-kalman2

Conversation

@HumphreyYang

Copy link
Copy Markdown
Member

This PR closes #904 and makes a few improvements beyond it.

Hi @longye-tian, this PR resolves #904, and thanks for raising those issues!

@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown

📖 Netlify Preview Ready!

Preview URL: https://pr-907--sunny-cactus-210e3e.netlify.app

Commit: 20e2923

📚 Changed Lectures


Build Info

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the kalman_2 lecture to better align the math, narrative timing, and code implementation of the Kalman filter with the intended worker model, addressing clarifications raised in issue #904.

Changes:

  • Aligns the observation equation with the text by setting the measurement matrix to exclude direct dependence on effort (G = [g, 0]) and clarifies independence/initial-belief variance vs. standard deviation notation.
  • Reorders Kalman-filter bookkeeping to record beliefs before incorporating the current observation (consistent with conditioning on (y^{t-1})), and adjusts arrays/loop indexing accordingly.
  • Improves figure metadata/captions and narrative explanations around simulation initial conditions and learning experiments.

Comment thread lectures/kalman_2.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@HumphreyYang

Copy link
Copy Markdown
Member Author

Hi @longye-tian,

I think this is ready to be merged. Please let me know if there is anything else you would like to add!

Comment thread lectures/kalman_2.md
In particular, we want to compute all of the objects in an "innovation representation".

## An Innovations Representation
## An innovations representation

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @HumphreyYang

Maybe here we should use An innovation representation or An innovation's representation.

What do you think?

Best,
Longye

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks @longye-tian! Innovations representation is a standard term in timeseries analysis (I know it is a bit strange!)

(See e.g., https://www.stat.berkeley.edu/~bartlett/courses/153-fall2010/lectures/10.pdf)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @HumphreyYang!

I see, shall we use the term The innovations representation instead of An innovations representation to match your referenced document?

Best,
Longye

Comment thread lectures/kalman_2.md
ax[0].set_title(r'$\mathbb{E}[y_t]$ over time')
ax[0].set_xlabel('time')
ax[0].set_ylabel(r'$\mathbb{E}[y_t| y^{t-1}]$')
ax[0].set_title(r'$\mathbb{E}[y_t| y^{t-1}]$ over time')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @HumphreyYang

According to the style guide qe-fig-003 No matplotlib embedded titles, should we delete the title and descibe those figures inline?

Best,
Longye

Comment thread lectures/kalman_2.md
axs[i].set_title(f'Time Step {t+1}')
axs[i].set_xlabel(r'$h_{{{}}}$'.format(str(t+1)))
axs[i].set_ylabel(r'$u_{{{}}}$'.format(str(t+1)))
axs[i].set_title(f'Time Step {t}')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same stye guide comment here

@longye-tian longye-tian left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks @HumphreyYang !

They all looks good to me. Just some minor comments see above.

Best,
Longye

@HumphreyYang

Copy link
Copy Markdown
Member Author

Many thanks @longye-tian for the detailed check!

I left out those two cases intentionally.

Personally, I think it would be a bit unclear if we don’t use subplot titles for figures with multiple subplots.

For instance, if we remove the Time Step {t} title from subplots, it would be a bit hard for readers to tell what the plot is showing at first glance.

Please let me know what you think between those two cases! If this makes sense, I can update the style guide accordingly (CC @mmcky and @jstac)!


Without subplot titles:
Screenshot 2026-06-16 at 4 06 17 PM

With subplot titles:
Screenshot 2026-06-16 at 4 07 20 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[kalman_2] Some comments for the section 3 and 4

3 participants