tfp.glm.convergence_criteria_small_relative_norm_weights_change
Stay organized with collections
Save and categorize content based on your preferences.
Returns Python callable
which indicates fitting procedure has converged.
tfp.glm.convergence_criteria_small_relative_norm_weights_change(
tolerance=1e-05, norm_order=2
)
Writing old, new model_coefficients
as w0
, w1
, this function
defines convergence as,
relative_euclidean_norm = (tf.norm(w0 - w1, ord=2, axis=-1) /
(1. + tf.norm(w0, ord=2, axis=-1)))
reduce_all(relative_euclidean_norm < tolerance)
where tf.norm(x, ord=2)
denotes the Euclidean norm of x
.
Args |
tolerance
|
float -like Tensor indicating convergence, i.e., when
max relative Euclidean norm weights difference < tolerance.
Default value: 1e-5.
</td>
</tr><tr>
<td> norm_order<a id="norm_order"></a>
</td>
<td>
Order of the norm. Default value: 2` (i.e., "Euclidean norm".)
|
Returns |
convergence_criteria_fn
|
Python callable which returns bool Tensor
indicated fitting procedure has converged. (See inner function
specification for argument signature.)
Default value: 1e-5 .
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-11-21 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-11-21 UTC."],[],[]]