Skip to content

AttributeError in fb_pca #5

@kvshams

Description

@kvshams

Was trying [Ufb,Sfb,Vfb]=mimosca.fb_pca(DGEwtZ,k=20) in the DC_celltypes-wt-github.ipynb

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-45-a1934ebf4e01> in <module>
      1 #Facebook's Fast PCA (useful if using more than 10,000 cells) for calculating SVD, top 50 components
      2 #[Ufb,Sfb,Vfb]=mimosca.fb_pca(DGEwtZ,k=50)
----> 3 [Ufb,Sfb,Vfb]=mimosca.fb_pca(DGEwtZ,k=50)

~/Tools/MIMOSCA/mimosca.py in fb_pca(DGE, k)
   1269 def fb_pca(DGE,k=50):
   1270     if 'fbpca' in sys.modules:
-> 1271         [Ufb,Sfb,Vfb]=fbpca.pca(DGE,k)
   1272     else:
   1273         pca=sklearn.decomposition.PCA(n_components=k)

~/miniconda3/lib/python3.7/site-packages/fbpca.py in pca(A, k, raw, n_iter, l)
   1636         #
   1637         c = A.sum(axis=0) / m
-> 1638         c = c.reshape((1, n))
   1639 
   1640         #

~/miniconda3/lib/python3.7/site-packages/pandas/core/generic.py in __getattr__(self, name)
   5177             if self._info_axis._can_hold_identifiers_and_holds_name(name):
   5178                 return self[name]
-> 5179             return object.__getattribute__(self, name)
   5180 
   5181     def __setattr__(self, name, value):

AttributeError: 'Series' object has no attribute 'reshape'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions