scClassifR {scClassifR} | R Documentation

## scClassifR class.

### Description

This class is returned by the `train_classifier` function. Generally, scClassifR objects are never created directly.

### Usage

    scClassifR(cell_type, clf, features, p_thres, parent)

    scClassifR(cell_type, clf, features, p_thres, parent)

### Arguments

`cell_type` | character. Name of the cell type.
`clf` | list. Trained model returned by caret train function.
`features` | vector/character containing features used for the training.
`p_thres` | numeric. Probability threshold for the cell type to be assigned for a cell.
`parent` | character. Parent cell type.

### Value

A scClassifR object.

### Slots

`cell_type`

  character. Name of the cell type.

`clf`

  list. Trained model returned by caret train function.

`features`

  vector/character containing features used for the training.

`p_thres`

  numeric. Probability threshold for the cell type to be assigned for a cell.

`parent`

  character. Parent cell type.

### Examples

    # load small example dataset
    data("tirosh_mel80_example")

    # train a classifier, for ex: B cell
    selected_features_B = c("CD19", "MS4A1", "CD79A")
    set.seed(123)
    clf_b <- train_classifier(train_obj = tirosh_mel80_example,
                              features = selected_features_B,
                              cell_type = "B cells")

    clf_b

[Package scClassifR version 1.2.0 Index]