Skip to content

OBLax is a collection of online Bayesian learning algorithms implemented in jax.

License

Notifications You must be signed in to change notification settings

MichelangeloConserva/oblax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OBLax

OBLax is a collection of online Bayesian learning algorithms implemented in jax.

If you are interested in contributing you can check the project Kanban board.

Non-stationary environment examples

Linear regression 2d with non-stationary rotating parameter vector

For a univariate linear regression problem in the form,

$$ Y = X \boldsymbol \beta_t + \epsilon, \quad \epsilon \sim \mathcal{N}(0, \sigma^2). $$

At each time step, the parameter vector $\boldsymbol \beta_t$ is rotated as, $$\boldsymbol \beta_{t + 1} = R(\theta) \boldsymbol \beta_t,$$ for a fixed value $\theta$.

The rotation matrix is defined as,

$$ R(\theta) = \begin{bmatrix} cos(\theta) & -\sin(\theta) \\ cos(\theta) & \sin(\theta) \end{bmatrix} $$

At each time step, the agent is revealed only a subset of the entire data set.

A visualization of how the environment changes for a full rotation of the paramter is presented below.

The code to reproduce the gif can be found in the "regression2d_rotation" notebook in the examples folder.

Logit classification 2d with non-stationary rotating parameter vector

For a univariate logit classification problem in the form,

$$ Y \sim \text{Bernoulli}(\texttt{sigmoid}(X \boldsymbol \beta_t)). $$

At each time step, the parameter vector $\boldsymbol \beta_t$ is rotated as, $$\boldsymbol \beta_{t + 1} = R(\theta) \boldsymbol \beta_t,$$ for a fixed value $\theta$.

The rotation matrix is defined as,

$$ R(\theta) = \begin{bmatrix} cos(\theta) & -\sin(\theta) \\ cos(\theta) & \sin(\theta) \end{bmatrix} $$

At each time step, the agent is revealed only a subset of the entire data set.

A visualization of how the environment changes for a full rotation of the paramter is presented below.

The code to reproduce the gif can be found in the "classification2d_rotation" notebook in the examples folder.

About

OBLax is a collection of online Bayesian learning algorithms implemented in jax.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages