org.pmml4s.model

SupportVectorMachine

class SupportVectorMachine extends PmmlElement

Holds a single instance of an SVM.

SupportVectors holds the support vectors as references towards VectorDictionary used by the respective SVM instance. For storing the SVM coefficients, the element Coefficients is used. Both are combined in the element SupportVectorMachine, which holds a single instance of an SVM.

The attribute targetCategory is required for classification models and gives the corresponding class label. This attribute is to be used for classification models implementing the one-against-all method. In this method, for n classes, there are exactly n SupportVectorMachine elements. Depending on the model attribute maxWins, the SVM with the largest or the smallest value determines the predicted class label.

The attribute alternateTargetCategory is required in case of binary classification models with only one SupportVectorMachine element. It is also required in case of multi-class classification models implementing the one-against-one method. In this method, for n classes, there are exactly n(n-1)/2 SupportVectorMachine elements where each SVM is trained on data from two classes. The first class is represented by the targetCategory attribute and the second class by the alternateTargetCategory attribute. The predicted class label is determined based on a voting scheme in which the category with the maximum number of votes wins. In case of a tie, the predicted class label is the first category with maximal number of votes. For both cases (binary classification and multi-class classification with one-against-one), the corresponding class labels are determined by comparing the numeric prediction with the threshold. If maxWins is true and the prediction is larger than the threshold or maxWins is false and the prediction is smaller than the threshold, the class label is the targetCategory attribute, otherwise, it is the alternateTargetCategory attribute.

Note that each SupportVectorMachine element may have its own threshold that overrides the default.

Linear Supertypes
PmmlElement, Serializable, Serializable, HasExtensions, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SupportVectorMachine
  2. PmmlElement
  3. Serializable
  4. Serializable
  5. HasExtensions
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SupportVectorMachine(supportVectors: Option[SupportVectors], coefficients: Coefficients, targetCategory: Option[Any], alternateTargetCategory: Option[Any], threshold: Option[Double])

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. val alternateTargetCategory: Option[Any]

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. val coefficients: Coefficients

  10. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  12. def eval(xs: Array[Double], kernelType: KernelType): Double

  13. def extensions: Seq[Extension]

    Definition Classes
    HasExtensions
  14. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  16. def hasExtensions: Boolean

    Definition Classes
    HasExtensions
  17. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  18. def init(vectorDictionary: VectorDictionary, svmRepresentation: SVMRepresentation): Unit

  19. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  23. def predict(xs: Array[Double], kernelType: KernelType, maxWins: Boolean, threshold: Double, alternateTargetCategoryInferred: Option[Any]): Any

  24. val supportVectors: Option[SupportVectors]

  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  26. val targetCategory: Option[Any]

  27. val threshold: Option[Double]

  28. def toString(): String

    Definition Classes
    AnyRef → Any
  29. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from PmmlElement

Inherited from Serializable

Inherited from Serializable

Inherited from HasExtensions

Inherited from AnyRef

Inherited from Any

Ungrouped