#
# #' # \dontrun{
# suppressMessages(library(mlpack)) # in case 'mlpack' is not yet loaded
# X <- as.matrix(read.csv("http://datasets.mlpack.org/admission_predict.csv",
# header=FALSE))
# y <-
# as.matrix(read.csv("http://datasets.mlpack.org/admission_predict.responses.
# csv", header=FALSE))
# pp <- preprocess_split(input=X, input_label=as.matrix(1:nrow(X)),
# test_ratio=0.2)
# X_train <- pp[["training"]]
# X_test <- pp[["test"]]
# # labels are indices to operate on both factors or numeric data
# y_train <- y[as.integer(pp[["training_labels"]]), 1]
# y_test <- y[as.integer(pp[["test_labels"]]), 1]
#
# model <- bayesian_linear_regression_train(input=X_train, responses=y_train,
# center=1, scale=0)
# }
Run the code above in your browser using DataLab