Repository navigation
Conversation
bashtage
force-pushed
the
wip-ms-predict-conditional-slice
branch
from
November 23, 2026 19:15
732aa33 to
47d3885
Compare
4 of 5 tasks
Member
Author
|
Merge order. These open PRs build on this one (their branches contain its commits), so please merge this PR first: Indented PRs build on the PR above them, so merge them after it. Once this PR is merged, their diffs shrink to their own changes. Each of them also says "Stacked on #..." at the top of its description. Merge-order note generated with Claude Code (updated 2026-11-25). |
bashtage
force-pushed
the
wip-ms-predict-conditional-slice
branch
2 times, most recently
from
November 25, 2026 12:11
620ecb9 to
f66b772
Compare
4 of 5 tasks
bashtage
force-pushed
the
wip-ms-predict-conditional-slice
branch
3 times, most recently
from
November 27, 2026 23:06
b8bf401 to
8d3bc95
Compare
…dict
MarkovSwitching.predict (and MarkovSwitchingResults.predict) with
conditional=True or an int and with start or end applied the
[start:end + 1] selection to the first axis of the conditional
predictions, which indexes the regime. The result had every period and
the wrong regimes, or no regimes at all when start was at least
k_regimes, with no error. For example, predict(params, start=10,
end=20, conditional=True) of a two-regime MarkovRegression returned an
array of shape (0, nobs).
The selection now applies to the last axis, the periods. Unconditional
predictions, which are one-dimensional, and conditional predictions of
the full sample do not change; conditional predictions with start or
end change.
Tests: conditional predictions of MarkovRegression against the regime
means, and of an AR(1) MarkovAutoregression given the current and last
regime against mu_i + phi_i (y_{t-1} - mu_j), for several start/end
pairs and for date keys; unconditional and current-regime predictions
with start/end against the same periods of the full-sample predictions.
bashtage
force-pushed
the
wip-ms-predict-conditional-slice
branch
from
November 28, 2026 21:36
8d3bc95 to
b0e1e62
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MarkovSwitching.predict (and MarkovSwitchingResults.predict) with
conditional=True or an int and with start or end applied the
[start:end + 1] selection to the first axis of the conditional
predictions, which indexes the regime. The result had every period and
the wrong regimes, or no regimes at all when start was at least
k_regimes, with no error. For example, predict(params, start=10,
end=20, conditional=True) of a two-regime MarkovRegression returned an
array of shape (0, nobs).
The selection now applies to the last axis, the periods. Unconditional
predictions, which are one-dimensional, and conditional predictions of
the full sample do not change; conditional predictions with start or
end change.
Tests: conditional predictions of MarkovRegression against the regime
means, and of an AR(1) MarkovAutoregression given the current and last
regime against mu_i + phi_i (y_{t-1} - mu_j), for several start/end
pairs and for date keys; unconditional and current-regime predictions
with start/end against the same periods of the full-sample predictions.
NumPy's guide.
AI Disclosure
Contributions must comply with the statsmodels AI Policy.
Tick exactly one of the following. If AI tools were used, replace the
<...>placeholders in the second option with the tool name(s) and how the tool's output was
used.
Tool(s): Claude Code (Claude Opus 5.5).
Used for: finding the bug in a contract audit, writing the fix and its tests, and checking them (tests failing on main, mutation check).
I have personally read, understood, and can explain every line of this diff, and
have verified the statistical/numerical correctness of the change.
🤖 Generated with Claude Code