I have created a sample code to reproduce the issue and I am sharing this over here. Its a code snippet for Logistic Regression with CV and without CV. I am also attaching the console output on Windows 10 and Windows 2016 with and without CV. Here, I am also attaching my sample dataset.
Here, I am seeing precision value difference between AUC and PRAUC values. They are different for training as well as nfold(cv). If we look a little deeply, I have also see the precision values differences between for Gini(Nfold) and AIC (Nfold, test and train).
Also, I have provided the model output differences on Windows 10 and Windows 2016 but I have seen these differences on Windows 2019 and Linux as well.
void trainGLMLogisticModel(String modelName, String url) throws Exception {
H2oApi h2o = url != null ? new H2oApi(url) : new H2oApi();
// Utility var:
JobV3 job = null;
// STEP 0: init a session
String sessionId = h2o.newSession().sessionKey;
// STEP 1: import raw file
ImportFilesV3 importBody = h2o.importFiles("C:\\SampleDataSets\\DirectBankUSAx.csv");
System.out.println("import: " + importBody);
// STEP 2: parse setup
ParseSetupV3 parseSetupBody = h2o.guessParseSetup(H2oApi.stringArrayToKeyArray(importBody.destinationFrames, FrameKeyV3.class));
System.out.println("parseSetupBody: " + parseSetupBody);
String completeFrameName = modelName + ".data";
String trainingFrameName = modelName + ".train";;
String validationFrameName = modelName + ".validation";;
// STEP 3: parse into columnar Frame
ParseV3 parseParms = new ParseV3();
H2oApi.copyFields(parseParms, parseSetupBody);
parseParms.destinationFrame = H2oApi.stringToFrameKey(completeFrameName);
parseParms.blocking = true; // alternately, call h2o.waitForJobCompletion(parseSetupBody.job)
ParseV3 parseBody = h2o.parse(parseParms);
System.out.println("parseBody: " + parseBody);
String seed = "17706";
String ratio = "0.70";
// STEP 4: Split into test and train datasets
String tmpVec = "tmp_" + UUID.randomUUID().toString();
String splitExpr = "(, " +
" (tmp= " + tmpVec + " (h2o.runif " + completeFrameName + " " + seed + "))" +
" (assign " + trainingFrameName +
" (rows " + completeFrameName + " (<= " + tmpVec + " " + ratio + ")))" +
" (assign " + validationFrameName +
" (rows " + completeFrameName + " (> " + tmpVec + " "+ ratio +")))" +
" (rm " + tmpVec + "))";
RapidsSchemaV3 rapidsParms = new RapidsSchemaV3();
rapidsParms.sessionId = sessionId;
rapidsParms.ast = splitExpr;
h2o.rapidsExec(rapidsParms);
System.out.println("Split data into train and test");
// STEP 5: Train the model (NOTE: step 4 is polling, which we don't require because we specified blocking for the parse above)
GLMParametersV3 glmParms = new GLMParametersV3();
//comment below 3 lines if you dont want to provide model name. IT will take a default name.
ModelKeyV3 modelKey = new ModelKeyV3();
modelKey.name = modelName; //Provide the model name.
glmParms.modelId = modelKey;
glmParms.seed = 15341;
glmParms.family = GLMFamily.binomial;
glmParms.trainingFrame = H2oApi.stringToFrameKey(trainingFrameName);
glmParms.validationFrame = H2oApi.stringToFrameKey(validationFrameName);
ColSpecifierV3 responseColumn = new ColSpecifierV3();
responseColumn.columnName = "TrialRespond";
glmParms.responseColumn = responseColumn;
glmParms.solver = GLMSolver.IRLSM;
glmParms.alpha = new double[] {1.0};
glmParms.lambda = new double[] {0.01};
glmParms.lambdaSearch = false;
glmParms.earlyStopping = true;
glmParms.nlambdas = -1;
glmParms.standardize = true;
glmParms.missingValuesHandling = GLMMissingValuesHandling.MeanImputation;
glmParms.maxIterations = 700;
glmParms.objectiveEpsilon = 0.43;
glmParms.gradientEpsilon = -1.0;
glmParms.link = GLMLink.logit;
glmParms.maxActivePredictors = 500;
glmParms.nfolds = 5;
System.out.println("About to train GLM. . .");
GLMV3 glmBody = h2o.train_glm(glmParms);
System.out.println("glmBody: " + glmBody);
// STEP 6: poll for completion
job = h2o.waitForJobCompletion(glmBody.job.key);
System.out.println("GLM build done.");
//Delete all the frames
deleteFrame(h2o, completeFrameName);
deleteFrame(h2o, trainingFrameName);
deleteFrame(h2o, validationFrameName);
// STEP 99: end the session
h2o.endSession();
}