List of postprocessor functions
When predicting with tree ensemble models, we sum the margin scores from individual trees and apply a postprocessor function to transform the sum into a final prediction. This function is also known as the link function.
Currently, Treelite supports the following postprocessor functions.
Element-wise postprocessor functions
identity: The identity function. Do not apply any transformation to the margin score vector.signed_square: Apply the functionf(x) = sign(x) * (x**2)element-wise to the margin score vector.hinge: Apply the functionf(x) = (1 if x > 0 else 0)element-wise to the margin score vector.sigmoid: Apply the sigmoid functionf(x) = 1/(1+exp(-sigmoid_alpha * x))element-wise to the margin score vector, to transform margin scores into probability scores in the range[0, 1]. Thesigmoid_alphaparameter can be configured by the user.exponential: Apply the exponential function (exp) element-wise to the margin score vector.exponential_standard_ratio: Apply the functionf(x) = exp2(-x / ratio_c)element-wise to the margin score vector. Theratio_cparameter can be configured by the user.logarithm_one_plus_exp: Apply the functionf(x) = log(1 + exp(x))element-wise to the margin score vector.
Row-wise postprocessor functions
identity_multiclass: The identity function. Do not apply any transformation to the margin score vector.softmax: Use the softmax functionf(x) = exp(x) / sum(exp(x))to the margin score vector, to transform the margin scores into probability scores in the range[0, 1]. Adding up the transformed scores for all classes will yield 1.multiclass_ova: Apply the sigmoid functionf(x) = 1/(1+exp(-sigmoid_alpha * x))element-wise to the margin scores. Thesigmoid_alphaparameter can be configured by the user.