meaning of h2o metrics when xval is selected? When a metric is computed for a trained model with nfolds greater than 1 in h2o, what is the value when `xval=TRUE' ?
h2o.mse(model, xval=TRUE)

Here is my read and please correct me if I'm off. If nfolds is 3, it is doing 3-fold cross validation to select the best model. So, the mse(train=T) gives the MSE of the best fold of the three models evaluated on the training set. Likewise, valid=TRUE gives the error on the validation set by the same model.
But what is the MSE when xval is selected?
According to the h2o.mse help page, xval is the cross-validation error. So I expect it is the average of the 3 cross-validation runs. 
However, when i look at the actual values, xval is always lower than valid, which contradicted my interpretation above. The best model must have a lower MSE than the average. 
 A: When you set nfolds>1, H2O will perform k-fold cross-validation for the specific purpose of model evaluation, not model selection.  It will train k models for cross-validation and then a final model on the full training set.  The value of h2o.mse(model, xval=TRUE) is the average MSE over the k models trained in the cross-validation process.  
The value of h2o.mse(model, train=TRUE) will provide the (full) training set MSE and if you passed a separate validation_frame, then h2o.mse(model, valid=TRUE) will provide the validation MSE.
If you want actually perform model selection (by choosing the best model based on cross-validation error), then take a look at h2o.grid().
A: you can find more details from this in depth question about how H2O's cross validation works https://community.h2o.ai/questions/550/i-am-not-new-to-cross-validation-but-i-am-new-ish.html
and the following H2O docs sections:
Cross Validation Section
http://h2o-release.s3.amazonaws.com/h2o/master/3706/docs-website/h2o-docs/cross-validation.html
you can also look at the nfolds parameter explanation in the docs appendix
