knitr::opts_chunk$set(echo = TRUE, cache = FALSE, fig.path = "man/figures/README-")
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:
waist_circum_s0
) consists of a stem and a suffix.
The stem is the substring until the last underscore _
(wairst_circum
).
The suffix is the substring beginning with the last underscore (_s0
).s0
could represent the baseline examinations of a longitudinal
study, s1
the first follow-
up examinations, s2
the second follow up examinations and so on._s
.# Development version from Github devtools::install_github("unmnn/evoxploit")
# 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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.