Skip to content

Commit

Permalink
default to nthread in gower::gower_topn()
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilHvitfeldt committed Aug 14, 2023
1 parent 8bdac23 commit 4b77524
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/smotenc_impl.R
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ smotenc_data <- function(data, k, n_samples, smotenc_ids = seq_len(nrow(data)))
# outputs a matrix, each row is a minority instance and each column is a nearest neighbor
# k is +1 because the sample is always a nearest neighbor to itself
suppressWarnings(
ids <- t(gower::gower_topn(x = data, y = data, n = k + 1, )$index)
ids <- t(gower::gower_topn(x = data, y = data, n = k + 1, nthread = 1)$index)
)

# shuffles minority indicies and repeats that shuffling until the desired number of samples is reached
Expand Down

0 comments on commit 4b77524

Please sign in to comment.