Latu. ML. Classification. BinaryLogisticRegressionTrainingSummary
(latu_ml v0.2.0)
Copy Markdown
View Source
Attributes of a BinaryLogisticRegressionTrainingSummary — 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.classification.BinaryLogisticRegressionTrainingSummary — 27 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.classification.BinaryClassificationSummary,
org.apache.spark.ml.classification.BinaryLogisticRegressionSummary,
org.apache.spark.ml.classification.ClassificationSummary,
org.apache.spark.ml.classification.LogisticRegressionSummary,
org.apache.spark.ml.classification.TrainingSummary.
Summary
Functions
Returns accuracy. (equals to the total number of correctly classified instances out of the total number of instances.)
Computes the area under the receiver operating characteristic (ROC) curve.
The JVM class these accessors belong to.
Returns f-measure for each label (category).
Returns a dataframe with two fields (threshold, F-Measure) curve with beta = 1.0.
Returns false positive rate for each label (category).
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 sequence of labels in ascending order. This order matches the order used in metrics which are specified as arrays over labels, e.g., truePositiveRateByLabel.
Objective function (scaled loss + regularization) at each iteration. It contains one more element, the initial state, than number of iterations.
Returns the precision-recall curve, which is a Dataframe containing two fields recall, precision with (0.0, 1.0) prepended to it.
Returns precision for each label (category).
Returns a dataframe with two fields (threshold, precision) curve. Every possible probability obtained in transforming the dataset are used as thresholds used in calculating the precision.
Field in "predictions" which gives the prediction of each class.
Dataframe outputted by the model's transform method.
Field in "predictions" which gives the probability of each class as a vector.
Returns recall for each label (category).
Returns a dataframe with two fields (threshold, recall) curve. Every possible probability obtained in transforming the dataset are used as thresholds used in calculating the recall.
Returns the receiver operating characteristic (ROC) curve, which is a Dataframe having two fields (FPR, TPR) with (0.0, 0.0) prepended and (1.0, 1.0) appended to it.
Field in "predictions" which gives the probability or raw prediction of each class as a vector.
Number of training iterations until termination.
Returns true positive rate for each label (category).
Field in "predictions" which gives the weight of each instance as a vector.
Returns weighted averaged f-measure.
Returns weighted false positive rate.
Returns weighted averaged precision.
Returns weighted averaged recall. (equals to precision, recall and f-measure)
Returns weighted true positive rate. (equals to precision, recall and f-measure)
Functions
@spec accuracy(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Returns accuracy. (equals to the total number of correctly classified instances out of the total number of instances.)
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 area_under_roc(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Computes the area under the receiver operating characteristic (ROC) curve.
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 class() :: String.t()
The JVM class these accessors belong to.
@spec f_measure_by_label(Latu.ML.Summary.t(), number()) :: {:ok, term()} | {:error, Latu.Error.t()}
Returns f-measure for each label (category).
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.
Arguments
beta— a number, sent as a double
@spec f_measure_by_threshold(Latu.ML.Summary.t()) :: Latu.DataFrame.t()
Returns a dataframe with two fields (threshold, F-Measure) curve with beta = 1.0.
A lazy builder: the Fetch rides a relation, so this hands back a Latu.DataFrame and
nothing has run until you collect it.
@spec false_positive_rate_by_label(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Returns false positive rate for each label (category).
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 labels(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Returns the sequence of labels in ascending order. This order matches the order used in metrics which are specified as arrays over labels, e.g., truePositiveRateByLabel.
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 objective_history(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Objective function (scaled loss + regularization) at each iteration. It contains one more element, the initial state, than number of 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.
@spec pr(Latu.ML.Summary.t()) :: Latu.DataFrame.t()
Returns the precision-recall curve, which is a Dataframe containing two fields recall, precision with (0.0, 1.0) prepended to it.
A lazy builder: the Fetch rides a relation, so this hands back a Latu.DataFrame and
nothing has run until you collect it.
@spec precision_by_label(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Returns precision for each label (category).
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 precision_by_threshold(Latu.ML.Summary.t()) :: Latu.DataFrame.t()
Returns a dataframe with two fields (threshold, precision) curve. Every possible probability obtained in transforming the dataset are used as thresholds used in calculating the precision.
A lazy builder: the Fetch rides a relation, so this hands back a Latu.DataFrame and
nothing has run until you collect it.
@spec prediction_col(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Field in "predictions" which gives the prediction of each class.
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 probability_col(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Field in "predictions" which gives the probability of each class 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 recall_by_label(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Returns recall for each label (category).
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 recall_by_threshold(Latu.ML.Summary.t()) :: Latu.DataFrame.t()
Returns a dataframe with two fields (threshold, recall) curve. Every possible probability obtained in transforming the dataset are used as thresholds used in calculating the recall.
A lazy builder: the Fetch rides a relation, so this hands back a Latu.DataFrame and
nothing has run until you collect it.
@spec roc(Latu.ML.Summary.t()) :: Latu.DataFrame.t()
Returns the receiver operating characteristic (ROC) curve, which is a Dataframe having two fields (FPR, TPR) with (0.0, 0.0) prepended and (1.0, 1.0) appended to it.
A lazy builder: the Fetch rides a relation, so this hands back a Latu.DataFrame and
nothing has run until you collect it.
@spec score_col(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Field in "predictions" which gives the probability or raw prediction of each class 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 total_iterations(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Number of training iterations until termination.
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 true_positive_rate_by_label(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Returns true positive rate for each label (category).
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 weight_col(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Field in "predictions" which gives the weight 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 weighted_f_measure(Latu.ML.Summary.t(), number()) :: {:ok, term()} | {:error, Latu.Error.t()}
Returns weighted averaged f-measure.
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.
Arguments
beta— a number, sent as a double
@spec weighted_false_positive_rate(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Returns weighted false positive rate.
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 weighted_precision(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Returns weighted averaged precision.
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 weighted_recall(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Returns weighted averaged recall. (equals to precision, recall and f-measure)
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 weighted_true_positive_rate(Latu.ML.Summary.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
Returns weighted true positive rate. (equals to precision, recall and f-measure)
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.