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

Support arbitrary censoring via set_subtensor #177

Open
ricardoV94 opened this issue Sep 8, 2022 · 0 comments
Open

Support arbitrary censoring via set_subtensor #177

ricardoV94 opened this issue Sep 8, 2022 · 0 comments

Comments

@ricardoV94
Copy link
Contributor

ricardoV94 commented Sep 8, 2022

As the TODO comment describes, those types of graphs can be equivalent to clipping for the purpose of logprobs

@node_rewriter(tracks=[Elemwise])
def find_censored_rvs(fgraph: FunctionGraph, node: Node) -> Optional[List[CensoredRV]]:
# TODO: Canonicalize x[x>ub] = ub -> clip(x, x, ub)

More generally, we could also allow arbitrary censoring binning encoding of the form x[(x > lower) & (x < upper)] = encoding, but that would require a different logprob definition.

@ricardoV94 ricardoV94 changed the title Support clip censoring via set_subtensor Support arbitrary censoring via set_subtensor Oct 19, 2022
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

No branches or pull requests

1 participant