Description Details Author(s) Examples
Includes binning categorical variables into lesser number of categories based on t-test, converting categorical variables into continuous features using the mean of the response variable for the respective categories, understanding the relationship between the response variable and predictor variables using data transformations.
| Package: | corkscrew |
| Type: | Package |
| Version: | 1.1 |
| Date: | 2015-10-30 |
| Depends: | R (>= 3.0.1), ggplot2, gplots, RColorBrewer, igraph, stats, grDevices |
| License: | GPL (version 2 or newer) |
Navin Loganathan, Mohan Manivannan, Santhosh Sasanapuri, LatentView Analytics
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # using transformation
data(airquality)
transformation(names(airquality)[2:4],"Ozone",airquality)
# using ctoc
data(ChickWeight)
# Converting the "Chick" variable into factor from ord.factor for demonstration purposes.
ChickWeight$Chick <- as.factor(as.numeric(ChickWeight$Chick))
# Returns a dataframe with two added columns for "Chick" and "Diet"
head(ctoc(y = "weight", x = c("Chick","Diet"), data = ChickWeight, min.obs = 12))
# using tbin
train = as.data.frame(cbind(runif(1000, 10, 1000),sample(1:40, 1000,TRUE)))
colnames(train) = c("response","state")
train$state = as.factor(train$state)
train.output = tbin(dv = "response",idv = c("state"),train,25,TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.