ValueIndexer

class ValueIndexer.ValueIndexer(inputCol=None, outputCol=None)[source]

Bases: mmlspark.Utils.ComplexParamsMixin, pyspark.ml.util.JavaMLReadable, pyspark.ml.util.JavaMLWritable, pyspark.ml.wrapper.JavaEstimator

Fits a dictionary of values from the input column.

The ValueIndexer generates a model, then transforms a column to a categorical column of the given array of values. It is similar to StringIndexer except that it can be used on any value types.

Parameters:
  • inputCol (str) – The name of the input column
  • outputCol (str) – The name of the output column
getInputCol()[source]
Returns:The name of the input column
Return type:str
static getJavaPackage()[source]

Returns package name String.

getOutputCol()[source]
Returns:The name of the output column
Return type:str
classmethod read()[source]

Returns an MLReader instance for this class.

setInputCol(value)[source]
Parameters:inputCol (str) – The name of the input column
setOutputCol(value)[source]
Parameters:outputCol (str) – The name of the output column
setParams(inputCol=None, outputCol=None)[source]

Set the (keyword only) parameters

Parameters:
  • inputCol (str) – The name of the input column
  • outputCol (str) – The name of the output column
class ValueIndexer.ValueIndexerModel(java_model=None)[source]

Bases: mmlspark.Utils.ComplexParamsMixin, pyspark.ml.wrapper.JavaModel, pyspark.ml.util.JavaMLWritable, pyspark.ml.util.JavaMLReadable

Model fitted by ValueIndexer.

This class is left empty on purpose. All necessary methods are exposed through inheritance.

static getJavaPackage()[source]

Returns package name String.

classmethod read()[source]

Returns an MLReader instance for this class.