Skip to contents

Walks the schedule from t back to 0. With scale = 0 the schedule is the identity and this returns its input unchanged.

Usage

denoise(x_t, model, schedule, t_start = NULL)

Arguments

x_t

Noisy state to start from.

model

Function (x, t) returning the model's x_0 estimate.

schedule

Schedule list from noise_schedule.

t_start

Starting timestep; defaults to the last step.

Value

A list mirroring the Python RichResult payload.

Examples

s <- noise_schedule(T = 10, scale = 0)
x <- c(1, 2, 3)
identical(denoise(x, model = function(x, t) x, schedule = s)$x0, x)   # scale 0: the identity
#> [1] TRUE