Latu.ML.Regression.GeneralizedLinearRegressionTrainingSummary (latu_ml v0.2.0)

Copy Markdown View Source

Attributes of a GeneralizedLinearRegressionTrainingSummary — what an estimator recorded while it fitted. Latu.ML.summary/1 is what hands you one.

Every accessor here is one name on the server's allowlist for org.apache.spark.ml.regression.GeneralizedLinearRegressionTrainingSummary — 17 of them — so tab completion is that allowlist. The server refuses anything else with CONNECT_ML.ATTRIBUTE_NOT_ALLOWED; these refuse a model of the wrong class before it gets that far, and name the module that would have taken it.

Allowed by the server but not here: toString is Identifiable's, and tells you less than the model's own uid; coefficientsWithStatistics takes arguments whose types nothing could read from PySpark. Latu.ML.attribute/2 and Latu.ML.attribute/3 will send any of these names; it is what comes back that has nowhere to go.

The allowlist is inherited rather than per class: this one is the union of org.apache.spark.ml.regression.GeneralizedLinearRegressionSummary, org.apache.spark.ml.regression.GeneralizedLinearRegressionTrainingSummary.

Summary

Functions

Akaike's "An Information Criterion"(AIC) for the fitted model.

The JVM class these accessors belong to.

Standard error of estimated coefficients and intercept.

Degrees of freedom.

The deviance for the fitted model.

The dispersion of the fitted model. It is taken as 1.0 for the "binomial" and "poisson" families, and otherwise estimated by the residual Pearson's Chi-Squared statistic (which is defined as sum of the squares of the Pearson residuals) divided by the residual degrees of freedom.

The deviance for the null model.

Number of instances in DataFrame predictions.

Number of training iterations.

Two-sided p-value of estimated coefficients and intercept.

Field in predictions which gives the predicted value of each instance. This is set to a new column name if the original model's predictionCol is not set.

Predictions output by the model's transform method.

The numeric rank of the fitted linear model.

The residual degrees of freedom.

The residual degrees of freedom for the null model.

Get the residuals of the fitted model by type.

The numeric solver used for training.

T-statistic of estimated coefficients and intercept.

Functions

aic(holder)

@spec aic(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}

Akaike's "An Information Criterion"(AIC) for the fitted model.

An action: it reaches the server. A Vector or Matrix comes back as an Nx.Tensor, or a Latu.ML.SparseVector where densifying would be this package's decision rather than yours.

class()

@spec class() :: String.t()

The JVM class these accessors belong to.

coefficient_standard_errors(holder)

@spec coefficient_standard_errors(Latu.ML.Summary.t()) ::
  {:ok, term()} | {:error, Latu.Error.t()}

Standard error of estimated coefficients and intercept.

An action: it reaches the server. A Vector or Matrix comes back as an Nx.Tensor, or a Latu.ML.SparseVector where densifying would be this package's decision rather than yours.

degrees_of_freedom(holder)

@spec degrees_of_freedom(Latu.ML.Summary.t()) ::
  {:ok, term()} | {:error, Latu.Error.t()}

Degrees of freedom.

An action: it reaches the server. A Vector or Matrix comes back as an Nx.Tensor, or a Latu.ML.SparseVector where densifying would be this package's decision rather than yours.

deviance(holder)

@spec deviance(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}

The deviance for the fitted model.

An action: it reaches the server. A Vector or Matrix comes back as an Nx.Tensor, or a Latu.ML.SparseVector where densifying would be this package's decision rather than yours.

dispersion(holder)

@spec dispersion(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}

The dispersion of the fitted model. It is taken as 1.0 for the "binomial" and "poisson" families, and otherwise estimated by the residual Pearson's Chi-Squared statistic (which is defined as sum of the squares of the Pearson residuals) divided by the residual degrees of freedom.

An action: it reaches the server. A Vector or Matrix comes back as an Nx.Tensor, or a Latu.ML.SparseVector where densifying would be this package's decision rather than yours.

null_deviance(holder)

@spec null_deviance(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}

The deviance for the null model.

An action: it reaches the server. A Vector or Matrix comes back as an Nx.Tensor, or a Latu.ML.SparseVector where densifying would be this package's decision rather than yours.

num_instances(holder)

@spec num_instances(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}

Number of instances in DataFrame predictions.

An action: it reaches the server. A Vector or Matrix comes back as an Nx.Tensor, or a Latu.ML.SparseVector where densifying would be this package's decision rather than yours.

num_iterations(holder)

@spec num_iterations(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}

Number of training iterations.

An action: it reaches the server. A Vector or Matrix comes back as an Nx.Tensor, or a Latu.ML.SparseVector where densifying would be this package's decision rather than yours.

p_values(holder)

@spec p_values(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}

Two-sided p-value of estimated coefficients and intercept.

An action: it reaches the server. A Vector or Matrix comes back as an Nx.Tensor, or a Latu.ML.SparseVector where densifying would be this package's decision rather than yours.

prediction_col(holder)

@spec prediction_col(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}

Field in predictions which gives the predicted value of each instance. This is set to a new column name if the original model's predictionCol is not set.

An action: it reaches the server. A Vector or Matrix comes back as an Nx.Tensor, or a Latu.ML.SparseVector where densifying would be this package's decision rather than yours.

predictions(holder)

@spec predictions(Latu.ML.Summary.t()) :: Latu.DataFrame.t()

Predictions output by the model's transform method.

A lazy builder: the Fetch rides a relation, so this hands back a Latu.DataFrame and nothing has run until you collect it.

rank(holder)

@spec rank(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}

The numeric rank of the fitted linear model.

An action: it reaches the server. A Vector or Matrix comes back as an Nx.Tensor, or a Latu.ML.SparseVector where densifying would be this package's decision rather than yours.

residual_degree_of_freedom(holder)

@spec residual_degree_of_freedom(Latu.ML.Summary.t()) ::
  {:ok, term()} | {:error, Latu.Error.t()}

The residual degrees of freedom.

An action: it reaches the server. A Vector or Matrix comes back as an Nx.Tensor, or a Latu.ML.SparseVector where densifying would be this package's decision rather than yours.

residual_degree_of_freedom_null(holder)

@spec residual_degree_of_freedom_null(Latu.ML.Summary.t()) ::
  {:ok, term()} | {:error, Latu.Error.t()}

The residual degrees of freedom for the null model.

An action: it reaches the server. A Vector or Matrix comes back as an Nx.Tensor, or a Latu.ML.SparseVector where densifying would be this package's decision rather than yours.

residuals(holder, residuals_type)

@spec residuals(Latu.ML.Summary.t(), String.t() | atom()) :: Latu.DataFrame.t()

Get the residuals of the fitted model by type.

A lazy builder: the Fetch rides a relation, so this hands back a Latu.DataFrame and nothing has run until you collect it.

Arguments

  • residuals_type — a string, or an atom

solver(holder)

@spec solver(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}

The numeric solver used for training.

An action: it reaches the server. A Vector or Matrix comes back as an Nx.Tensor, or a Latu.ML.SparseVector where densifying would be this package's decision rather than yours.

t_values(holder)

@spec t_values(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}

T-statistic of estimated coefficients and intercept.

An action: it reaches the server. A Vector or Matrix comes back as an Nx.Tensor, or a Latu.ML.SparseVector where densifying would be this package's decision rather than yours.