Class SupportVectorMachine

  • All Implemented Interfaces:
    Classifier

    public class SupportVectorMachine
    extends java.lang.Object
    implements Classifier
    Realizes a support vector machine classifier utilizing LIBSVM.
    Author:
    Matthias Thimm
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private libsvm.svm_model model
      The actual libsvm model.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected SupportVectorMachine​(libsvm.svm_model model)
      Creates a new SVM from the given libsvm model.
    • Method Summary

      Modifier and Type Method Description
      Category classify​(Observation obs)
      Classifies the given observation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • model

        private libsvm.svm_model model
        The actual libsvm model.
    • Constructor Detail

      • SupportVectorMachine

        protected SupportVectorMachine​(libsvm.svm_model model)
        Creates a new SVM from the given libsvm model.
        Parameters:
        model - a libsvm model.
    • Method Detail

      • classify

        public Category classify​(Observation obs)
        Description copied from interface: Classifier
        Classifies the given observation.
        Specified by:
        classify in interface Classifier
        Parameters:
        obs - some observation.
        Returns:
        The category of the observation.