R/Sigmoid.R

Defines functions sigmoid

Documented in sigmoid

#' Sigmoid Function
#'
#' The sigmoid function is also called a squashing function as its domain is the set of all real numbers, and its range is (0, 1)
#'
#' @param x matrix of explanatory variables to predict
#'
#' @export
#' @return Returns a vector of positive / negative class membership probabilities
#' @examples
#' sigmoid(x)
sigmoid <- function(x){
  return(1/(1+exp(-x)))
}
FD155/GradDesc documentation built on Dec. 17, 2021, 7:31 p.m.