Learn R Programming

PatientLevelPrediction (version 6.4.0)

setNaiveBayes: Create setting for naive bayes model with python

Description

Create setting for naive bayes model with python

Usage

setNaiveBayes()

Arguments

Value

a modelSettings object

Examples

Run this code
 # dontrun reason: requires python's scikit-learn, checkSklearn() will error without it 
if (FALSE) { 
plpData <- getEunomiaPlpData()
model <- setNaiveBayes()
analysisId <- "naiveBayes"
saveLocation <- file.path(tempdir(), analysisId)
results <- runPlp(plpData, modelSettings = model,
                  saveDirectory = saveLocation,
                  analysisId = analysisId)
# clean up
unlink(saveLocation, recursive = TRUE)
}

Run the code above in your browser using DataLab