scalation.analytics

SupportVectorMachine

class SupportVectorMachine extends Classifier with Error

The SupportVectorMachine class is a translation of Pseudo-Code from a modified SMO (Modification 2) found at the above URL's into Scala and includes a few simplifications (e.g., currently only works for linear kernels, dense data and binary classification).

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

Instance Constructors

  1. new SupportVectorMachine(x: MatrixD, y: VectorI)

    x

    the training data points stored as rows in a matrix

    y

    the classification of the data points stored in a vector

Type Members

  1. type Pair = (Double, Double)

Value Members

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

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def classify(z: VectorI): (Int, String)

    Given a new discrete data vector z, determine which class it belongs to.

    Given a new discrete data vector z, determine which class it belongs to. Classify returns 1 meaning 'z' belongs to the positive class, while -1 means it belongs to the negative class.

    z

    the vector to classify

    Definition Classes
    SupportVectorMachineClassifier
  6. def classify(z: VectorD): (Int, String)

    Given a new continuous data vector z, determine which class it belongs to.

    Given a new continuous data vector z, determine which class it belongs to. Classify returns 1 meaning 'z' belongs to the positive class, while -1 means it belongs to the negative class.

    z

    the vector to classify

    Definition Classes
    SupportVectorMachineClassifier
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def flaw(method: String, message: String): Unit

    Show the flaw by printing the error message.

    Show the flaw by printing the error message.

    method

    the method where the error occurred

    message

    the error message

    Definition Classes
    Error
  12. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

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

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

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

    Definition Classes
    AnyRef
  18. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  19. def toString(): String

    Convert svm to a string showing (w, b).

    Convert svm to a string showing (w, b).

    Definition Classes
    SupportVectorMachine → AnyRef → Any
  20. def train(): Unit

    Train uses SMO (Sequential Minimum Optimization) algorithm to solves the optimization problem for the weight vector 'w' and the threshold 'b' for the model '(w dot z) - b'.

    Train uses SMO (Sequential Minimum Optimization) algorithm to solves the optimization problem for the weight vector 'w' and the threshold 'b' for the model '(w dot z) - b'.

    Definition Classes
    SupportVectorMachineClassifier
  21. def update(i1: Int, i2: Int, y1: Int, y2: Int): Unit

    Update weights 'w' and error cache 'fCache'.

    Update weights 'w' and error cache 'fCache'.

    i1

    the index for the first Lagrange multipliers (alpha)

    i2

    the index for the second Lagrange multipliers (alpha)

    y1

    the first target value

    y2

    the second target value

  22. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Error

Inherited from Classifier

Inherited from AnyRef

Inherited from Any

Ungrouped