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: 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. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. 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
  8. 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
  9. def clone(): AnyRef

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

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. 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
  14. final def getClass(): Class[_]

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

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

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

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

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

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

    Definition Classes
    AnyRef
  21. def toString(): String

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

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

    Definition Classes
    SupportVectorMachine → AnyRef → Any
  22. 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
  23. 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

  24. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Error

Inherited from Classifier

Inherited from AnyRef

Inherited from Any

Ungrouped