SVM: Generate SVM decision boundaries for positive and negative...

View source: R/SVM.R

SVMR Documentation

Generate SVM decision boundaries for positive and negative control separation.

Description

This function constructs Support Vector Machine (SVM) models to find optimal decision boundaries that separate positive and negative control samples in event coverage space. It uses radial kernel SVM to create non-linear decision boundaries for both decrease and increase directions.

Usage

SVM(ECdataList)

Arguments

ECdataList

A list containing event coverage data from the EventCoverage() function. The list should contain:

  • EC_N_D: Event coverage matrix for negative controls in decrease direction

  • EC_P_D: Event coverage matrix for positive controls in decrease direction

  • EC_N_I: Event coverage matrix for negative controls in increase direction

  • EC_P_I: Event coverage matrix for positive controls in increase direction

  • ZseqList: Z-score thresholds for both directions

Details

The function performs the following steps:

  1. Prepares training data by combining positive and negative control event coverage data

  2. Trains separate SVM models for decrease and increase directions using radial kernel

  3. Uses pre-tuned hyperparameters (cost=20, gamma=3 for decrease; cost=50, gamma=2 for increase)

  4. Generates prediction grids across the Z-score and event coverage space

  5. Identifies decision boundary points where the SVM prediction changes from negative to positive

  6. Returns the optimal threshold points for each Z-score bin

The resulting SVM curves can be used for background correction in zeta score calculations to improve the accuracy of hit identification.

Value

A list containing two data frames:

cutOffD

A data frame with SVM decision boundary points for decrease direction. Each row contains a Z-score threshold and the corresponding event coverage threshold that separates positive and negative controls.

cutOffI

A data frame with SVM decision boundary points for increase direction. Each row contains a Z-score threshold and the corresponding event coverage threshold that separates positive and negative controls.

Author(s)

Yajing Hao, Shuyang Zhang, Junhui Li, Guofeng Zhao, Xiang-Dong Fu

Examples

data(countMat)
data(negGene)
data(posGene)
ZscoreVal <- Zscore(countMat, negGene)
ECdataList <- EventCoverage(ZscoreVal, negGene, posGene, binNum=10, combine=TRUE)
SVM(ECdataList)


ZetaSuite documentation built on Nov. 5, 2025, 6:37 p.m.