Attributes of a LinearRegressionSummary — 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.LinearRegressionSummary — 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.
Every allowlisted attribute of this class has a function here.
The allowlist is inherited rather than per class: this one is the union of
org.apache.spark.ml.regression.LinearRegressionSummary.
Summary
Functions
The JVM class these accessors belong to.
Standard error of estimated coefficients and intercept. This value is only available when using the "normal" solver.
Degrees of freedom.
The weighted residuals, the usual residuals rescaled by the square root of the instance weights.
Returns the explained variance regression score. explainedVariance = 1 - \frac{variance(y - \hat{y})}{variance(y)}.
Field in "predictions" which gives the features of each instance as a vector.
Field in "predictions" which gives the true label of each instance.
Returns the mean absolute error, which is a risk function corresponding to the expected value of the absolute error loss or l1-norm loss.
Returns the mean squared error, which is a risk function corresponding to the expected value of the squared error loss or quadratic loss.
Number of instances in DataFrame predictions.
Two-sided p-value of estimated coefficients and intercept. This value is only available when using the "normal" solver.
Field in "predictions" which gives the predicted value of the label at each instance.
Dataframe outputted by the model's transform method.
Returns R^2, the coefficient of determination.
Returns Adjusted R^2, the adjusted coefficient of determination.
Residuals (label - predicted value)
Returns the root mean squared error, which is defined as the square root of the mean squared error.
T-statistic of estimated coefficients and intercept. This value is only available when using the "normal" solver.
Functions
@spec class() :: String.t()
The JVM class these accessors belong to.
@spec coefficient_standard_errors(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Standard error of estimated coefficients and intercept. This value is only available when using the "normal" solver.
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.
@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.
@spec deviance_residuals(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
The weighted residuals, the usual residuals rescaled by the square root of the instance weights.
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.
@spec explained_variance(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Returns the explained variance regression score. explainedVariance = 1 - \frac{variance(y - \hat{y})}{variance(y)}.
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.
@spec features_col(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Field in "predictions" which gives the features of each instance as a vector.
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.
@spec label_col(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Field in "predictions" which gives the true label of each instance.
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.
@spec mean_absolute_error(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Returns the mean absolute error, which is a risk function corresponding to the expected value of the absolute error loss or l1-norm loss.
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.
@spec mean_squared_error(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Returns the mean squared error, which is a risk function corresponding to the expected value of the squared error loss or quadratic loss.
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.
@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.
@spec p_values(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Two-sided p-value of estimated coefficients and intercept. This value is only available when using the "normal" solver.
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.
@spec prediction_col(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Field in "predictions" which gives the predicted value of the label at each instance.
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.
@spec predictions(Latu.ML.Summary.t()) :: Latu.DataFrame.t()
Dataframe outputted 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.
@spec r2(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Returns R^2, the coefficient of determination.
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.
@spec r2adj(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Returns Adjusted R^2, the adjusted coefficient of determination.
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.
@spec residuals(Latu.ML.Summary.t()) :: Latu.DataFrame.t()
Residuals (label - predicted value)
A lazy builder: the Fetch rides a relation, so this hands back a Latu.DataFrame and
nothing has run until you collect it.
@spec root_mean_squared_error(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Returns the root mean squared error, which is defined as the square root of the mean squared error.
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.
@spec t_values(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
T-statistic of estimated coefficients and intercept. This value is only available when using the "normal" solver.
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.