use of water.api.schemas3.KeyV3.ModelKeyV3 in project h2o-3 by h2oai.
the class ModelMetricsBaseV3 method fillFromImpl.
@Override
public S fillFromImpl(ModelMetrics modelMetrics) {
// If we're copying in a Model we need a ModelSchemaV3 of the right class to fill into.
Model m = modelMetrics.model();
if (m != null) {
this.model = new ModelKeyV3(m._key);
this.model_category = m._output.getModelCategory();
this.model_checksum = m.checksum();
}
// If we're copying in a Frame we need a Frame Schema of the right class to fill into.
Frame f = modelMetrics.frame();
if (null != f) {
//true == f.getClass().getSuperclass().getGenericSuperclass() instanceof ParameterizedType
this.frame = new FrameKeyV3(f._key);
this.frame_checksum = f.checksum();
}
PojoUtils.copyProperties(this, modelMetrics, PojoUtils.FieldNaming.ORIGIN_HAS_UNDERSCORES, new String[] { "model", "model_category", "model_checksum", "frame", "frame_checksum" });
RMSE = modelMetrics.rmse();
return (S) this;
}
Aggregations