#simulate a dataset with continuous data
dataset <- matrix( runif(50 * 200, 1, 50), ncol = 50 )
#the target feature is the last column of the dataset as a vector
target <- rpois(200, 10)
target[sample(1:100, 30)] <- 0
results <- testIndZIP(target, dataset, xIndex = 14, csIndex = 10)
results
#require(gRbase) #for faster computations in the internal functions
#run the SES algorithm using the testIndZIP conditional independence test
sesObject <- SES(target, dataset, max_k = 3, threshold = 0.05, test = "testIndZIP");
sesObject2 <- SES(target, dataset, max_k = 3, threshold = 0.05, test = "testIndPois");
#print summary of the SES output
summary(sesObject);
summary(sesObject2);
#plot the SES output
plot(sesObject, mode = "all");
Run the code above in your browser using DataLab