Latu.ML.Classification.BinaryRandomForestClassificationSummary (latu_ml v0.2.0)

Copy Markdown View Source

Attributes of a BinaryRandomForestClassificationSummary — 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.BinaryRandomForestClassificationSummary — 23 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.ClassificationSummary.

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 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.

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.

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.

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

accuracy(holder)

@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.

area_under_roc(holder)

@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.

class()

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

The JVM class these accessors belong to.

f_measure_by_label(holder, beta)

@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

f_measure_by_threshold(holder)

@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.

false_positive_rate_by_label(holder)

@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.

label_col(holder)

@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.

labels(holder)

@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.

pr(holder)

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.

precision_by_label(holder)

@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.

precision_by_threshold(holder)

@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.

prediction_col(holder)

@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.

predictions(holder)

@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.

recall_by_label(holder)

@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.

recall_by_threshold(holder)

@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.

roc(holder)

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.

score_col(holder)

@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.

true_positive_rate_by_label(holder)

@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.

weight_col(holder)

@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.

weighted_f_measure(holder, beta)

@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

weighted_false_positive_rate(holder)

@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.

weighted_precision(holder)

@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.

weighted_recall(holder)

@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.

weighted_true_positive_rate(holder)

@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.