View source on GitHub |
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
.
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 .
|