Giter Club home page Giter Club logo

Comments (5)

luca-dex avatar luca-dex commented on September 18, 2024

We're not the first to encounter this error... PoisonAlien/maftools#8

from sparsesignatures.

luca-dex avatar luca-dex commented on September 18, 2024

The output of this:

curr_beta <- basis(nmf(t(x),rank=K,nrun=nmf_runs))

is NULL

from sparsesignatures.

luca-dex avatar luca-dex commented on September 18, 2024

Ok, I rewrited the code in this way:

temp_nmf = nmf(t(x),rank=K,nrun=nmf_runs)
curr_beta = basis(temp_nmf)

Now, nmf() is working but the result of this call is not an NMF. As reported in the vignette, when rank is a vector, the result is an object of class NMF.rank that contain all the different object NMF in a list. It is possible to apply the basis function to every object contained in the list but not to the result of the nmf call.

For example, with K = 3:5 I can run this:

temp_nmf = nmf(t(x),rank=K,nrun=nmf_runs)
basis(temp_nmf$fit[['4']])
                           [,1]         [,2]         [,3]         [,4]
M12759_at          2.218067e+03 3.542256e+03 2.872655e-10 7.067707e+04
U46006_s_at        1.461210e+04 5.898066e+02 1.493301e+02 3.914084e+02
X70083_at          6.065541e+02 6.787854e+02 2.159494e+02 5.558119e+02
X03100_cds2_at     1.483671e+05 2.036076e+04 5.522401e+04 5.215328e+04
L32976_at          9.960974e+03 1.547032e+03 3.401427e+03 4.020798e+03
...

from sparsesignatures.

luca-dex avatar luca-dex commented on September 18, 2024

To solve the other issue with the NMF package, the only way I found is to move it to Depends instead of Imports

from sparsesignatures.

ranasats avatar ranasats commented on September 18, 2024

Another partial-solution for this is to load the NMF package along with everything else.

library("SparseSignatures")
library('NMF')
library("BSgenome.Hsapiens.1000genomes.hs37d5")

#3 was my report on this a little bit ago.

from sparsesignatures.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.