PDMBySvmAccuracy: Compute phenotypic distance matrix by SVM classification...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/PDMatrix.R

Description

This function performs an SVM classification between two given samples, and calculates the classification accuracy via cross validation as the phenotypic distance between the two samples. For multiple samples, the function returns a pair-wise distance matrix.

Usage

1
PDMBySvmAccuracy(x, unames, selectedCellFtrs, cross=5, verbose=FALSE, ...)

Arguments

x

An imageHTS object.

unames

A character vector, containing the well names from where to collect the cell features. See getUnames for details.

selectedCellFtrs

A character vector for cell features to be used in the calculation. If missing, all features are used.

cross

An interger scalar indicating how many folds of cross validation should be performed.

verbose

A logical scalar indicating whether progress should be reported.

...

Additional arguments to be passed to the svm function of the e1071 package.

Details

For every pair of wells, this function collects features of all cells from both wells, and performs a bi-class classification using Support Vector Machine (SVM). The classification accuracy is defined as the phenotypic distance for the distance matrix.

Value

A symmetric distance matrix with the number of rows equaling to the length of unames.

Author(s)

Xian Zhang

See Also

svm

Examples

1
2
3
4
5
6
7
8
9
  library('phenoDist')

  ## load the imageHTS object
  load(system.file('kimorph', 'kimorph.rda', package='phenoDist'))
  x@localPath <- file.path(tempdir(), 'kimorph')

  ## calculate pair-wise svm distance matrix
  load(system.file('kimorph', 'selectedFtrs.rda', package='phenoDist'))
  pdm <- PDMBySvmAccuracy(x, unames=getUnames(x, plate=1, row=2:3, col=3), selectedCellFtrs=selectedCellFtrs, cross=5, verbose=FALSE, cost=1, gamma=2^-5, kernel='radial')

phenoDist documentation built on May 2, 2018, 4:46 a.m.