How to get archetypes from a GLRM model in H2O

glrm_matrix_decomposition.png

GLRM is a new machine learning approach for reconstructing missing values and identifying important features in heterogeneous data.

Learn more about GLRM Models in H2O: https://github.com/h2oai/h2o-tutorials/blob/master/tutorials/glrm/glrm-tutorial.md

The following code snippet helps users to use R/python interface to get archetypes from a GLRM which are not available from FLOW:

> h2o.init()
> cancar = h2o.importFile("https://s3.amazonaws.com/h2o-public-test- data/smalldata/glrm_test/cancar.csv")
> cancar.splits = h2o.splitFrame(cancar, ratios = .5, seed = 1234)
> model1 <- h2o.glrm(training_frame = cancar.splits[[1]],k=4)
> fitY <- model1@model$archetypes
> model2 <- h2o.glrm(training_frame = cancar.splits[[2]], init = "User", user_y = fitY)

Thanks.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s