knitr::opts_chunk$set(echo = TRUE,
                      cache = FALSE,
                      fig.path = "man/figures/README-")

Overview

evoxploit is a package for augmenting a longitudinal dataset* with so called evolution features (Niemann et al., 2015) and sequence features (Hielscher et al., 2014). Theses features reflect a study participant's individual change over time, his/her change over time in comparison with the cluster he/she was closest to at the baseline examinations, and the change of whole participant groups.

* The functions of this package require a n*m-dimensional dataframe for the input variables and a factor vector of length n with the target variable (e.g. a medical outcome). The input data frame should have the following variables names semantics:

Installation

# Development version from Github
devtools::install_github("unmnn/evoxploit")

Usage Example

# Inspect example data
library(evoxploit)
str(epi)

# Create an Evoxploit object
epi_evo <- Evoxploit$new(epi$data, epi$label[[1]], wave_suffix = "_s")

# Print summary to console
summary(epi_evo)
library(dplyr)
library(ggplot2)
# Calculate Gain Ratio of both original and extracted features w.r.t. the 
# target variable
df_evo <- bind_cols(tibble(label = epi_evo$label), epi_evo$all_features)

gain_names <- FSelector::gain.ratio(label ~ ., data = df_evo)
gain_names %>%
  tibble::rownames_to_column("variable") %>%
  arrange(desc(attr_importance)) %>%
  mutate(variable = forcats::fct_reorder(variable, attr_importance)) %>%
  slice(1:20) %>%
  ggplot(aes(variable, attr_importance)) +
  geom_col() +
  coord_flip()

Bibliography



unmnn/evoxploit documentation built on Oct. 28, 2020, 12:24 p.m.