ImageLIME

class ImageLIME.ImageLIME(cellSize=16.0, inputCol=None, model=None, modifier=130.0, nSamples=900, outputCol=None, predictionCol='prediction', regularization=0.0, 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
  • model (object) – Model to try to locally approximate
  • 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
  • predictionCol (str) – prediction column name (default: prediction)
  • regularization (double) – regularization param for the lasso (default: 0.0)
  • 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.

getModel()[source]
Returns:Model to try to locally approximate
Return type:object
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
getPredictionCol()[source]
Returns:prediction column name (default: prediction)
Return type:str
getRegularization()[source]
Returns:regularization param for the lasso (default: 0.0)
Return type:double
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
setModel(value)[source]
Parameters:model (object) – Model to try to locally approximate
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, model=None, modifier=130.0, nSamples=900, outputCol=None, predictionCol='prediction', regularization=0.0, 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
  • model (object) – Model to try to locally approximate
  • 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
  • predictionCol (str) – prediction column name (default: prediction)
  • regularization (double) – regularization param for the lasso (default: 0.0)
  • samplingFraction (double) – The fraction of superpixels to keep on (default: 0.3)
  • superpixelCol (str) – The column holding the superpixel decompositions (default: superpixels)
setPredictionCol(value)[source]
Parameters:predictionCol (str) – prediction column name (default: prediction)
setRegularization(value)[source]
Parameters:regularization (double) – regularization param for the lasso (default: 0.0)
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)