Attributes of a fitted CountVectorizerModel.
Every accessor here is one name on the server's allowlist for
org.apache.spark.ml.feature.CountVectorizerModel — 1 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. 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.
This model does not have to be fitted: from_vocabulary/3 builds one on the server out of
what you pass, through its own helper method. That is a cache entry like a fit's, and yours
to give back.
The allowlist is inherited rather than per class: this one is the union of
org.apache.spark.ml.feature.CountVectorizerModel, org.apache.spark.ml.util.Identifiable.
Summary
Functions
The JVM class these accessors belong to.
Construct the model directly from a vocabulary list of strings, requires an active
SparkContext. The server builds it and registers it, so what comes back is a cache reference
like a fit's and is yours to Latu.ML.delete/1. The uid is generated here and sent with the
call. opts are params set on the model afterwards, checked against its own table. Built
by countVectorizerModelFromVocabulary on the server's helper object, from
CountVectorizerModel.from_vocabulary.
An array of terms in the vocabulary.
Functions
@spec class() :: String.t()
The JVM class these accessors belong to.
@spec from_vocabulary(Latu.Session.t(), [String.t() | atom()], keyword()) :: {:ok, Latu.ML.Model.t()} | {:error, Latu.Error.t()}
Construct the model directly from a vocabulary list of strings, requires an active
SparkContext. The server builds it and registers it, so what comes back is a cache reference
like a fit's and is yours to Latu.ML.delete/1. The uid is generated here and sent with the
call. opts are params set on the model afterwards, checked against its own table. Built
by countVectorizerModelFromVocabulary on the server's helper object, from
CountVectorizerModel.from_vocabulary.
@spec vocabulary(Latu.ML.Model.t()) :: {:ok, term()} | {:error, Latu.Error.t()}
An array of terms in the vocabulary.
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.