ImageLIME

class ImageLIME.ImageLIME(cellSize=16.0, inputCol=None, labelCol=None, localModelPartitions=None, model=None, modelPartitions=None, modifier=130.0, nSamples=900, outputCol=None, samplingFraction=0.3, superpixelCol='superpixels')[source]

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

Parameters:
  • cellSize (double) – Number that controls the size of the superpixels (default: 16.0)
  • inputCol (str) – The name of the input column
  • labelCol (str) – The name of the label column
  • localModelPartitions (int) – The number of partitions to coalesce to to fit the local model
  • model (object) – Model to try to locally approximate
  • modelPartitions (int) – The number of partitions to create for evaluating the model
  • modifier (double) – Controls the trade-off spatial and color distance (default: 130.0)
  • nSamples (int) – The number of samples to generate (default: 900)
  • outputCol (str) – The name of the output column
  • samplingFraction (double) – The fraction of superpixels to keep on (default: 0.3)
  • superpixelCol (str) – The column holding the superpixel decompositions (default: superpixels)
getCellSize()[source]
Returns:Number that controls the size of the superpixels (default: 16.0)
Return type:double
getInputCol()[source]
Returns:The name of the input column
Return type:str
static getJavaPackage()[source]

Returns package name String.

getLabelCol()[source]
Returns:The name of the label column
Return type:str
getLocalModelPartitions()[source]
Returns:The number of partitions to coalesce to to fit the local model
Return type:int
getModel()[source]
Returns:Model to try to locally approximate
Return type:object
getModelPartitions()[source]
Returns:The number of partitions to create for evaluating the model
Return type:int
getModifier()[source]
Returns:Controls the trade-off spatial and color distance (default: 130.0)
Return type:double
getNSamples()[source]
Returns:The number of samples to generate (default: 900)
Return type:int
getOutputCol()[source]
Returns:The name of the output column
Return type:str
getSamplingFraction()[source]
Returns:The fraction of superpixels to keep on (default: 0.3)
Return type:double
getSuperpixelCol()[source]
Returns:The column holding the superpixel decompositions (default: superpixels)
Return type:str
classmethod read()[source]

Returns an MLReader instance for this class.

setCellSize(value)[source]
Parameters:cellSize (double) – Number that controls the size of the superpixels (default: 16.0)
setInputCol(value)[source]
Parameters:inputCol (str) – The name of the input column
setLabelCol(value)[source]
Parameters:labelCol (str) – The name of the label column
setLocalModelPartitions(value)[source]
Parameters:localModelPartitions (int) – The number of partitions to coalesce to to fit the local model
setModel(value)[source]
Parameters:model (object) – Model to try to locally approximate
setModelPartitions(value)[source]
Parameters:modelPartitions (int) – The number of partitions to create for evaluating the model
setModifier(value)[source]
Parameters:modifier (double) – Controls the trade-off spatial and color distance (default: 130.0)
setNSamples(value)[source]
Parameters:nSamples (int) – The number of samples to generate (default: 900)
setOutputCol(value)[source]
Parameters:outputCol (str) – The name of the output column
setParams(cellSize=16.0, inputCol=None, labelCol=None, localModelPartitions=None, model=None, modelPartitions=None, modifier=130.0, nSamples=900, outputCol=None, samplingFraction=0.3, superpixelCol='superpixels')[source]

Set the (keyword only) parameters

Parameters:
  • cellSize (double) – Number that controls the size of the superpixels (default: 16.0)
  • inputCol (str) – The name of the input column
  • labelCol (str) – The name of the label column
  • localModelPartitions (int) – The number of partitions to coalesce to to fit the local model
  • model (object) – Model to try to locally approximate
  • modelPartitions (int) – The number of partitions to create for evaluating the model
  • modifier (double) – Controls the trade-off spatial and color distance (default: 130.0)
  • nSamples (int) – The number of samples to generate (default: 900)
  • outputCol (str) – The name of the output column
  • samplingFraction (double) – The fraction of superpixels to keep on (default: 0.3)
  • superpixelCol (str) – The column holding the superpixel decompositions (default: superpixels)
setSamplingFraction(value)[source]
Parameters:samplingFraction (double) – The fraction of superpixels to keep on (default: 0.3)
setSuperpixelCol(value)[source]
Parameters:superpixelCol (str) – The column holding the superpixel decompositions (default: superpixels)