Skip to content
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

[Hierarchical] Allow computing projection based on a non-Euclidean norm #2960

Closed
wants to merge 1 commit into from

Conversation

rshyamsundar
Copy link
Contributor

Issue #, if available:

Description of changes:
Currently the forecasts are reconciled by projecting them on to the feasible set based on the Euclidean norm. Sometimes it is desirable to weigh the distances (errors) between the unreconciled and reconciled forecasts differently for each level (because there are more number of terms for the bottom level compared to the top level).

This PR adds an option to provide such weights via a diagonal matrix.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Please tag this pr with at least one of these labels to make our release process faster: BREAKING, new feature, bug fix, other change, dev setup

Copy link
Contributor

@melopeo melopeo left a comment

Choose a reason for hiding this comment

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

Thanks for this PR!

A question I have is: is there any way the user can provide the proposed matrix D through the estimator? Currently the matrix S is provided, which is used to compute the projection matrix A. I guess we need to provide the option to give the matrix D as a parameter in the estimator.

def null_space_projection_mat(A: np.ndarray) -> np.ndarray:
def null_space_projection_mat(
A: np.ndarray,
D: Optional[np.ndarray],
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we give this matrix as optional?
What are the advantages against D: np.array = None? With the current approach tests are failing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ya, =None is missing actually. Let me fix.

@rshyamsundar
Copy link
Contributor Author

@melopeo Address them in a new PR. Had to open a new one as I pushed this to a wrong branch.

@rshyamsundar rshyamsundar deleted the rshyamsundar-orth-proj branch August 11, 2023 15:41
@rshyamsundar rshyamsundar removed the request for review from lostella August 11, 2023 15:44
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.

2 participants