Supervised Learning Ensemble for Diagnostic Identification
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
R
data
docs
man
tests
vignettes
.Rbuildignore
.gitignore
.travis.yml
DESCRIPTION
LICENSE
NAMESPACE
NEWS.md
README.Rmd
README.md
_pkgdown.yml
appveyor.yml
codecov.yml
splendid.Rproj

README.md

splendid

Travis build status AppVeyor build status Coverage status

Overview

The goal of splendid is to provide a supervised learning pipeline that implements major components of a multiclass classification problem. We guide the user through fitting a classifier, obtaining predictions, and ultimately evaluating performance using metrics and visualizations.

Installation

You can install splendid from github with:

# install.packages("devtools")
devtools::install_github("AlineTalhouk/splendid")

Example

The following example shows how to use the main function of the package, splendid(). A data matrix hgsc contains a subset of gene expression measurements of High Grade Serous Carcinoma Ovarian cancer patients from the Cancer Genome Atlas publically available datasets. Samples as rows, features as columns. The function below runs the package through the splendid() function. First we extract the reference class labels (by TCGA) from the row names of hgsc. Then we fit the random forest and extreme gradient boosting classifiers to one bootstrapped replicate of the data.

library(splendid)
data(hgsc)
class <- attr(hgsc, "class.true")
sl_result <- splendid(data = hgsc, class = class, n = 1,
                      algorithms = c("rf", "xgboost"))
str(sl_result, max.level = 2)
#> List of 8
#>  $ models       :List of 2
#>   ..$ rf     :List of 1
#>   ..$ xgboost:List of 1
#>  $ preds        :List of 2
#>   ..$ rf     :List of 1
#>   ..$ xgboost:List of 1
#>  $ evals        :List of 2
#>   ..$ rf     :'data.frame':  24 obs. of  1 variable:
#>   .. ..- attr(*, "err_632plus")= num 0.447
#>   ..$ xgboost:'data.frame':  24 obs. of  1 variable:
#>   .. ..- attr(*, "err_632plus")= num 0.885
#>  $ bests        : Named chr "rf"
#>   ..- attr(*, "names")= chr "1"
#>  $ ensemble_algs: chr "rf"
#>  $ ensemble_mods:List of 1
#>   ..$ :List of 18
#>   .. ..- attr(*, "class")= chr "randomForest"
#>  $ seq_mods     : NULL
#>  $ seq_preds    : NULL