Multiclass Classification

Multiclass Classification

Running the example

The provided multiclass example is in package ch.ethz.dalab.dissolve.examples.multiclass. This is based on the Forest Cover multiclass dataset.

spark-1.X/bin/spark-submit \
	--class "ch.ethz.dalab.dissolve.examples.multiclass.COVMulticlass" \
	--master local \
	--driver-memory 2G \
	<examples-jar-path>

Custom Multiclass classifier

For working with a custom K-class classifier, the implementation is similar to the binary classifier case, albeit with one important difference:

Labels are 0-indexed. The labels/classes need to be take an index [0, K), where K is the number of classes.

val training = MLUtils.loadLibSVMFile(sc, covPath)
val solverOptions: SolverOptions[Vector[Double], Double] = new SolverOptions()

val model = MultiClassSVMWithDBCFW.train(training, numClasses, solverOptions)

Updated