Nothing
#' Sigmoid function
#'
#' This function takes a number \eqn{\theta} and returns its
#' respective sigmoid probability \eqn{\frac{e^{theta}}{1+e^{theta}}}.
#' This is used in logistic regression to model \eqn{P(y=1|x)}.
#' @param theta the linear predictor
#' @return the sigmoid probability
#' @export
#' @examples
#' sigmoid(0)
sigmoid <- function(theta) {
if (!(is.numeric(theta))) {
stop("non-numeric input")
}
return(exp(theta) / (1 + exp(theta)))
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.