Comments (1)
A workaround to this issue is converting the object with as.matrix()
and then passing to CoGAPS with sparseOptimization=TRUE
. C++ code would still convert the matrix to sparse format and the final results are the same. The downside seems to be the increased RAM consumption as the resulting matrix is bigger. Proof of result equality below (interestingly sparse->dense->sparse takes less time to compute than sparse from file):
> library("CoGAPS")
>
> path <- 'normalized.mtx'
>
> message('dense with conversion')
dense with conversion
> tictoc::tic()
> mat <- Matrix::readMM(path)
mat <- as.matrix(mat)
res1 <- CoGAPS(mat, nIterations=100, messages=FALSE, sparseOptimization=TRUE, nPatterns=2, seed=5)
tictoc::toc()
> mat <- as.matrix(mat)
Warning message:
In asMethod(object) :
sparse->dense coercion: allocating vector of size 1.3 GiB
> res1 <- CoGAPS(mat, nIterations=100, messages=FALSE, sparseOptimization=TRUE, nPatterns=2, seed=5)
This is CoGAPS version 3.22.0
Running Standard CoGAPS on mat (36601 genes and 4898 samples)
> tictoc::toc()
46.003 sec elapsed
> message('sparse from file')
sparse from file
> tictoc::tic()
> res2 <- CoGAPS(path, nIterations=100, messages=FALSE, sparseOptimization=TRUE, nPatterns=2, seed=5)
tictoc::toc()
This is CoGAPS version 3.22.0
Running Standard CoGAPS on normalized.mtx (36601 genes and 4898 samples)
> tictoc::toc()
52.744 sec elapsed
> all.equal(res1, res2)
[1] "Attributes: < Component “metadata”: Component “totalRunningTime”: Mean relative difference: 0.03333333 >"
from cogaps.
Related Issues (20)
- CoGAPS does not learn to specifed nPatterns when runnign in dsitributed mode HOT 4
- Enable the Checkpoints HOT 2
- patternMarkers 'all' returning empty lists HOT 4
- Refactor - add comments
- Refactor - patternMarkers() HOT 2
- getPatternGeneSet gives wrong gene.set names HOT 4
- SparseOptimization pattern discrepancy HOT 16
- Cache downloads for vignette
- limit number of cores for tests HOT 1
- Cpp tests
- Standard deviation when running distributed
- Vignettes fail on querying ENSEMBL
- Error when performing getPatternHallmarks: Error in 'collect()' HOT 9
- Replace Ensemble dependency and Add overrepresentation and enrichment tests for gene sets in patterns
- Confusion on the parallelization of R CoGAPS HOT 5
- GSEA algorithms for the function getPatternHallmarks HOT 9
- default number of patterns
- Too long runtime for GoGAPS R HOT 2
- Semisupervised CoGAPS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cogaps.