Closed mobeets closed 8 years ago
i predict the same, but when scoring, i only score the latent predictions at timepoints where the spikes that would produce those latents (i.e., solving for latents given the spikes would reproduce the latents) are all above 0 and below 50.
note that around 20% of the observed latents would fail this test. but habitual fails about 35% and unconstrained around 45%.
anyway, this makes unconstrained about at the level of habitual, in terms of the mean.
the covError appears to be worse for unconstrained though, as expected.
or if I just check if generative model (diag(sigma)*Lz + mu
) mean has non-negative spikes, then this is the percent that are invalid:
true habitual cloud unconstrained [0.1176 0.1133 0.0574 0.2208]
can't evaluate mvncdf for more than 25 dims, so what I can do is see if, wherever it is negative, we can add some percentage of phi to it and get it to be positive.
and if we can add 0.01*phi to make it positive, this only happens for at most 2 neurons at a time, for any hyp.
see tools.latentsHaveValidSpikes
I find a solution to Eqn 5 above such that u_t is above 0 and below 40 or so
this ends up saying everything is valid. dang. so to go back what i was doing before: latent is valid if the mean spikes from the generative model are within range.
for each date (rows), here's the percentage is says are invalid:
true hab cld unc base min
12 12 6 22 4 100
13 17 16 17 0 100
0 2 1 2 0 100
1 3 2 5 0 81
8 11 8 12 0 72
If instead I use empirical min and max bounds from intuitive block...
true hab cld unc base min*
3 12 3 25 0 100
4 11 4 18 0 100
1 6 2 12 0 100
9 20 6 28 0 100
5 20 5 33 0 100
verify (matt seemed suspicious) that matt's approach always finds latents to be valid
yeah, verified. here's the approach that finds all hypothesis predictions as valid:
for each latent (lts), solves for spikes (sps) such that:
A*sps = lts + A*mu
s.t. lb <= sps <= ub
i.e., beta*zs = lts
where zs = inv(diag(sigma))*(sps - mu)
is just the z-scored sps
I think that this succeeds means that most hypotheses are valid in terms of individual spikes, but it's probably breaking the covariances that really makes some hypotheses so bad.
didn't change much for unconstrained on 20131205:
before (no correction):
after (correcting spikes if the generative model is out of bounds):
i.e., no predictions in latent space require spikes above 100 (e.g.) or below 0 for any neuron
talk to Matt about linear program to find if latent value is generatable without negative firing or too large firing Steve: bound all spikes with 0 and, e.g., 100 spikes