PLSSVM - Parallel Least Squares Support Vector Machine  2.0.0
A Least Squares Support Vector Machine implementation using different backends.
Functions
predict_kernel.cl File Reference

Defines the functions used for prediction for the C-SVM using the OpenCL backend. More...

Functions

__kernel void device_kernel_w_linear (__global real_type *w_d, __global real_type *data_d, __global real_type *data_last_d, __global real_type *alpha_d, const kernel_index_type num_data_points, const kernel_index_type num_features)
 Calculate the w vector to speed up the prediction of the labels for data points using the linear kernel function. More...
 
__kernel void device_kernel_predict_polynomial (__global real_type *out_d, __global const real_type *data_d, __global const real_type *data_last_d, __global const real_type *alpha_d, const kernel_index_type num_data_points, __global const real_type *points, const kernel_index_type num_predict_points, const kernel_index_type num_features, const int degree, const real_type gamma, const real_type coef0)
 Predicts the labels for data points using the polynomial kernel function. More...
 
__kernel void device_kernel_predict_rbf (__global real_type *out_d, __global const real_type *data_d, __global const real_type *data_last_d, __global const real_type *alpha_d, const kernel_index_type num_data_points, __global const real_type *points, const kernel_index_type num_predict_points, const kernel_index_type num_features, const real_type gamma)
 Predicts the labels for data points using the radial basis functions kernel function. More...
 

Detailed Description

Defines the functions used for prediction for the C-SVM using the OpenCL backend.

Author
Alexander Van Craen
Marcel Breyer
License
This file is part of the PLSSVM project which is released under the MIT license. See the LICENSE.md file in the project root for full license information.

Function Documentation

◆ device_kernel_w_linear()

__kernel void device_kernel_w_linear ( __global real_type *  w_d,
__global real_type *  data_d,
__global real_type *  data_last_d,
__global real_type *  alpha_d,
const kernel_index_type  num_data_points,
const kernel_index_type  num_features 
)

Calculate the w vector to speed up the prediction of the labels for data points using the linear kernel function.

Supports multi-GPU execution.

Template Parameters
real_typethe type of the data
Parameters
[out]w_dthe w vector to assemble
[in]data_dthe one-dimension support vector matrix
[in]data_last_dthe last row of the support vector matrix
[in]alpha_dthe previously calculated weight for each data point
[in]num_data_pointsthe total number of support vectors
[in]num_featuresthe number of features per support vector

◆ device_kernel_predict_polynomial()

__kernel void device_kernel_predict_polynomial ( __global real_type *  out_d,
__global const real_type *  data_d,
__global const real_type *  data_last_d,
__global const real_type *  alpha_d,
const kernel_index_type  num_data_points,
__global const real_type *  points,
const kernel_index_type  num_predict_points,
const kernel_index_type  num_features,
const int  degree,
const real_type  gamma,
const real_type  coef0 
)

Predicts the labels for data points using the polynomial kernel function.

Currently only single GPU execution is supported.

Template Parameters
real_typethe type of the data
Parameters
[out]out_dthe calculated predictions
[in]data_dthe one-dimension support vector matrix
[in]data_last_dthe last row of the support vector matrix
[in]alpha_dthe previously calculated weight for each data point
[in]num_data_pointsthe total number of support vectors
[in]pointsthe data points to predict
[in]num_predict_pointsthe total number of data points to predict
[in]num_featuresthe number of features per support vector and point to predict
[in]degreethe degree parameter used in the polynomial kernel function
[in]gammathe gamma parameter used in the polynomial kernel function
[in]coef0the coef0 parameter used in the polynomial kernel function

◆ device_kernel_predict_rbf()

__kernel void device_kernel_predict_rbf ( __global real_type *  out_d,
__global const real_type *  data_d,
__global const real_type *  data_last_d,
__global const real_type *  alpha_d,
const kernel_index_type  num_data_points,
__global const real_type *  points,
const kernel_index_type  num_predict_points,
const kernel_index_type  num_features,
const real_type  gamma 
)

Predicts the labels for data points using the radial basis functions kernel function.

Currently only single GPU execution is supported.

Template Parameters
real_typethe type of the data
Parameters
[out]out_dthe calculated predictions
[in]data_dthe one-dimension support vector matrix
[in]data_last_dthe last row of the support vector matrix
[in]alpha_dthe previously calculated weight for each data point
[in]num_data_pointsthe total number of support vectors
[in]pointsthe data points to predict
[in]num_predict_pointsthe total number of data points to predict
[in]num_featuresthe number of features per support vector and point to predict
[in]gammathe gamma parameter used in the rbf kernel function