Closed rmastand closed 2 years ago
If trained well, sampling flow_2
would draw "noise" from the base distribution p_1
and transform it to samples of p_2
. You could reverse that sampling process with transform_to_noise
to take samples from p_2
and turn them into samples from p_1
. You'd need to pass p_1
samples through the "inverse" transform to get samples from p_2
(as the _sample
method of the flow does).
I am trying to use
nflows
to map between two nontrivial probability distributionsp_1
,p_2
. I first train a flow to learn distribution 1 withfor an array of
transform
objects and a standard normalbase_dist
. After learning, when I sample fromflow_1
, the samples match the probability distribution as the data forp_1
.I then train a flow to map from
p_1
top_2
withSo I am using
flow_1
as the base density for this transformation. After learning, when I sample fromflow_2
, the samples match the probability distribution as the data forp_2
.However, if I try to map from
p_1
top_2
by taking a sample fromp_1
and runningtransformed_dat = flow_2.transform_to_noise(p_1)
,transformed_dat
does not match the distribution fromp_2
.Is there an additional step in transforming between datasets that I need to carry out?