September 16, 2013

Finished testing `construct_attachment_covariance.m`

against legacy method for constructing covariance matrix. Constructed new test `wacv_2014/run_wacv_2.m`

to compare new method against old method in `wacv_2014/run_wacv.m`

. After significant amount of debugging, results match.

**Tweak to Corr.prior_K: ** don't replicate until needed. New function `tools/one_d_to_trhee_d`

helps with this.

Now, to test new covariance matrix algorithm against the existing branching ML code to confirm that the latter is correct...

Wrote `curve_tree_ml_ref`

Having trouble running on wacv dataset. The covariance matrix constructed by `construct_attachment_covariance`

has several *negative eigenvalues* (magnitude on the order of 1000). These don't appear when attachments don't exist.

Old method of constructing the covariance matrix has several negative eigenvalues, but they're on the order of 1e-9. (were'nt they identical?)

Lets go back to the WACV example and run everything on those...

The big question to answer is: **is WACV ML better with attachments or worse?**

On second look, the test and reference prior matricies **don't** match. Going back to debugging `construct_attachment_covaraince.m`

found bug in bugfix in attach.m. results now match

Now covariancaes from wacv and curve_tree_ml_ref don't match. Furthermore, curve_tree_ml_ref crashes because the matrix isn't positive definite.

Found issue: wacv program forced model_type to be 1 (no-perturb model). This accounts for the difference between wacv reconstruction and the reference ML code.

Still don't know why we're getting negative eigenvalues when model_type != 1.

Q: What is needed to get end-to-end running?

- Efficient ML for branching model.
- inference of branch points, given attachment (part of proposal mechanism?)
- training with attachment
- updated training ML
- updated training procedure
- joint training of foreground and background, with shared noise parameter

- re-write sampling infrastructure
- pair candidates
- gibbs moves
- merge/split (using Swendsen Wang?)
- attach/detach
- HACKS
- background subtraction?
- "cheating" (nonreversible) merge/split
- forced attachment?
- heuristic initialization?

- Finish debugging reference ML:
`curve_tree_ml_ref.m`

- why are we getting negative eigenvalues in prior matrix when model_type > 1?
- compare against long-hand version of matrix (slow, full recursive version). Does it still have negative eigenvalues?

- Confirm that WACV dataset has better ML when attachments are modeled.

Building reference implementation of full-tree covariance →
← Branching prior covariance; implementing