gregversteeg / CorEx

CorEx or "Correlation Explanation" discovers a hierarchy of informative latent factors. This reference implementation has been superseded by other versions below.
GNU General Public License v2.0
303 stars 53 forks source link

MemoryError #5

Open ewysocka opened 8 years ago

ewysocka commented 8 years ago

Hi, I'd like to apply your method to my research problem (computational systems biology). I'm trying to run fit method with my data (2d array, dim: 30 x 13800) and keep getting the following error:

Warning: Data matrix values should be consecutive integers starting with 0,1,...
Traceback (most recent call last):
  File "projectrepo/green/corex_fernandez/test.py", line 17, in <module>
    lv31.fit(arx)
  File "/home/fewpills/projectrepo/green/corex_fernandez/corex.py", line 202, in fit
    self.fit_transform(X)
  File "/home/fewpills/projectrepo/green/corex_fernandez/corex.py", line 229, in fit_transform
    self.update_marginals(X_event, self.p_y_given_x)  # Eq. 8
  File "/home/fewpills/projectrepo/green/corex_fernandez/corex.py", line 289, in update_marginals
    self.log_marg = self.calculate_p_y_xi(X_event, p_y_given_x) - self.log_p_y
  File "/home/fewpills/projectrepo/green/corex_fernandez/corex.py", line 299, in calculate_p_y_xi
    pseudo_counts = 0.001 + np.dot(X_event, p_y_given_x).transpose((1,0,2))  # n_hidden, n_events, dim_hidden
MemoryError

I've tried to run it both with python 2.7 and 3.4 as a script. I'd be grateful for any suggestions.