getStratify <- function(strat, d){
if (is.null(strat)){
if (d$name == "multinomial" ){ strat <- TRUE }
else { strat <- FALSE }
}
else {
if (!is.element(d$name, c( "bernoulli", "multinomial"))){
warning("You can only use class.stratify.cv when distribution is bernoulli or multinomial. Ignored.")
strat <- FALSE
}
} # Close else
strat
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.