Skip to content

Commit

Permalink
rm message
Browse files Browse the repository at this point in the history
  • Loading branch information
kalidouBA committed Dec 7, 2023
1 parent d0039d1 commit f4c3978
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/NMF_optim.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ nmf_conjugate_gradient <- function(V, k = 1, W = NULL, H = NULL, upper_ = Inf) {
# Perform projected conjugate gradient optimization
result <- optim(par = theta, fn = obj_fun, gr = grad_obj_fun, method = "L-BFGS-B",
lower = rep(0, length(theta)), upper = rep(upper_, length(theta)),
control = list(maxit = 1000, trace = 1, factr = 1e-8))
control = list(maxit = 1000, trace = FALSE, factr = 1e-8))

W <- matrix(result$par[1:(nrow(V) * k)], nrow = nrow(V), ncol = k)
H <- matrix(result$par[(nrow(V) * k + 1):length(result$par)], nrow = k, ncol = ncol(V))
Expand Down

0 comments on commit f4c3978

Please sign in to comment.