mmtfPyspark.ml.sparkMultiClassClassifier module

sparkMultiClassClassifier.py

Fits a multi-class classification model using mllib classification method and returns classification metrics.

class SparkMultiClassClassifier(predictor, label, testFraction=0.3, seed=1)[source]

Bases: object

Fits a multi-class classification model using mllib classification method and returns classification metrics.

Attributes

predictor type of multi-class classifier
label (str) classification label
testFraction (float) test set fraction [0.3]
seed (int) random seed

Methods

fit(data) Dataset must at least contain the following two columns: label: the class labels features: feature vector
fit(data)[source]

Dataset must at least contain the following two columns: label: the class labels features: feature vector

Parameters:

data : Dataset<Row>

input data

Returns:

dict

map with metrics