ClassBalancer

class ClassBalancer.ClassBalancer(broadcastJoin=True, inputCol=None, outputCol='weight')[source]

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

Parameters:
  • broadcastJoin (bool) – Whether to broadcast the class to weight mapping to the worker (default: true)
  • inputCol (str) – The name of the input column
  • outputCol (str) – The name of the output column (default: weight)
getBroadcastJoin()[source]
Returns:Whether to broadcast the class to weight mapping to the worker (default: true)
Return type:bool
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 (default: weight)
Return type:str
classmethod read()[source]

Returns an MLReader instance for this class.

setBroadcastJoin(value)[source]
Parameters:broadcastJoin (bool) – Whether to broadcast the class to weight mapping to the worker (default: true)
setInputCol(value)[source]
Parameters:inputCol (str) – The name of the input column
setOutputCol(value)[source]
Parameters:outputCol (str) – The name of the output column (default: weight)
setParams(broadcastJoin=True, inputCol=None, outputCol='weight')[source]

Set the (keyword only) parameters

Parameters:
  • broadcastJoin (bool) – Whether to broadcast the class to weight mapping to the worker (default: true)
  • inputCol (str) – The name of the input column
  • outputCol (str) – The name of the output column (default: weight)
class ClassBalancer.ClassBalancerModel(java_model=None)[source]

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

Model fitted by ClassBalancer.

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.