Skip to content

Commit

Permalink
Fix failed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maurever committed Sep 21, 2023
1 parent b490cfa commit 206cc50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void initActualParamValues() {
}

@Override
public ModelMojoWriter getMojo() {
public UpliftDrfMojoWriter getMojo() {
return new UpliftDrfMojoWriter(this);
}

Expand Down
4 changes: 3 additions & 1 deletion h2o-r/h2o-package/R/models.R
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,7 @@ h2o.feature_frequencies <- feature_frequencies.H2OModel
#' @param data (DEPRECATED) An H2OFrame. This argument is now called `newdata`.
#' @param auc_type For multinomila model only. Set default multinomial AUC type. Must be one of: "AUTO", "NONE", "MACRO_OVR", "WEIGHTED_OVR", "MACRO_OVO",
#' "WEIGHTED_OVO". Default is "NONE"
#' @param auuc_type For binomial model only. Set default AUUC type. Must be one of: "AUTO", "NONE", "GINI", "GAIN", "LIFT". Default is "NONE".
#' @return Returns an object of the \linkS4class{H2OModelMetrics} subclass.
#' @examples
#' \dontrun{
Expand Down Expand Up @@ -1056,6 +1057,7 @@ h2o.performance <- function(model, newdata=NULL, train=FALSE, valid=FALSE, xval=
if(!is.logical(xval) || length(xval) != 1L || is.na(xval)) stop("`xval` must be TRUE or FALSE")
if(sum(valid, xval, train) > 1) stop("only one of `train`, `valid`, and `xval` can be TRUE")
if(!(auc_type %in% c("AUTO", "NONE", "MACRO_OVR", "WEIGHTED_OVR", "MACRO_OVO", "WEIGHTED_OVO"))) stop("`auc_type` must be \"AUTO\", \"NONE\", \"MACRO_OVR\", \"WEIGHTED_OVR\", \"MACRO_OVO\", or \"WEIGHTED_OVO\".")
if(!(auuc_type %in% c("AUTO", "NONE", "GINI", "LIFT", "GAIN"))) stop("`auuc_type` must be \"AUTO\", \"NONE\", \"GINI\", \"LIFT\" or \"GAIN\"." )

missingNewdata <- missing(newdata) || is.null(newdata)
if( missingNewdata && auc_type != "NONE") {
Expand All @@ -1078,7 +1080,7 @@ h2o.performance <- function(model, newdata=NULL, train=FALSE, valid=FALSE, xval=
} else if(!is.null(model@parameters$auc_type) && model@parameters$auc_type != "NONE"){
parms[["auc_type"]] <- model@parameters$auc_type
}
if(auc_type != "NONE"){
if(auuc_type != "NONE"){
parms[["auuc_type"]] <- auuc_type
} else if(!is.null(model@parameters$auuc_type) && model@parameters$auuc_type != "NONE"){
parms[["auuc_type"]] <- model@parameters$auuc_type
Expand Down

0 comments on commit 206cc50

Please sign in to comment.