hldr

CRAN_Status_Badge codecov Travis-CI Build Status

Overview

hldr is a collection of heterscedastic linear dimension reduction methods mainly used in supervised learning or classification. This package also leverages these methods in slow_learn() to improve classification.

hldr uses classfy() to create reduced classification objects. Currently, the methods only support qda() since they are heterscedastic methods but there is flexibiliy to use other discriminant functions such as lda() though it might not make since. hldr does allow the use of predict(), but a pretty print method hasn't been developed yet so best to assign to a variable.

In developing sildR we found it useful to have it play nice with the "tidyverse" such as tidyr and modelr. At this point we have not thought of all the uses and combinations with these packages so if you think of something not currently implemented please file a minimal reproducible example on github.

Installation

You can install the latest development version from github with

if (packageVersion("devtools") < 1.6) {
  install.packages("devtools")
}
devtools::install_github("benbarnard/hldr")

If you encounter a clear bug, please file a minimal reproducible example on github.

Example

This is a basic example which shows you how to solve a common problem:

library(tidyverse)
library(modelr)
library(hldr)

df <- iris %>% group_by(Species) %>% crossv_mc(100)

classifier <- df$train %>% map(SYS, targetDim = 1) %>% map(classify)

predicted <- map2(classifier, df$test, predict)


BenBarnard/slidR documentation built on May 5, 2019, 2:40 p.m.