PDMBySvmWeightVector {phenoDist} | R Documentation |
This function performs an SVM classification between a given sample and the negative control, calculates the weight vector, and then computes the phenotypic distance matrix based on the weight vectors.
PDMBySvmWeightVector(x, unames, neg='rluc', selectedCellFtrs, distMethod=c('manhattan','euclidean', 'correlation','mahalanobis'), verbose=FALSE, kernel='linear', ...)
x |
An |
unames |
A character vector, containing the well names from where to collect the cell features. See |
neg |
A character string to identify the negative controls. |
selectedCellFtrs |
A character vector for cell features to be used in the calculation. If missing, all features are used. |
distMethod |
A character string indicating which distance method should be used. This must be (an abbreviation of) one of the strings 'manhattan', 'euclidean', 'correlation' or 'mahalanobis'. |
verbose |
A logical scalar indicating whether progress should be reported. |
kernel |
The kernel argument for the |
... |
Additional arguments to be passed to the |
For each well, this function collects features of all cells from the well and all cells from the negative control wells, and performs a bi-class classification using Support Vector Machine (SVM). The classification weight vectors are calculated for all wells passed to PDMByWellAvg
to compute the phenotypic distance matrix.
A symmetric distance matrix with dimensions equaling to the length of unames
.
Xian Zhang
svm
, PDMByWellAvg
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 <- PDMBySvmWeightVector(x, unames=getUnames(x,plate=1, row=2:3, col=3), neg='rluc', selectedCellFtrs=selectedCellFtrs, distMethod='euclidean', verbose=FALSE, cost=1, kernel='linear')