analyzeSeparation: Find a hyperplane separating the sample points

Description Usage Arguments Value Examples

View source: R/prepareDataforGlm.R

Description

Given a data frame holding feature data and a binary response column, find a hyperplane separating the two groups of data points. The core code solving the linear program is taken from the package safeBinaryRegression.

Usage

1
2
analyzeSeparation(data, max.dim = 2, all.dim = TRUE, tol1 = 0.001,
  tol2 = 1e-09)

Arguments

data

A data.frame containing a column called Response, holding a binary vector.

max.dim

The maximum number of features to simultaneously be considered for allowing data to be separated. Hence, if max.dim == 2, all pairs of features are screened.

all.dim

Analyze all features simulatneously.

tol1

The tolerance for considering the points separated: the sum of all betas has to be larger than tol1.

tol2

The tolerance for considering an individual feature to be involved.

Value

A list with two slots: a logical value saying if the data points are separated and a vector of distances to the separating hyperplane.

Examples

1
2
3
4
5
6
7
8
# get gene locations
wells <- findWells(plates="J101-2C", well.names=c("H2", "H6"))
data  <- unlist(getSingleCellData(wells), recursive=FALSE)
cleaned <- lapply(data, cleanData, "lower")
melted <- lapply(cleaned, meltData)
prepared <- prepareDataforGlm(melted[[2]]$mat$Cells,
                          melted[[1]]$mat$Cells, test=NULL)
sep1 <- analyzeSeparation(dat1)

nbenn/singleCellFeatures documentation built on May 23, 2019, 12:24 p.m.