bayesiains/nflows

Flow for one-dimensional data

Closed this issue · 2 comments

Thank you very much for sharing the code. I wonder whether the autoregressive flows (e.g., MAF) can be used to estimate the density of one-dimensional data? If not, which kind of flow model can be used?

The meaning of "Autoregressive flow" is that each dimension is modeled given the previous ones. In standard MAF the univariate model is a Gaussian, and in 1D you'd be fitting a single univariate Gaussian, conditioned on nothing, and should just do that more directly.

A generalization of a single Gaussian is a mixture of Gaussians. If you want that to be a conditional model, it's a "mixture density network". Another way to flexibly warp 1D data is to use a spline transformation, supported by this library.

I'd only use neural network technology if your distribution is conditioned on something interesting, and you're looking for a good output layer. If you're literally fitting just a 1D distribution, I'd consider a histogram.

Many thanks for your answer! It helps a lot!