Compressors
Defining a Belief Compressor
In this section, we outline the requirements and guidelines for defining a belief Compressor
.
Interface
The Compressor
interface is extremely minimal. It only supports two methods: fit!
and the associated functor. For example, if you wanted to implement your own Compressor
, you could write something like this
struct MyCompressor <: Compressor
foo
bar
end
# functor definition
function (c::MyCompressor)(beliefs)
# YOUR CODE HERE
return compressed_beliefs
end
function fit!(c::MyCompressor, beliefs)
# YOUR CODE HERE
end
Implementation Tips
- For robustness, both the functor and
fit!
should be able to handleAbstractVector
andAbstractMatrix
inputs. fit!
is called only once after beliefs are sampled from the POMDP.CompressedBeliefSolver
will attempt to convert each belief state (often of typeDiscreteBelief
) into anAbstractArray{Float64}
usingconvert_s
. As a convenience, CompressedBeliefMDP implements conversions for commonly used belief types; however, if the POMDP has a custom belief state, then it is the users' responsibility to implement the appropriate conversion. See the source code for help.
Implemented Compressors
CompressedBeliefMDPs currently provides wrappers for the following compression types:
- a principal component analysis (PCA) compressor,
- a kernel PCA compressor,
- a probabilistic PCA compressor,
- a factor analysis compressor,
- an isomap compressor,
- an autoencoder compressor
- a variational auto-encoder (VAE) compressor
Principal Component Analysis (PCA)
CompressedBeliefMDPs.PCACompressor
— FunctionWrapper for MultivariateStats.PCA
.
Kernel PCA
CompressedBeliefMDPs.KernelPCACompressor
— FunctionWrapper for MultivariateStats.KernelPCA
.
Probabilistic PCA
CompressedBeliefMDPs.PPCACompressor
— FunctionWrapper for MultivariateStats.PPCA
.
Factor Analysis
CompressedBeliefMDPs.FactorAnalysisCompressor
— FunctionWrapper for MultivariateStats.FactorAnalysis
Isomap
CompressedBeliefMDPs.IsomapCompressor
— FunctionWrapper for ManifoldLearning.Isomap
.
Autoencoder
CompressedBeliefMDPs.AutoencoderCompressor
— TypeImplements an autoencoder in Flux.
Variational Auto-Encoder (VAE)
CompressedBeliefMDPs.VAECompressor
— TypeImplements a VAE in Flux.
Some compression algorithms aren't optimized for large belief spaces. While they pass our unit tests, they may fail on large POMDPs or without seeding. For large POMDPs, users may want a custom Compressor
.