knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

splendid

R-CMD-check 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 Ovarian Carcinoma patients from the Cancer Genome Atlas publicly 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"), seed_boot = 5)
str(sl_result, max.level = 2)


AlineTalhouk/splendid documentation built on Feb. 23, 2024, 9:37 p.m.