mmlspark.image package

Submodules

mmlspark.image.ImageFeaturizer module

class mmlspark.image.ImageFeaturizer.ImageFeaturizer(*args, **kwargs)[source]

Bases: mmlspark.image._ImageFeaturizer._ImageFeaturizer

Parameters
  • SparkSession (SparkSession) – The SparkSession that will be used to find the model

  • ocation (str) – The location of the model, either on local or HDFS

setMiniBatchSize(size)[source]
setModel(modelSchema)[source]
setModelLocation(location)[source]

mmlspark.image.UnrollBinaryImage module

class mmlspark.image.UnrollBinaryImage.UnrollBinaryImage(*args, **kwargs)[source]

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

Parameters
  • height (int) – the width of the image

  • inputCol (str) – The name of the input column (default: image)

  • nChannels (int) – the number of channels of the target image

  • outputCol (str) – The name of the output column (default: [self.uid]_output)

  • width (int) – the width of the image

getHeight()[source]
Returns

the width of the image

Return type

int

getInputCol()[source]
Returns

The name of the input column (default: image)

Return type

str

static getJavaPackage()[source]

Returns package name String.

getNChannels()[source]
Returns

the number of channels of the target image

Return type

int

getOutputCol()[source]
Returns

The name of the output column (default: [self.uid]_output)

Return type

str

getWidth()[source]
Returns

the width of the image

Return type

int

classmethod read()[source]

Returns an MLReader instance for this class.

setHeight(value)[source]
Parameters

height – the width of the image

setInputCol(value)[source]
Parameters

inputCol – The name of the input column (default: image)

setNChannels(value)[source]
Parameters

nChannels – the number of channels of the target image

setOutputCol(value)[source]
Parameters

outputCol – The name of the output column (default: [self.uid]_output)

setParams(height=None, inputCol='image', nChannels=None, outputCol=None, width=None)[source]

Set the (keyword only) parameters

Parameters
  • height (int) – the width of the image

  • inputCol (str) – The name of the input column (default: image)

  • nChannels (int) – the number of channels of the target image

  • outputCol (str) – The name of the output column (default: [self.uid]_output)

  • width (int) – the width of the image

setWidth(value)[source]
Parameters

width – the width of the image

mmlspark.image.UnrollImage module

class mmlspark.image.UnrollImage.UnrollImage(*args, **kwargs)[source]

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

Parameters
  • inputCol (str) – The name of the input column (default: image)

  • outputCol (str) – The name of the output column (default: [self.uid]_output)

getInputCol()[source]
Returns

The name of the input column (default: image)

Return type

str

static getJavaPackage()[source]

Returns package name String.

getOutputCol()[source]
Returns

The name of the output column (default: [self.uid]_output)

Return type

str

classmethod read()[source]

Returns an MLReader instance for this class.

setInputCol(value)[source]
Parameters

inputCol – The name of the input column (default: image)

setOutputCol(value)[source]
Parameters

outputCol – The name of the output column (default: [self.uid]_output)

setParams(inputCol='image', outputCol=None)[source]

Set the (keyword only) parameters

Parameters
  • inputCol (str) – The name of the input column (default: image)

  • outputCol (str) – The name of the output column (default: [self.uid]_output)

Module contents

MicrosoftML is a library of Python classes to interface with the Microsoft scala APIs to utilize Apache Spark to create distibuted machine learning models.

MicrosoftML simplifies training and scoring classifiers and regressors, as well as facilitating the creation of models using the CNTK library, images, and text.