jeremymanning/supereeg

refactor Model to use correlation matrices directly

Closed this issue · 3 comments

switch out the numerator/denominator approach with one that uses (z-transformed) correlation matrices directly

  • when new data come in, simply compute the correlation matrix and (if needed) blur it out to the indicated locations
  • update: multiply each object by n_subs, then divided by the sum of n_subs. if locations are different, first blur both matrices out to the union of the locations
  • get_model: compute the inverse of the fisher z-transform (_z2r)
  • sub: for a - b, multiply b's correlation matrix by -1 and run a.update(b)

I'm not sure this is needed-- punting for now (removing from milestone)

If the "numerator and denominator" version works with the refactor, i think it's a stronger approach

I've refactored init, but there seems to be a bug whereby the numerator and denominator are getting set to None unexpectedly. I think I could go about this by using different cases to initialize the model:

  • specify model object directly
  • specify numerator and denominator directly
  • specify correlation matrix directly
  • specify brain object
  • specify nifti object
  • specify two model objects with same properties and ensure they're combined correctly
  • specify two model objects with different (overlapping) locations and ensure they're combined correctly
  • specify two model objects with different (non overlapping) locations and ensure they're combined correctly
  • specify a mixed list of the above and ensure everything is combined correctly

dealt with in supereeg 0.2.0