de.unihalle.informatik.MiToBo.tracking.multitarget.distributions.impl
Class AssociationDistribution<S extends TargetID,T extends TargetID>

java.lang.Object
  extended by de.unihalle.informatik.MiToBo.tracking.multitarget.distributions.abstracts.AbstractAssociationDistribution<S,T>
      extended by de.unihalle.informatik.MiToBo.tracking.multitarget.distributions.impl.AssociationDistribution<S,T>
Type Parameters:
S - Type of discrete variables in the multi target observation
T - Type of discrete variables in the multi target state
All Implemented Interfaces:
EvaluatableDistribution<DataAssociation>, LogEvaluatableDistribution<DataAssociation>, SamplingDistribution<DataAssociation>
Direct Known Subclasses:
AssociationDistributionNN

@ALDMetaInfo(export=ALLOWED)
public class AssociationDistribution<S extends TargetID,T extends TargetID>
extends AbstractAssociationDistribution<S,T>
implements EvaluatableDistribution<DataAssociation>, LogEvaluatableDistribution<DataAssociation>

Association distribution to sample association variables for a set of observations based on a model of how observations are formed.

Observations are comprised from existing targets that are detected with probability P_D, a number of observations of newborn targets distributed according to a distribution nu and a number of clutter observations distributed according to a distribution mu.

The association variables of the individual observations are sampled sequentially and their distributions are assumed to depend on the likelihood of the current observation for a specific realization of the association variable and the probability of the association variable given all previous associations. Note that the likelihood of observations that are not yet associated is not considered here!!

Author:
Oliver Gress

Field Summary
protected  double[][] chi
           
protected  int lastM
          Number of observations in last call of drawSample()
protected  int lastN
          Number of targets in last call of drawSample()
protected  DataAssociation lastSample
          Last sample that was sampled
protected  double[] logBinom
          Binomial distribution of number of observations associated to existing targets
protected  double[] logMuValues
          (log) values of mu to avoid recomputation
protected  double[] logNuValues
          (log) values of nu to avoid recomputation
protected  double logP_C
          (log) probability of the current set of association variables given observations and previous associations
protected  double logP_MN
          (log) propability of M observations given N existing targets and the current model configuration
protected  int M_max
          Maximum number of observations in the time series
protected  int minMN
          Minimum of number of observations and number of targets
protected  LogProbabilityMassFunction mu
          Distribution of the number of clutter observations
protected  int newtargetID
          Target-ID to start from for newborn targets
protected  LogProbabilityMassFunction nu
          Distribution of the number of observations from newborn targets
protected  double P_D
          Probability of target detection
protected  double[] phi_0
           
protected  double[] phi_1
           
protected  double[] psi
           
 
Fields inherited from class de.unihalle.informatik.MiToBo.tracking.multitarget.distributions.abstracts.AbstractAssociationDistribution
assocfactory, clutterdistrib, log_pzc, M, N, newborndistrib, obsdistrib, rand, Z
 
Constructor Summary
AssociationDistribution(Random rand, AbstractMultiState<S> Z, AbstractMultiObservationDistributionIndep<S,T> observationDistrib, LogProbabilityDensityFunction spatialClutterDistrib, LogProbabilityDensityFunction spatialNewbornDistrib, LogProbabilityMassFunction mu, LogProbabilityMassFunction nu, double P_D)
          Constructor.
AssociationDistribution(Random rand, AbstractMultiState<S> Z, AbstractMultiObservationDistributionIndep<S,T> observationDistrib, LogProbabilityDensityFunction spatialClutterDistrib, LogProbabilityDensityFunction spatialNewbornDistrib, LogProbabilityMassFunction mu, LogProbabilityMassFunction nu, double P_D, int M_max)
          Constructor where the maximum number of observations in the time series is specified to avoid some re-computations.
 
Method Summary
 DataAssociation drawSample()
          Generate a new sample from this density.
 DataAssociation drawSampleDebug(DataAssociation groundtruth, OutputStream ostream)
           
 void letNewbornTargetIDsStartFrom(int minNewTargetID)
          Specify the starting target-ID for newborn targets
 double log_p(DataAssociation x)
          This method is here only valid for the latest DataAssociation sampled with drawSample().
 double p(DataAssociation x)
          This method is here only valid for the latest DataAssociation sampled with drawSample().
protected  void reset()
           
 void setNewObservations(AbstractMultiState<S> Z, AbstractMultiObservationDistributionIndep<S,T> observationDistrib)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mu

protected LogProbabilityMassFunction mu
Distribution of the number of clutter observations


logMuValues

protected double[] logMuValues
(log) values of mu to avoid recomputation


nu

protected LogProbabilityMassFunction nu
Distribution of the number of observations from newborn targets


logNuValues

protected double[] logNuValues
(log) values of nu to avoid recomputation


logBinom

protected double[] logBinom
Binomial distribution of number of observations associated to existing targets


lastM

protected int lastM
Number of observations in last call of drawSample()


lastN

protected int lastN
Number of targets in last call of drawSample()


psi

protected double[] psi

phi_0

protected double[] phi_0

phi_1

protected double[] phi_1

chi

protected double[][] chi

minMN

protected int minMN
Minimum of number of observations and number of targets


P_D

protected double P_D
Probability of target detection


logP_MN

protected double logP_MN
(log) propability of M observations given N existing targets and the current model configuration


lastSample

protected DataAssociation lastSample
Last sample that was sampled


logP_C

protected double logP_C
(log) probability of the current set of association variables given observations and previous associations


M_max

protected int M_max
Maximum number of observations in the time series


newtargetID

protected int newtargetID
Target-ID to start from for newborn targets

Constructor Detail

AssociationDistribution

public AssociationDistribution(Random rand,
                               AbstractMultiState<S> Z,
                               AbstractMultiObservationDistributionIndep<S,T> observationDistrib,
                               LogProbabilityDensityFunction spatialClutterDistrib,
                               LogProbabilityDensityFunction spatialNewbornDistrib,
                               LogProbabilityMassFunction mu,
                               LogProbabilityMassFunction nu,
                               double P_D)
Constructor.

Parameters:
rand - random generator for sampling
Z - the current observations
observationDistrib - distribution of the observations model
spatialClutterDistrib - spatial distribution of possible clutter appearance
spatialNewbornDistrib - spatial distribution of possible newborn appearance
mu - distribution of the number of clutter observations
nu - distribution of the number of observations from newborn targets
P_D - probability of target detection

AssociationDistribution

public AssociationDistribution(Random rand,
                               AbstractMultiState<S> Z,
                               AbstractMultiObservationDistributionIndep<S,T> observationDistrib,
                               LogProbabilityDensityFunction spatialClutterDistrib,
                               LogProbabilityDensityFunction spatialNewbornDistrib,
                               LogProbabilityMassFunction mu,
                               LogProbabilityMassFunction nu,
                               double P_D,
                               int M_max)
Constructor where the maximum number of observations in the time series is specified to avoid some re-computations.

Parameters:
rand - random generator for sampling
Z - the current observations
observationDistrib - distribution of the observations model
spatialClutterDistrib - spatial distribution of possible clutter appearance
spatialNewbornDistrib - spatial distribution of possible newborn appearance
mu - distribution of the number of clutter observations
nu - distribution of the number of observations from newborn targets
P_D - probability of target detection
M_max - maximum number of observations in the time series
Method Detail

letNewbornTargetIDsStartFrom

public void letNewbornTargetIDsStartFrom(int minNewTargetID)
Specify the starting target-ID for newborn targets


drawSample

public DataAssociation drawSample()
Description copied from interface: SamplingDistribution
Generate a new sample from this density. This method should create a new object.

Specified by:
drawSample in interface SamplingDistribution<DataAssociation>
Specified by:
drawSample in class AbstractAssociationDistribution<S extends TargetID,T extends TargetID>
Returns:
new sample object

drawSampleDebug

public DataAssociation drawSampleDebug(DataAssociation groundtruth,
                                       OutputStream ostream)
Specified by:
drawSampleDebug in class AbstractAssociationDistribution<S extends TargetID,T extends TargetID>

p

public double p(DataAssociation x)
This method is here only valid for the latest DataAssociation sampled with drawSample(). If no DataAssociation was sampled before or the given DataAssociation x is a different object than the latest sampled DataAssociation or a new observation was set, this method return -1 !!

Specified by:
p in interface EvaluatableDistribution<DataAssociation>
Parameters:
x - realization of random variable X
Returns:
value of p(X) at x

log_p

public double log_p(DataAssociation x)
This method is here only valid for the latest DataAssociation sampled with drawSample(). If no DataAssociation was sampled before or the given DataAssociation x is a different object than the latest sampled DataAssociation or a new observation was set, this method returns Double.NaN !!

Specified by:
log_p in interface LogEvaluatableDistribution<DataAssociation>
Parameters:
x - realization of random variable X
Returns:
value of log(p(X)) at x

setNewObservations

public void setNewObservations(AbstractMultiState<S> Z,
                               AbstractMultiObservationDistributionIndep<S,T> observationDistrib)
Overrides:
setNewObservations in class AbstractAssociationDistribution<S extends TargetID,T extends TargetID>

reset

protected void reset()


Copyright © 2010–2015 Martin Luther University Halle-Wittenberg. All rights reserved.