tensorflow / tensorflow/probability

How to constrain initial_weights_prior being positive in tfp.DynamicLinearRegression

Open
#1,096 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
4.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Hi all,

I am building a structural time series for causal analysis.
I would like to enforce the weights in DynamicLinearRegression (estimated by variational inference) to be non-negative due to interpretation reasons.

The argument ‘inital_weights_prior’ in DynamicLinearRegression is required to be an instance of tfd.MultivariateNormal.
I wonder if it’s possible to truncate tfd.MultivariateNormalDiag to be non-negative, or create a multivariate half-normal distribution with same format as a valid input for initial_weights_prior.
It would be great if someone could enlighten me on achieving non-negative dynamic coefficients in this case.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the DynamicLinearRegression API and its initial_weights_prior requirement, then inspect the referenced tfd.MultivariateNormalDiag distribution behavior. Determine whether the requested non-negative prior is supported by existing APIs or requires a design change. Done means a documented, reproducible way to enforce non-negative coefficients, or a clearly scoped implementation proposal with relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
tensorflow
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.