Documentation of 'jsat.classifiers.svm.SupportVectorLearner' Java class
SupportVectorLearner
jsat.classifiers.svm

Class SupportVectorLearner

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    CSKLRBatch, DCSVM, LSSVM, PegasosK, PlattSMO, SBP, SVMnoBias


    public abstract class SupportVectorLearner
    extends java.lang.Object
    implements java.io.Serializable
    Base class for support vector style learners. This means that the learner performs batch training on a fixed set of training points using a kernel to project the data into a different space. The final set of vectors used may or may not be sparse. It does not necessarily have to be a Support Vector machine.

    This class provides caching mechanism to transparently provide faster kernel.
    See Also:
    Serialized Form
    • Constructor Detail

      • SupportVectorLearner

        public SupportVectorLearner(KernelTrick kernel,
                                    SupportVectorLearner.CacheMode cacheMode)
        Creates a new Support Vector Learner
        Parameters:
        kernel - the kernel trick to use
        cacheMode - the kernel caching method to use
      • SupportVectorLearner

        public SupportVectorLearner(SupportVectorLearner toCopy)
        Copy constructor
        Parameters:
        toCopy - the object to copy
    • Method Detail

      • setKernel

        public void setKernel(KernelTrick kernel)
        Sets the kernel trick to use
        Parameters:
        kernel - the kernel trick to use
      • setCacheValue

        public void setCacheValue(int cacheValue)
        Sets the cache value, which may be interpreted differently by different caching schemes.
        This is currently only used for SupportVectorLearner.CacheMode.ROWS, where the value indicates how many rows will be cached.
        Parameters:
        cacheValue - the cache value to be used
      • setCacheSize

        public void setCacheSize(long N,
                                 long bytes)
        Sets the cache value to one that will use the specified amount of memory. If the amount of memory specified is great enough, this method will automatically set the cache mode to SupportVectorLearner.CacheMode.FULL.
        Parameters:
        N - the number of data points
        bytes - the number of bytes of memory to make the cache
      • getCacheValue

        public int getCacheValue()
        Returns the current cache value
        Returns:
        the current cache value
      • getCacheMode

        public SupportVectorLearner.CacheMode getCacheMode()
        Returns the current caching mode in use
        Returns:
        the current caching mode in use
      • setCacheMode

        public void setCacheMode(SupportVectorLearner.CacheMode cacheMode)
        Calling this sets the method of caching that will be used.
        This is called called by the implementing class to initialize and clear the caches. Calling this with the current cache mode will initialize the caches. Once training is complete, call again with null to deinitialize the caches.
        Parameters:
        cacheMode -

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.