From 12171ed8d8cce6eadec093a2b561b9f557f41cd0 Mon Sep 17 00:00:00 2001 From: Peter Carbonetto Date: Wed, 24 Aug 2022 13:00:11 -0500 Subject: [PATCH] Replaced more instances of dgCMatrix with CsparseMatrix. --- DESCRIPTION | 2 +- R/datasim.R | 6 +++--- R/fit_poisson_nmf.R | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 09039406..65c97e5d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Encoding: UTF-8 Type: Package Package: fastTopics -Version: 0.6-139 +Version: 0.6-140 Date: 2022-08-24 Title: Fast Algorithms for Fitting Topic Models and Non-Negative Matrix Factorizations to Count Data diff --git a/R/datasim.R b/R/datasim.R index fa1fdf67..1fe9acb5 100644 --- a/R/datasim.R +++ b/R/datasim.R @@ -60,7 +60,7 @@ simulate_count_data <- function (n, m, k, fmax = 1, lmax = 1, sparse = FALSE) { L <- rand(n,k,0,lmax) X <- generate_poisson_nmf_counts(F,L) if (sparse) - X <- as(X,"dgCMatrix") + X <- as(X,"CsparseMatrix") # Add row and column names to outputs. rownames(X) <- paste0("i",1:n) @@ -254,7 +254,7 @@ simulate_poisson_gene_data <- function (n, m, k, s, p = 1, sparse = FALSE) { L <- generate_mixture_proportions(n,k) X <- generate_poisson_nmf_counts(F,s*L) if (sparse) - X <- as(X,"dgCMatrix") + X <- as(X,"CsparseMatrix") # Add row and column names to outputs. rownames(X) <- paste0("i",1:n) @@ -293,7 +293,7 @@ simulate_multinom_gene_data <- function (n, m, k, sparse = FALSE) { F <- normalize.cols(generate_poisson_rates(m,k)) X <- generate_multinom_topic_model_counts(F,L,s) if (sparse) - X <- as(X,"dgCMatrix") + X <- as(X,"CsparseMatrix") # Add row and column names to outputs. rownames(X) <- paste0("i",1:n) diff --git a/R/fit_poisson_nmf.R b/R/fit_poisson_nmf.R index e81daaf6..f856292c 100644 --- a/R/fit_poisson_nmf.R +++ b/R/fit_poisson_nmf.R @@ -428,7 +428,7 @@ fit_poisson_nmf <- function (X, k, fit0, numiter = 100, method.text <- "CCD" cat(sprintf("Running %d %s updates, %s extrapolation ",numiter, method.text,ifelse(control$extrapolate,"with","without"))) - cat("(fastTopics 0.6-139).\n") + cat("(fastTopics 0.6-140).\n") } # INITIALIZE ESTIMATES