condvis2 v0.1.1

0

Monthly downloads

0th

Percentile

Interactive Conditional Visualization for Supervised and Unsupervised Models in Shiny

Constructs a shiny app function with interactive displays for conditional visualization of models, data and density functions. An extended version of package 'condvis'. Mark O'Connell, Catherine B. Hurley, Katarina Domijan (2017) <doi:10.18637/jss.v081.i05>.

Readme

condvis2

The goal of condvis2 is to visualise prediction models via shiny. Predictions are generated from one or more model fits. Low-dimensional visualisations are constructed showing the relationship between the response and one or two (section) predictors, conditional on the remaining predictors. The section predictors and conditioning values are selected within the shiny app.

Installation

You can install condvis2 from github with:

# install.packages("devtools")
devtools::install_github("cbhurley/condvis2")

Example 1: A prediction model

This is a basic condvis example.

We will use the airquality data built in to R.

ozone <- na.omit(airquality)
fit <- loess(Ozone~Wind+Solar.R+Temp, data=ozone)
condvis(ozone, fit, sectionvars="Wind", conditionvars=c("Solar.R", "Temp"))

The result is shown in the screenshot below. It shows the loess prediction for Wind, conditional on values of the other two predictors.
Only observations whose Solar.R and Temp values are near (207,79) are shown. The user can move around the pink cross to see how the prediction varies.

Check out the vignette Introduction to condvis2 for more information and details.

Example 2: A density estimate

library(ks)
data(iris)
irisf <- kde(x=iris[,1:3])

condvis(data = iris, model = list(kde=irisf), 
        sectionvars= c("Sepal.Length", "Sepal.Width"), 
        conditionvars= "Petal.Length", density=T)

The result is shown in the screenshot below. It shows the estimated density of two variables conditional on the third.

Functions in condvis2

Name Description
clusPath Constructs tours of data space based on centers of clusters
createCVUI Constructs UI for Condvis
medoid Finds medoid of data
condvis Creates Condvis Shiny app
CVpredict A predict generic function for condvis
pathInterpolate Interpolation
createCVServer Title Creates a shiny server
conditionPlot Plots a conditionPlot.
fitPath Constructs tours of data space based on fits.
arrangeC Make a list of variable pairings for condition selecting plots
plotTourDiagnostics Plots diagnostics for the tour supplied
similarityweight Calculate the similarity weight for a set of observations
weightcolor Fade colours according to a weight vector
sectionPlot Plots the main condvis display
tours Constructs a various tours of data space
No Results!

Vignettes of condvis2

Name
vignettefigs/Boston.png
vignettefigs/Pima.png
vignettefigs/dens3Right2.png
vignettefigs/iris1.png
vignettefigs/left1.png
vignettefigs/mclustda1.png
vignettefigs/mclustda6.png
vignettefigs/ozone.png
vignettefigs/ozone1.png
vignettefigs/ozone3.png
vignettefigs/ozone4.png
vignettefigs/ozone5.png
vignettefigs/ozone6.png
Keras.Rmd
introduction.Rmd
mclust.Rmd
mlr.Rmd
parsnip.Rmd
No Results!

Last month downloads

Details

License GPL (>= 2.0)
Encoding UTF-8
LazyData true
RoxygenNote 7.1.1
VignetteBuilder knitr
BugReports https://github.com/cbhurley/condvis2/issues
URL https://github.com/cbhurley/condvis2
NeedsCompilation no
Packaged 2020-09-25 09:04:59 UTC; catherine
Repository CRAN
Date/Publication 2020-09-25 09:20:09 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/condvis2)](http://www.rdocumentation.org/packages/condvis2)