From 2fbc1caa11767263cb6a687036c7ffd1ba3bcfdb Mon Sep 17 00:00:00 2001 From: Jesse Krijthe Date: Sun, 30 Sep 2018 15:54:48 +0200 Subject: [PATCH] Default number of cores to 1. --- R/Rtsne.R | 4 ++-- man/Rtsne.Rd | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/R/Rtsne.R b/R/Rtsne.R index ec37092..b4d461a 100644 --- a/R/Rtsne.R +++ b/R/Rtsne.R @@ -36,7 +36,7 @@ #' @param final_momentum numeric; Momentum used in the final part of the optimization (default: 0.8) #' @param eta numeric; Learning rate (default: 200.0) #' @param exaggeration_factor numeric; Exaggeration factor used to multiply the P matrix in the first part of the optimization (default: 12.0) -#' @param num_threads integer; Number of threads to use using OpenMP, default (0) corresponds to using all available cores +#' @param num_threads integer; Number of threads to use using OpenMP, default 1. 0 corresponds to using all available cores #' #' @return List with the following elements: #' \item{Y}{Matrix containing the new representations for the objects} @@ -92,7 +92,7 @@ Rtsne.default <- function(X, dims=2, initial_dims=50, stop_lying_iter=ifelse(is.null(Y_init),250L,0L), mom_switch_iter=ifelse(is.null(Y_init),250L,0L), momentum=0.5, final_momentum=0.8, - eta=200.0, exaggeration_factor=12.0, num_threads=0, ...) { + eta=200.0, exaggeration_factor=12.0, num_threads=1, ...) { is.wholenumber <- function(x, tol = .Machine$double.eps^0.5) abs(x - round(x)) < tol diff --git a/man/Rtsne.Rd b/man/Rtsne.Rd index d6a087f..5ce4a57 100644 --- a/man/Rtsne.Rd +++ b/man/Rtsne.Rd @@ -17,7 +17,7 @@ Rtsne(X, ...) stop_lying_iter = ifelse(is.null(Y_init), 250L, 0L), mom_switch_iter = ifelse(is.null(Y_init), 250L, 0L), momentum = 0.5, final_momentum = 0.8, eta = 200, exaggeration_factor = 12, - num_threads = 0, ...) + num_threads = 1, ...) \method{Rtsne}{dist}(X, ..., is_distance = TRUE) @@ -66,7 +66,7 @@ Rtsne(X, ...) \item{exaggeration_factor}{numeric; Exaggeration factor used to multiply the P matrix in the first part of the optimization (default: 12.0)} -\item{num_threads}{integer; Number of threads to use using OpenMP, default (0) corresponds to using all available cores} +\item{num_threads}{integer; Number of threads to use using OpenMP, default 1. 0 corresponds to using all available cores} } \value{ List with the following elements: