Search in sources :

Example 1 with ModelKeyV3

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;
}
Also used : Frame(water.fvec.Frame) Model(hex.Model) ModelKeyV3(water.api.schemas3.KeyV3.ModelKeyV3) FrameKeyV3(water.api.schemas3.KeyV3.FrameKeyV3)

Aggregations

Model (hex.Model)1 FrameKeyV3 (water.api.schemas3.KeyV3.FrameKeyV3)1 ModelKeyV3 (water.api.schemas3.KeyV3.ModelKeyV3)1 Frame (water.fvec.Frame)1