backwardNeighbors <- function(attrEncoding) {
neighbors <-
lapply(1:length(attrEncoding),
function (i) {
if (attrEncoding[i] == 0)
return(invisible())
neighbor <- attrEncoding
neighbor[i] <- 0
return(neighbor)
})
return(Filter(Negate(is.null), neighbors))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.