- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Mers::Estimation::Discrete::MEObjectiveFunction Class Reference

`#include <MEObjectiveFunction.h>`

Inheritance diagram for Mers::Estimation::Discrete::MEObjectiveFunction:

[legend]
Collaboration diagram for Mers::Estimation::Discrete::MEObjectiveFunction:

[legend]
List of all members.

## Public Member Functions
| MEObjectiveFunction (Mers::Models::Base::BaseModelVariableArray const *dVs, const std::map< unsigned int, unsigned int > pMap, std::vector< double > allTransProbs, std::map< unsigned int, double > sProbs)
virtual | ~MEObjectiveFunction ()
double | getBeliefStateUncertainty (const Mers::Estimation::Discrete::Trajectories *beliefState) const
double | calculatePropagationUtility (Mers::Models::Base::BaseModelAssignmentArray const *bmAssignments, int sourceStateIndex=-1) const
void | updateProbabilities (std::vector< double > &allTransProbs, std::map< unsigned int, double > &sProbs)
void | updateStateProbabilities (const std::map< unsigned int, double > &sProbs)
## Protected Member Functions
virtual double | calculateUtility (std::vector< Mers::Models::Base::BaseModelAssignment const * > &bmAssignments, int sourceStateIndex=-1) const=0
virtual void | determineOptimisticAssignmentValues (void)
virtual double | calculatePropagationUtility (std::vector< Mers::Models::Base::BaseModelAssignment const * > &bmAssignments, int sourceStateIndex=-1) const=0
## Protected Attributes
Mers::Models::Base::BaseModelVariableArray const * | decisionVariables
| All the decision variables for the OCSP. Used for variable UIDs.
std::vector< double > | allTransitionProbabilitiesForAllStates
| The probability of transitioning to any component mode from any source state. Order [v1m1s1,...,v1mls1,v2m1s1,...,vnmls1,v1m1s2,...] where v: mode variables, m: mode values, s: source states.
std::map< unsigned int, double > | sourceStateProbabilities
const std::map< unsigned int, unsigned int > | probabilityMap
| The probability map that distinguishes the individual component UIDs probabilities in allTransitionProbabilitiesForAllStates.
std::map< std::pair< unsigned int, unsigned int >, double > | optimisticProbabilities

## Detailed Description

The Mode Estimation Objective Function virtual class

This class sets the framework and command functionality used in the BFTE, BFBSE, and BFBSU Objective Functions

Author:
  Oliver Martin

Date:
  04/20/05

Definition at line 49 of file MEObjectiveFunction.h.

## Constructor & Destructor Documentation

Mers::Estimation::Discrete::MEObjectiveFunction::MEObjectiveFunction | ( | Mers::Models::Base::BaseModelVariableArray const * | dVs,
|  | const std::map< unsigned int, unsigned int > | pMap,
|  | std::vector< double > | allTransProbs,
|  | std::map< unsigned int, double > | sProbs |
| ) |  |  | `[inline]`

Creates a new Best-First Trajectory Enumeration Objective Function. Gathers all the relevant information and sets up the optimistic estimate h(x) for unassigned variables

Parameters:

  | pMap | is a mapping from BaseModeVariableUID to the index of the probability for the first element in that variable's domain.
  | allTransProbs | all the transition probabilities to every mode in every component from every source mode. This vector can be decomposed using pMap
  | sProbs | are the current posterior state probabilities

Definition at line 72 of file MEObjectiveFunction.h.

References determineOptimisticAssignmentValues().

Here is the call graph for this function:

virtual Mers::Estimation::Discrete::MEObjectiveFunction::~MEObjectiveFunction | ( |  | ) | `[inline, virtual]`

Destroys this object

Definition at line 87 of file MEObjectiveFunction.h.

## Member Function Documentation

double Mers::Estimation::Discrete::MEObjectiveFunction::getBeliefStateUncertainty | ( | const Mers::Estimation::Discrete::Trajectories * | beliefState | ) | const`[inline]`

Evaluates the objective function using only the state trajectory propagation equation to determine the amount of uncertainty in an approximate belief state. This is done by calling BSEOjbectiveFunction::calculateUtility and adding up each estimate probability.

Parameters:

  | beliefState | the belief state for which to determine the uncertainty

Returns:
  the belief state uncertainty

Definition at line 103 of file MEObjectiveFunction.h.

References calculatePropagationUtility(), Mers::Estimation::Discrete::Estimate::getComponentAssignments(), Mers::Estimation::Discrete::Trajectories::getEstimate(), Mers::Estimation::Discrete::Trajectories::getNumberEstimates(), and Mers::Estimation::Discrete::Estimate::getOriginatedTrajectoryNumber().

Here is the call graph for this function:

double Mers::Estimation::Discrete::MEObjectiveFunction::calculatePropagationUtility | ( | Mers::Models::Base::BaseModelAssignmentArray const * | bmAssignments,
|  | int | sourceStateIndex = `-1` |
| ) |  |  | const`[inline]`

Evaluates the objective function based only on the HMM propagation equation. This will be identical to BFTE utility function.

Parameters:

  | implicantAssignments | the current assignments from which to calculate the utility based on the objective function.
  | sourceStateIndex | is an optional argument as required by BFTE

Returns:
  the utility

Definition at line 130 of file MEObjectiveFunction.h.

References Mers::Utils::Containers::DynamicArray::getLength().

Referenced by getBeliefStateUncertainty(), and Mers::Estimation::Discrete::ModeEstimationPerformance::MEPerformanceMonitor::getPriorNextStateProbs().

Here is the call graph for this function:

void Mers::Estimation::Discrete::MEObjectiveFunction::updateProbabilities | ( | std::vector< double > & | allTransProbs,
|  | std::map< unsigned int, double > & | sProbs |
| ) |  |  | `[inline]`

Updates all the probability values and optimistic h(x) values.

Parameters:

  | allTransProbs | all the transition probabilities to every mode in every component from every source mode. This vector can be decomposed using pMap.
  | sProbs | are the current posterior state probabilities.

Definition at line 152 of file MEObjectiveFunction.h.

References allTransitionProbabilitiesForAllStates, determineOptimisticAssignmentValues(), and sourceStateProbabilities.

Referenced by Mers::Estimation::Discrete::ModeEstimation::ModeEstimator::generateTrajectories(), Mers::Estimation::Discrete::CompiledME::CompiledModeEstimator::generateTrajectories(), and Mers::Estimation::Discrete::ApproximateBeliefState::BFBSE::BFBSE::generateTrajectories().

Here is the call graph for this function:

void Mers::Estimation::Discrete::MEObjectiveFunction::updateStateProbabilities | ( | const std::map< unsigned int, double > & | sProbs | ) | `[inline]`

Updates all the state probability values but maintains the transition probabilities. New optimistic h(x) values are then computed.

Parameters:

  | sProbs | are the current posterior state probabilities.

Definition at line 169 of file MEObjectiveFunction.h.

References determineOptimisticAssignmentValues(), and sourceStateProbabilities.

Referenced by Mers::Estimation::Discrete::ModeEstimationPerformance::MEPerformanceMonitor::getPriorNextStateProbs().

Here is the call graph for this function:

virtual double Mers::Estimation::Discrete::MEObjectiveFunction::calculateUtility | ( | std::vector< Mers::Models::Base::BaseModelAssignment const * > & | bmAssignments,
|  | int | sourceStateIndex = `-1` |
| ) |  |  | const`[protected, pure virtual]`

Evaluates the objective function to determine the utiltiy of the implicant. This is where the actual objective function is specified.

Parameters:

  | implicantAssignments | the current assignments from which to calculate the utility based on the objective function.
  | sourceStateIndex | is an optional argument as required by BFTE

Returns:
  the utility

Implements Mers::Generators::BFIG::BFIGObjectiveFunction.

Implemented in Mers::Estimation::Discrete::ApproximateBeliefState::BSEObjectiveFunction, Mers::Estimation::Discrete::ApproximateBeliefState::BSUObjectiveFunction, and Mers::Estimation::Discrete::BFTEObjectiveFunction.

virtual void Mers::Estimation::Discrete::MEObjectiveFunction::determineOptimisticAssignmentValues | ( | void |  | ) | `[inline, protected, virtual]`

Searches through all the transition probabilities to find the optimistic assigment values. These values are used in the objective function as an optimistic guess (h(x)) of future assignments to the remaining decision variables. This is relevant to both BFTE and BFBSE.

Assumes that order in probabilityMap is still the same as the decisionVariables order!

Definition at line 207 of file MEObjectiveFunction.h.

References allTransitionProbabilitiesForAllStates, decisionVariables, Mers::Utils::Containers::DynamicArray::getLength(), optimisticProbabilities, probabilityMap, and sourceStateProbabilities.

Referenced by MEObjectiveFunction(), updateProbabilities(), and updateStateProbabilities().

Here is the call graph for this function:

virtual double Mers::Estimation::Discrete::MEObjectiveFunction::calculatePropagationUtility | ( | std::vector< Mers::Models::Base::BaseModelAssignment const * > & | bmAssignments,
|  | int | sourceStateIndex = `-1` |
| ) |  |  | const`[protected, pure virtual]`

Evaluates the objective function based only on the HMM propagation equation. This will be identical to BFTE utility function.

Parameters:

  | implicantAssignments | the current assignments from which to calculate the utility based on the objective function.
  | sourceStateIndex | is an optional argument as required by BFTE

Returns:
  the utility

Implemented in Mers::Estimation::Discrete::ApproximateBeliefState::BSEObjectiveFunction, and Mers::Estimation::Discrete::BFTEObjectiveFunction.

## Member Data Documentation

std::map<unsigned int,double> Mers::Estimation::Discrete::MEObjectiveFunction::sourceStateProbabilities`[protected]`

The posterior probabilities for all the current states. [s0, s1, s2,...,sk]

Definition at line 281 of file MEObjectiveFunction.h.

Referenced by determineOptimisticAssignmentValues(), updateProbabilities(), and updateStateProbabilities().

std::map<std::pair<unsigned int, unsigned int>,double> Mers::Estimation::Discrete::MEObjectiveFunction::optimisticProbabilities`[protected]`

Optimistic assignment values to each variable from each source state Parameters map<(varUID,state#),maxProbability> [v1s1,v2s1,...,vns1,v1s2,...])

Definition at line 290 of file MEObjectiveFunction.h.

Referenced by determineOptimisticAssignmentValues().

The documentation for this class was generated from the following file:

- /Users/fpy/titan-1-5-MBARI/Mers/Estimation/Discrete/MEObjectiveFunction.h