r8_sigmoid <- function ( l, b, m, x ) #*****************************************************************************80 # ## r8_sigmoid() evaluates the sigmoid or logistic function. # # Discussion: # # An R8 is a double precision real value. # # The sigmoid function is useful for classification problems in # machine learning. Its value is always between 0 and L. # # Licensing: # # This code is distributed under the MIT license. # # Modified: # # 12 September 2026 # # Author: # # John Burkardt # # Input: # # real l: the maximum value of the function. This is often 1. # # real b: the cutoff value, where the function equals l/2. # This is often 0. # # real m: the slope, which determines the steepness of the curve # and the width of the uncertainty interval. This is often 1. # # real x: the argument. # # Output: # # real value: the value. # { value = l / ( 1.0 + exp ( - m * ( x - b ) ) ) return ( value ) }