gdurif / pcmf Goto Github PK
View Code? Open in Web Editor NEWpCMF R package
License: GNU General Public License v2.0
pCMF R package
License: GNU General Public License v2.0
Thank you for very nice package
I want to calculate variance for each component
How can i calculate it?
Hi @gdurif, I tried to use your R package. I was able to successfully install the package, but I ran into trouble when trying to run the cNMF example provided. This is the error I get:
Declaration
Initialization
Optimization
iter 0
*** caught segfault ***
address 0x7ffeecfec000, cause 'memory not mapped'
This is the exact code I ran (note that I added a set.seed
; without it, your example is not reproducible):
library(pCMF)
set.seed(1)
n <- 100
p <- 500
K <- 20
# SIMULATE DATA
# -------------
factorU <- generate_factor_matrix(n,K,ngroup = 3,
average_signal = c(250,100,250),
group_separation = 0.8,
distribution = "exponential",
shuffle_feature = TRUE)
factorV <- generate_factor_matrix(p,K,ngroup = 2,average_signal = 80,
group_separation = 0.8,
distribution = "exponential",
shuffle_feature = TRUE,
prop_noise_feature = 0.6)
U <- factorU$factor_matrix
V <- factorV$factor_matrix
count_data <- generate_count_matrix(n,p,K,U,V,ZI = TRUE,prob1 = rep(0.3,p))
X <- count_data$X
kept_cols <- prefilter(X,prop = 0.05,quant_max = 0.95,
presel = TRUE,threshold = 0.2)
X <- X[,kept_cols]
# FIT MATRIX FACTORIZATION
# ------------------------
out <- pCMF(X,K,verbose = TRUE,zero_inflation = TRUE,sparsity = TRUE)
Please advise. Note that I am using R 3.4.3 on a MacBook Pro:
> sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.6
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] pCMF_1.2.1
loaded via a namespace (and not attached):
[1] Rcpp_1.0.1 magrittr_1.5 maps_3.3.0
[4] tidyselect_0.2.5 munsell_0.4.3 colorspace_1.4-0
[7] lattice_0.20-35 R6_2.4.0 rlang_0.3.1
[10] plyr_1.8.4 dplyr_0.8.0.1 tools_3.4.3
[13] fields_9.6 dotCall64_1.0-0 grid_3.4.3
[16] spam_2.2-2 gtable_0.2.0 lazyeval_0.2.1
[19] assertthat_0.2.1 tibble_2.1.1 RcppEigen_0.3.3.5.0
[22] crayon_1.3.4 Matrix_1.2-12 purrr_0.2.5
[25] ggplot2_3.2.0 glue_1.3.1 compiler_3.4.3
[28] pillar_1.3.1 scales_0.5.0 pkgconfig_2.0.2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.