#simulate a dataset with continuous data
dataset <- matrix(runif(100 * 50, 1, 100), nrow = 100 )
#the target feature is the last column of the dataset as a vector
target <- round(dataset[, 50]) ## discretize the variable
dataset <- dataset[, -50]
results <- testIndNB(target, dataset, xIndex = 44, csIndex = 40)
results
#require(gRbase) #for faster computations in the internal functions
#define class variable (here the last column of the dataset)
target <- 49;
dataset[, 49] <- round(dataset[, 49])
#run the SES algorithm using the testIndNB conditional independence test
sesObject <- SES(target, dataset, max_k = 3, threshold = 0.05, test = "testIndNB");
#print summary of the SES output
summary(sesObject);
#plot the SES output
plot(sesObject, mode = "all");
Run the code above in your browser using DataLab