Description Usage Arguments Value
This function can protect a model which was trained on a certain
metric against non-finite results. The idea is that we use the model
directly for any situation where the results are finite. When they are not
finite, we try to extrapolate the model values linearly between the two
closest finite results. If we fail in doing so, we simply extrapolate
results from the x-y
data directly.
Using protected models may be useful if a model function f
includes,
e.g., a log-scaled x
-axis and is fed with an x-coordinate where the
log would receive a zero or negative parameter.
Notice: This function and using the produced model may lead to many warnings.
1 | model.protect(f, x, y)
|
f |
the trained model |
x |
the |
y |
the |
a new model function which can be as drop-in replacement for f
and will produce the same results as f
for all inputs where f
has finite results and finite output results where f
does
yield non-finite results.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.