Runs one Fisher Scoring step
# S3 method for tensorflow.tensor
glm_fit_one_step(
x,
response,
model,
model_coefficients_start = NULL,
predicted_linear_response_start = NULL,
l2_regularizer = NULL,
dispersion = NULL,
offset = NULL,
learning_rate = NULL,
fast_unsafe_numerics = TRUE,
name = NULL,
...
)
A glm_fit
object with parameter estimates, and
number of required steps.
float-like, matrix-shaped Tensor where each row represents a sample's features.
vector-shaped Tensor where each element represents a sample's
observed response (to the corresponding row of features). Must have same dtype
as x
.
a string naming the model (see glm_families) or a tfp$glm$ExponentialFamily-like
instance which implicitly characterizes a negative log-likelihood loss by specifying
the distribuion's mean, gradient_mean, and variance.
Optional (batch of) vector-shaped Tensor representing
the initial model coefficients, one for each column in x
. Must have same dtype
as model_matrix. Default value: Zeros.
Optional Tensor with shape, dtype
matching
response
; represents offset shifted initial linear predictions based on
model_coefficients_start
. Default value: offset if model_coefficients is NULL
,
and tf$linalg$matvec(x, model_coefficients_start) + offset
otherwise.
Optional scalar Tensor representing L2 regularization penalty.
Default: NULL
ie. no regularization.
Optional (batch of) Tensor representing response dispersion.
Optional Tensor representing constant shift applied to predicted_linear_response
.
Optional (batch of) scalar Tensor used to dampen iterative progress.
Typically only needed if optimization diverges, should be no larger than 1 and typically
very close to 1. Default value: NULL
(i.e., 1).
Optional Python bool indicating if faster, less numerically accurate methods can be employed for computing the weighted least-squares solution. Default value: TRUE (i.e., "fast but possibly diminished accuracy").
usesed as name prefix to ops created by this function. Default value: "fit".
other arguments passed to specific methods.
Other glm_fit:
glm_families
,
glm_fit.tensorflow.tensor()