-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
48 lines (36 loc) · 1.88 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# splendid
<!-- badges: start -->
[![R-CMD-check](https://github.com/AlineTalhouk/splendid/workflows/R-CMD-check/badge.svg)](https://github.com/AlineTalhouk/splendid/actions)
[![Coverage status](https://codecov.io/gh/AlineTalhouk/splendid/branch/master/graph/badge.svg)](https://codecov.io/github/AlineTalhouk/splendid?branch=master)
<!-- badges: end -->
## 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:
```{r gh-installation, eval = FALSE}
# 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.
```{r example}
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)
```