sparknlp.internal.recursive#

Contains base classes for Recursive Annotators and Estimators.

Module Contents#

Classes#

RecursiveEstimator

Base class for :py:class:`Estimator`s that wrap Java/Scala

RecursiveTransformer

Base class for :py:class:`Model`s that wrap Java/Scala

class RecursiveEstimator(java_obj: Optional[py4j.java_gateway.JavaObject] = None)[source]#

Base class for :py:class:`Estimator`s that wrap Java/Scala implementations.

fit(dataset, params=None, pipeline=None)[source]#

Fits a model to the input dataset with optional parameters.

New in version 1.3.0.

Parameters:
datasetpyspark.sql.DataFrame

input dataset.

paramsdict or list or tuple, optional

an optional param map that overrides embedded params. If a list/tuple of param maps is given, this calls fit on each param map and returns a list of models.

Returns:
Transformer or a list of Transformer

fitted model(s)

class RecursiveTransformer(java_model: Optional[py4j.java_gateway.JavaObject] = None)[source]#

Base class for :py:class:`Model`s that wrap Java/Scala implementations. Subclasses should inherit this class before param mix-ins, because this sets the UID from the Java model.