rmcgibbo/mixtape — pull request #149 by kyleabeauchamp (2014-05-13 19:51:51+00:00)
Title: Created means function in ghmm.

Example code:

```
import numpy as np
import mixtape.ghmm
from parameters import load_trajectories
import sklearn.pipeline, sklearn.externals.joblib, sklearn.mixture
from entropic import models, scoring

trj0, trajectories, filenames = load_trajectories()

X_all = sklearn.externals.joblib.load("./data.job")
q = np.concatenate(X_all)

n_states = 4
n_tics = 2

model = mixtape.ghmm.GaussianFusionHMM(n_states, n_tics, fusion_prior=0.)
model.fit(X_all)

trj_ind, frame_ind, mean_approx = model.find_means(X_all)
trj_ind, frame_ind, mean_approx, mean_traj = model.find_means(X_all, trajectories)
```