Skip to content
andrewdougherty edited this page Sep 12, 2010 · 1 revision

Least Squares Support Vector Regression

Given a set of points and values making up the training set the following code will find the support vector solution for the generating function:

    dataSet = DataSet points values
    svm = LSSVM (KernelFunction kf) cost params
    solution = solve svm dataSet epsilon iterNum

The cost is a measure of how tightly to fit the training points, params are parameters that can be passed to the kernel functions, epsilon is a cutoff for the size of the steps in the conjugate gradient algorithm (CGA) and iterNum is a cutoff for the number of steps in the CGA. The types of the variables are:

    points     :: Array Int [Double]
    values     :: UArray Int Double
    cost       :: Double
    params     :: [Double]
    epsilon    :: Double
    iterNum    :: Int

Clone this wiki locally