max
MaxTransformer ¤
MaxTransformer(
inputCol=None,
inputCols=None,
outputCol=None,
inputDtype=None,
outputDtype=None,
layerName=None,
mathFloatConstant=None,
)
Bases: BaseTransformer, SingleInputSingleOutputParams, MultiInputSingleOutputParams, MathFloatConstantParams
MaxLayer Spark Transformer for use in Spark pipelines. This transformer gets the max of a column and a constant or another column.
Initializes an MaxTransformer transformer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
inputCol |
Optional[str]
|
Input column name. Only used if inputCols is not specified. If specified, we max this column by the mathFloatConstant. |
None
|
inputCols |
Optional[List[str]]
|
Input column names. |
None
|
outputCol |
Optional[str]
|
Output column name. |
None
|
inputDtype |
Optional[str]
|
Input data type to cast input column(s) to before transforming. |
None
|
outputDtype |
Optional[str]
|
Output data type to cast the output column to after transforming. |
None
|
layerName |
Optional[str]
|
Name of the layer. Used as the name of the Keras layer in the keras model. If not set, we use the uid of the Spark transformer. |
None
|
mathFloatConstant |
Optional[float]
|
Optional constant to use for max op. If not provided, then two input columns are required. |
None
|
Returns:
| Type | Description |
|---|---|
None
|
None - class instantiated. |
Source code in src/kamae/spark/transformers/max.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | |
compatible_dtypes
property
¤
compatible_dtypes
get_keras_layer ¤
get_keras_layer()
Gets the Keras layer for the max transformer.
Returns:
| Type | Description |
|---|---|
Layer
|
Keras layer with name equal to the layerName parameter that performs a max operation. |
Source code in src/kamae/spark/transformers/max.py
140 141 142 143 144 145 146 147 148 149 150 151 152 | |