final Matrix G = MatrixFactory.getDefault().copyArray(new double[][] {
{1d}});
final Matrix modelCovariance = MatrixFactory.getDefault().copyArray(new double[][] {
{1d}});
final LogitFSWFFilter plFilter =
new LogitFSWFFilter(initialPrior,
F, G, modelCovariance, rng);
plFilter.setNumParticles(2000);
final DataDistribution<LogitMixParticle> currentMixtureDistribution =
plFilter.createInitialLearnedObject();
double lastRMSE = Double.POSITIVE_INFINITY;
for (int i = 0; i < N; i++) {
final ObservedValue<Vector, Matrix> observation = observations.get(i);
log.info("obs:" + observation);
plFilter.update(currentMixtureDistribution, observation);
List<WeightedValue<Vector>> wMeanValues = Lists.newArrayList();
List<WeightedValue<Matrix>> wCovValues = Lists.newArrayList();
final Vector trueState = dlmSamples.get(i).getTrueState();
double sum = 0d;