-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
45 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
==================== | ||
Knobs and Parameters | ||
==================== | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
postprocessor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
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 function ``f(x) = sign(x) * (x**2)`` element-wise to the margin score vector. | ||
* ``hinge``: Apply the function ``f(x) = (1 if x > 0 else 0)`` element-wise to the margin score vector. | ||
* ``sigmoid``: Apply the sigmoid function ``f(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]``. The ``sigmoid_alpha`` parameter | ||
can be configured by the user. | ||
* ``exponential``: Apply the exponential function (``exp``) element-wise to the margin score vector. | ||
* ``exponential_standard_ratio``: Apply the function ``f(x) = exp2(-x / ratio_c)`` element-wise to the margin score | ||
vector. The ``ratio_c`` parameter can be configured by the user. | ||
* ``logarithm_one_plus_exp``: Apply the function ``f(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 function ``f(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 function ``f(x) = 1/(1+exp(-sigmoid_alpha * x))`` element-wise to the margin | ||
scores. The ``sigmoid_alpha`` parameter can be configured by the user. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters