|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--javaslam.filter.InformationFilter
An Information filter.
This class records counts of all floating point operations using
Flops.count(long) (except those used in the service of
debugging and avoiding numerical errors).
| Field Summary | |
protected Gaussian |
p
The canonical potential representing the belief state. |
| Constructor Summary | |
InformationFilter(Gaussian p)
Constructor. |
|
| Method Summary | |
static Gaussian |
getConditionalGaussian(ListSet vars,
Matrix y0,
Matrix C,
Matrix R,
Matrix y)
Creates a linear-Gaussian measurement potential. |
Gaussian |
getDistribution()
Returns the current filtered belief state. |
Gaussian |
getMarginal(Set vars)
Extracts the filtered marginal distribution. |
Map |
getMarginals(Collection vars)
Extracts a set of unary marginals. |
static Gaussian |
getUnconditionalGaussian(ListSet newVars,
ListSet vars,
Matrix x0,
Matrix A,
Matrix Q)
Constructs a linear-Gaussian potential that introduces a set of new unobserved variables. |
Set |
getVariables()
Gets an unmodifiable set of the Variables in the
filtered belief state. |
void |
marginalizeOut(Set mvars)
Marginalizes a set of variables out of the belief state. |
void |
measurement(ListSet vars,
double[] y0,
double[][] C,
double[][] R,
double[] y)
Performs a linear-Gaussian measurement update. |
void |
time(ListSet vars,
double[] x0,
double[][] A,
double[][] Q)
Performs a linear-Gaussian time update. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Gaussian p
| Constructor Detail |
public InformationFilter(Gaussian p)
p - the initial belief state| Method Detail |
public Gaussian getDistribution()
public void marginalizeOut(Set mvars)
marginalizeOut in interface Filtermvars - a set of Variables to marginalize out
public static Gaussian getConditionalGaussian(ListSet vars,
Matrix y0,
Matrix C,
Matrix R,
Matrix y)
vars, C and R define the
measurement equation as follows:
where w is a white-noise variable with covariancey= y0+Cx(vars)+w
R. Given the actual measurement y,
this method computes the potential over vars that,
when multiplied into a distribution over vars, has
the effect of conditioning on y.
vars - an ordered set of the variables with sum dimension
n in the belief state that causally influenced
this measurement; any variables in this list that are
not currently in the belief state are added with
uninformative priors.y0 - a k-vector giving the constant termC - a k by n observation matrix that defines the
linear measurement model (and whose columns are ordered
consistently with the order of vars)R - a k by k symmetric positive definite matrix
giving the covariance of the measurement white noisey - the measurement k-vector
y
IllegalArgumentException - if there are any dimension mismatches
public void measurement(ListSet vars,
double[] y0,
double[][] C,
double[][] R,
double[] y)
vars, C and R define the
measurement equation as follows:
where w is a white-noise variable with covariancey= y0+Cx(vars)+w
R. Given the actual measurement y,
this method updates the belief state in O(1) time.
measurement in interface Filtervars - an ordered set of the variables with sum dimension
n in the belief state that causally influenced
this measurement; any variables in this list that are
not currently in the belief state are added with
uninformative priors.y0 - a k-vector giving the constant termC - a k by n observation matrix that defines the
linear measurement model (and whose columns are ordered
consistently with the order of vars)R - a k by k symmetric positive definite matrix
giving the covariance of the measurement white noisey - the measurement k-vector
IllegalArgumentException - if there are any dimension mismatches
public static Gaussian getUnconditionalGaussian(ListSet newVars,
ListSet vars,
Matrix x0,
Matrix A,
Matrix Q)
vars,
newVars, x0, A and
Q define the distribution of the new variables as
follows:
where v is a white-noise variable with covariancenewVars=x0Avars+v
Q.
Multiplying the returned potential into a junction tree will not result in message passing; the junction tree is already consistent. This is because the new variables are barren nodes, i.e., unobserved children of the other variables, and thus do not change their distribution.
newVars - an ordered set of variables with sum dimension
n that are not present in the belief statevars - an ordered set of variables with sum dimension
m that are currently in the belief statex0 - an n-vector giving the constant termA - an n by m linear coefficient matrixQ - an n by n symmetric positive definite
matrix giving the covariance of the white noise
newVars into the belief state as a
directed child of vars
IllegalArgumentException - if there are any dimension mismatches
public void time(ListSet vars,
double[] x0,
double[][] A,
double[][] Q)
vars, A and Q define the
state evolution equation as follows:
where v is a white-noise variable with covariancext + 1( vars)=x0Axt(vars)+v
Q. All variables not in vars are
assumed stationary.
time in interface Filtervars - an ordered set of the variables with sum dimension n
in the belief state that evolve over timex0 - an n-vector giving the constant termA - an n by n evolution matrix that defines the
linear evolution model (and whose blocks are ordered
consistently with the order of vars)Q - an n by n symmetric positive definite matrix
giving the covariance of the evolution white noise (and
whose blocks are ordered consistently with the order
of vars)
IllegalArgumentException - if there are any dimension mismatches
or vars contains variables
that are not in the current belief statepublic Gaussian getMarginal(Set vars)
getMarginal in interface Filtervars - the set of Variables whose filtered
marginal is to be computed
varspublic Map getMarginals(Collection vars)
getMarginals in interface Filtervars - a collection of Variables, or
null to indicate all variables in the belief state
vars and whose values are the corresponding
marginals (in the moment parameterization)public Set getVariables()
Variables in the
filtered belief state.
getVariables in interface Filter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||