diff --git a/R/expct.R b/R/expct.R index a3fee94..78b6dfd 100644 --- a/R/expct.R +++ b/R/expct.R @@ -33,6 +33,9 @@ #' distribution over leaves, with columns \code{f_idx} and \code{wt}. This may #' be preferable for complex constraints. See Examples. #' +#' Please note that results for continuous features which are both included in \code{query} and in +#' \code{evidence} with an interval condition are currently inconsistent. +#' #' @return #' A one row data frame with values for all query variables. #' @@ -122,7 +125,11 @@ expct <- function( # Check query if (is.null(query)) { - query <- params$meta$variable + if (any(is.na(evidence))) { + query <- params$meta$variable + } else { + query <- setdiff(params$meta$variable, colnames(evidence)) + } } else if (any(!query %in% params$meta$variable)) { err <- setdiff(query, params$meta$variable) stop('Unrecognized feature(s) in query: ', err) diff --git a/man/expct.Rd b/man/expct.Rd index 7b37e93..3b74bc5 100644 --- a/man/expct.Rd +++ b/man/expct.Rd @@ -55,6 +55,9 @@ provide a data frame with condition events. This supports inequalities and inter Alternatively, users may directly input a pre-calculated posterior distribution over leaves, with columns \code{f_idx} and \code{wt}. This may be preferable for complex constraints. See Examples. + +Please note that results for continuous features which are both included in \code{query} and in +\code{evidence} with an interval condition are currently inconsistent. } \examples{ # Train ARF and estimate leaf parameters