readLearnTS {imageHTS} | R Documentation

## Learn, classify and predict cell labels.

### Description

`readLearnTS` trains an SVM classifier using cell features and a training cell set. `predictCellLabels` predicts cell labels.

### Usage

    readLearnTS(x, featurePar, trainingSet, access='cache', cost, gamma)
    predictCellLabels(x, uname, access='cache')

### Arguments

`x` | An imageHTS object.
`uname` | A character vector, containing the well names to segment. See `getUnames` for details.
`featurePar` | A character string, indicating the filename containing the feature parameters.
`trainingSet` | A character string, indicating the filename containing the training cell set. See Details.
`access` | A character string indicating how to access the data. Valid values are `local`, `server` and `cache`, the default. See `fileHTS` for details.
`cost` | An optional numeric vector containing the SVM costs to be explored during the cross-validation parameter grid-search. Default is `c(0.1, 1, 10, 20)`.
`gamma` | An optional numeric vector containing the radial kernel gamma parameters to be explored during the cross-validation parameter grid-search. Default is `c(0.0001, 0.001, 0.01, 0.1)`.

### Details

`readLearnTS` trains an SVM classifier using cell features and a training cell set. Features enumerated in the `remove.classification.features` field of the feature parameters are not considered for classification. The training set, pointed by `trainingSet`, is a tab-separated file containing the rows `uname`, `spot`, `id` and `label`. Each row designates a cell. This file is constructed by using the output of the cellPicker module, see `popCellPicker`. After completion, `readLearnTS` writes the a RDA file \'data/classifier.rda\' in the local project directory. This file contains the list returned by `readLearnTS`.

`predictCellLabels` uses the trained classifier located in the file \'data/classifier.rda\' and cell features to predict cell labels of wells indicated by `uname`. For each well, the function writes the file `clabels`, which contains the predicted cell labels.

If present, `popCellPicker` shows the predicted cell labels. Several iterations of `readLearnTS`, `predictCellLabels` and `popCellPicker` calls are useful to build an efficient cell classifier.

### Value

Returns an invisible list which contains: `classifier`, the trained classifier obtained by `tune.svm` and `cft`, the features that were used to train the classifier.

### Author(s)

Gregoire Pau, gregoire.pau@embl.de, 2010

### See Also

`popCellPicker`

### Examples

    ## see vignette for details

[Package imageHTS version 1.40.0 Index]