A widely used type of composition is the nonlinear weighted sum , where math \ textstyle f ( x ) = K \ left ( \ sum _ i w _ i g _ i ( x ) \ right ) / math , where math \ textstyle K / math ( commonly referred to as the activation function ) is some predefined function , such as the hyperbolic tangent , sigmoid function , softmax function , or rectifier function .