Package io.trino.plugin.ml
Class ModelUtils
java.lang.Object
io.trino.plugin.ml.ModelUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic Modeldeserialize(byte[] data) static Modeldeserialize(io.airlift.slice.Slice slice) deserializeModels(byte[] bytes) static com.google.common.hash.HashCodemodelHash(io.airlift.slice.Slice slice) static io.airlift.slice.SliceSerializes the model using the following format int: format version byte[32]: SHA256 hash of all following data int: id of algorithm int: length of hyperparameters section byte[]: hyperparameters (currently not used) long: length of data section byte[]: model datastatic byte[]serializeModels(Model... models) static FeatureVectortoFeatures(SqlMap sqlMap)
-
Method Details
-
serialize
Serializes the model using the following format int: format version byte[32]: SHA256 hash of all following data int: id of algorithm int: length of hyperparameters section byte[]: hyperparameters (currently not used) long: length of data section byte[]: model datanote: all multibyte values are in little endian
-
modelHash
public static com.google.common.hash.HashCode modelHash(io.airlift.slice.Slice slice) -
deserialize
-
deserialize
-
serializeModels
-
deserializeModels
-
toFeatures
-