Skip to content

Commit

Permalink
go back to former handling of partial evidence
Browse files Browse the repository at this point in the history
  • Loading branch information
jkapar committed Jun 3, 2024
1 parent 042b9e3 commit 949b026
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 8 additions & 1 deletion R/expct.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#'
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions man/expct.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 949b026

Please sign in to comment.