Update coefficients for new observations using Sherman-Morrison formula.
Parameters
Name
Type
Description
Default
X_new
np.ndarray
Covariates for new data points. Users expected to ensure conformability with existing data.
required
y_new
np.ndarray
Outcome values for new data points.
required
inplace
bool
Must be False. In-place updates are unsupported because appending design rows cannot reconstruct the complete fitted-result state.
False
Returns
Name
Type
Description
np.ndarray
Updated coefficients.
Notes
Updates the coefficients in closed form via the Sherman-Morrison identity instead of refitting on the full sample. X_new has to include the intercept column. The returned coefficients do not mutate the fitted result. Models with fixed effects are not supported.