masScore.Rd
score a data.frame MASmodule/model
masScore(
session,
module,
data,
exact = TRUE,
ScoreType = "score",
forceTrail = TRUE,
...
)
viya_connection object, obtained through session
function
MASmodule
object, module name. If name, will try to find a single module with exact name match. See exact
parameter
data.frame
data.frame of the data
the filter query should use "contains" for partial match or "eq" for exact match
execute
for decision, score
for model
boolean, if the mas model is a decision (execute
), it will force add a trailing underscore (_) in variable names.
additional parameters to be passed to httr::GET
such as httr::add_headers
data.frame
with scored rows
if (FALSE) { # \dontrun{
# single row
scored <- masScore(sess, "module_name", data[1,])
scored
# The masScore is implemented with `furrr` for maximum performance
# if you want to parallelize use the following code.
# Not recommended when scoring single row because overhead will drop the performance
future::plan(future::multisession, workers = future::availableCores() -1)
scored <- masScore(sess, "module_name", data)
# if you want to go back to single threaded scoring use
future::plan(future::sequential)
} # }