struct mrpt::bayes::CParticleFilter::TParticleFilterOptions

Overview

The configuration of a particle filter.

#include <mrpt/bayes/CParticleFilter.h>

struct TParticleFilterOptions: public mrpt::config::CLoadableOptions
{
    // fields

    bool adaptiveSampleSize {false};
    double BETA {0.5};
    unsigned int sampleSize {1};
    unsigned int pfAuxFilterOptimal_MaximumSearchSamples {100};
    double powFactor {1};
    TParticleFilterAlgorithm PF_algorithm {pfStandardProposal};
    TParticleResamplingAlgorithm resamplingMethod {prMultinomial};
    double max_loglikelihood_dyn_range {15};
    bool pfAuxFilterStandard_FirstStageWeightsMonteCarlo {false};
    bool pfAuxFilterOptimal_MLE {false};

    // methods

    virtual void loadFromConfigFile(const mrpt::config::CConfigFileBase& source, const std::string& section);
    virtual void saveToConfigFile(mrpt::config::CConfigFileBase& target, const std::string& section) const;
};

Inherited Members

public:
    // methods

    virtual void loadFromConfigFile(const mrpt::config::CConfigFileBase& source, const std::string& section) = 0;
    void loadFromConfigFileName(const std::string& config_file, const std::string& section);
    virtual void saveToConfigFile(mrpt::config::CConfigFileBase& target, const std::string& section) const;
    void saveToConfigFileName(const std::string& config_file, const std::string& section) const;
    void dumpToConsole() const;
    virtual void dumpToTextStream(std::ostream& out) const;

Fields

bool adaptiveSampleSize {false}

A flag that indicates whether the CParticleFilterCapable object should perform adative sample size (default=false).

double BETA {0.5}

The resampling of particles will be performed when ESS (in range [0,1]) < BETA (default is 0.5)

unsigned int sampleSize {1}

The initial number of particles in the filter (it can change only if adaptiveSampleSize=true) (default=1)

unsigned int pfAuxFilterOptimal_MaximumSearchSamples {100}

In the algorithm “CParticleFilter::pfAuxiliaryPFOptimal” (and in “CParticleFilter::pfAuxiliaryPFStandard” only if pfAuxFilterStandard_FirstStageWeightsMonteCarlo = true) the number of samples for searching the maximum likelihood value and also to estimate the “first stage weights” (see papers!) (default=100)

double powFactor {1}

An optional step to “smooth” dramatic changes in the observation model to affect the variance of the particle weights, eg weight*=likelihood^powFactor (default=1 = no effects).

TParticleFilterAlgorithm PF_algorithm {pfStandardProposal}

The PF algorithm to use (default=pfStandardProposal) See TParticleFilterAlgorithm for the possibilities.

TParticleResamplingAlgorithm resamplingMethod {prMultinomial}

The resampling algorithm to use (default=prMultinomial).

double max_loglikelihood_dyn_range {15}

Only for PF_algorithm=pfAuxiliaryPFOptimal: If a given particle has a max_likelihood (from the a-priori estimate) below the maximum from all the samples - max_loglikelihood_dyn_range, then the particle is directly discarded.

This is done to assure that the rejection sampling doesn’t get stuck in an infinite loop trying to get an acceptable sample. Default = 15 (in logarithmic likelihood)

bool pfAuxFilterStandard_FirstStageWeightsMonteCarlo {false}

Only for PF_algorithm==pfAuxiliaryPFStandard: If false, the APF will predict the first stage weights just at the mean of the prior of the next time step.

If true, these weights will be estimated as described in the papers for the “pfAuxiliaryPFOptimal” method, i.e. through a monte carlo simulation. In that case, “pfAuxFilterOptimal_MaximumSearchSamples” is the number of MC samples used.

bool pfAuxFilterOptimal_MLE {false}

(Default=false) In the algorithm “CParticleFilter::pfAuxiliaryPFOptimal”, if set to true, do not perform rejection sampling, but just the most-likely (ML) particle found in the preliminary weight-determination stage.

Methods

virtual void loadFromConfigFile(const mrpt::config::CConfigFileBase& source, const std::string& section)

This method load the options from a “.ini”-like file or memory-stored string list.

Only those parameters found in the given “section” and having the same name that the variable are loaded. Those not found in the file will stay with their previous values (usually the default values loaded at initialization). An example of an “.ini” file:

[section]
resolution    = 0.10   // blah blah...
modeSelection = 1      // 0=blah, 1=blah,...

See also:

loadFromConfigFileName, saveToConfigFile

virtual void saveToConfigFile(mrpt::config::CConfigFileBase& target, const std::string& section) const

This method saves the options to a “.ini”-like file or memory-stored string list.

See also:

loadFromConfigFile, saveToConfigFileName