Runs multiple Fisher scoring steps
# S3 method for tensorflow.tensor glm_fit( x, response, model, model_coefficients_start = NULL, predicted_linear_response_start = NULL, l2_regularizer = NULL, dispersion = NULL, offset = NULL, convergence_criteria_fn = NULL, learning_rate = NULL, fast_unsafe_numerics = TRUE, maximum_iterations = NULL, name = NULL, ... )
x | float-like, matrix-shaped Tensor where each row represents a sample's features. |
---|---|
response | vector-shaped Tensor where each element represents a sample's
observed response (to the corresponding row of features). Must have same |
model | a string naming the model (see glm_families) or a |
model_coefficients_start | Optional (batch of) vector-shaped Tensor representing
the initial model coefficients, one for each column in |
predicted_linear_response_start | Optional Tensor with shape, |
l2_regularizer | Optional scalar Tensor representing L2 regularization penalty.
Default: |
dispersion | Optional (batch of) Tensor representing response dispersion. |
offset | Optional Tensor representing constant shift applied to |
convergence_criteria_fn | callable taking: |
learning_rate | 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: |
fast_unsafe_numerics | 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"). |
maximum_iterations | Optional maximum number of iterations of Fisher scoring to run;
"and-ed" with result of |
name | usesed as name prefix to ops created by this function. Default value: "fit". |
... | other arguments passed to specific methods. |
A glm_fit
object with parameter estimates, and
number of required steps.
Other glm_fit:
glm_families
,
glm_fit_one_step.tensorflow.tensor()