Transformers and Estimators
Transformer is a object that transforms one dataset to another by applying the transformation logic (function) to the input dataset yielding an output dataset. There are two types of Transformers the standard Transformer and the Estimator Transformer.
Standard Transformer
A standard Transformer the input dataset into the output dataset, explicitly applying transformation to the input data. There is no dependency on the input data other than reading the input column and generating the output column.
Such Transformers are invoked as shown next:
outputDF = transfomer.transform(inputDF)
Examples of standard Transformers are as follows and will be explained in detail in the subsequent sections:
Tokenizer
: This splits sentences into words using space as the delimiterRegexTokenizer
: This splits sentences into words using regular expressions to splitStopWordsRemover
: This removes commonly used stop words from the list of wordsBinarizer
: This converts the strings to binary...