Comments (2)
@topepo Thanks for raising this issue, clearly it's causing you some trouble. Unfortunately, I could not reproduce your example using the dataset as supplied on two different machines (Windows and CentOS). I tried all seeds between 1 and 10000 for k = 5. In no case was all(is.na(res$w)) == TRUE
.
Yes, too much regularization can drive a factor in w
or h
to complete sparsity, and thus numerical instability. That is the expectation.
Here's what my initial w
matrix looks like:
> w_init <- nmf(biomass, k = 5, seed = 1, maxit = 0)$w
iter | tol
---------------
> w_init
[,1] [,2] [,3] [,4] [,5]
[1,] 0.2655087 0.89838968 0.2059746 0.4976992 0.9347052
[2,] 0.3721239 0.94467527 0.1765568 0.7176185 0.2121425
[3,] 0.5728534 0.66079779 0.6870228 0.9919061 0.6516738
[4,] 0.9082078 0.62911404 0.3841037 0.3800352 0.1255551
[5,] 0.2016819 0.06178627 0.7698414 0.7774452 0.2672207
> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)
I also tried on a different machine:
> sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
> library(RcppML)
> library(modeldata)
> library(Matrix)
>
> data(biomass)
>
> biomass <- biomass[, 3:7]
> biomass <- as.matrix(biomass)
> biomass <- t(biomass)
> biomass <- Matrix(biomass, sparse = TRUE)
>
> res <- nmf(biomass, k = 5, seed = 1, maxit = 5)
iter | tol
---------------
1 | 4.58e-01
2 | 1.03e-01
3 | 5.50e-03
4 | 8.68e-04
5 | 6.20e-04
convergence not reached in 5 iterations
(actual tol = 6.20e-04, target tol = 1.00e-04)
> all(is.na(res$w))
[1] FALSE
from rcppml.
I updated to the GH version and was able to reproduce what you have. Thanks!
from rcppml.
Related Issues (20)
- do we need to remove batch effect? HOT 4
- RcppML::project renamed? HOT 4
- crossValidate aborting R HOT 3
- how to check the top features in each rank? HOT 2
- Functions don't work unless Matrix is loaded HOT 3
- How to perform orthogonal NMF and other questions. HOT 4
- Initialization HOT 2
- compilation of the development version failing HOT 3
- Matrix package deprecations
- Factor loadings dominated by mitochondrial and ribosomal genes HOT 1
- Example code is broken, need to run library(RcppML) first HOT 1
- Upper-bounded NNLS HOT 14
- How to emulate functionality from NMF package for estimating the factorization rank HOT 8
- Matrix-related error in dev version of crossValidate HOT 3
- Alternative Strategy for NNLS Updates HOT 1
- Is number of iterations for conversion significant? HOT 3
- Cran update HOT 2
- lnmf HOT 2
- `SparseMatrix::t()` doesn't work unless Matrix is fully attached HOT 8
- R code example in the README is broken? HOT 1
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 rcppml.