Skip to content

Commit

Permalink
added multiple core support
Browse files Browse the repository at this point in the history
  • Loading branch information
michbur committed Aug 27, 2024
1 parent c072cda commit 556ab3e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ importFrom(graphics,mtext)
importFrom(graphics,par)
importFrom(graphics,plot)
importFrom(graphics,points)
importFrom(parallel,mclapply)
importFrom(partitions,listParts)
importFrom(pbapply,pblapply)
importFrom(stats,cutree)
importFrom(stats,dist)
importFrom(stats,dmultinom)
Expand Down
4 changes: 2 additions & 2 deletions R/test_features.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#' removed using the threshold parameter.
#' @export
#' @importFrom Matrix colSums
#' @importFrom pbapply pblapply
#' @importFrom parallel mclapply
#' @keywords nonparametric
#' @references
#' Radivojac P, Obradovic Z, Dunker AK, Vucetic S,
Expand Down Expand Up @@ -135,7 +135,7 @@ test_features <- function(target, features, criterion = "ig", adjust = "BH",

names(dists) <- feature_size

setNames(unlist(pblapply(1L:ncol(features), function(ith_feature_id) {
setNames(unlist(mclapply(1L:ncol(features), function(ith_feature_id) {
estm <- crit_function(target, features[, ith_feature_id, drop = FALSE])
dist <- dists[[paste(sum(features[, ith_feature_id, drop = FALSE]))]]
1 - dist[which.max(dist[, "criterion"] >= estm - 1e-15), "cdf"]
Expand Down

0 comments on commit 556ab3e

Please sign in to comment.