public final class UnreducedModel extends Object
Normally, the input to the recommender is construed as a very large sparse matrix, and factored (approximately) as two low-rank user-feature / feature-item matrices. The input's dimensionality is reduced in this way.
But it's possible that one (or both) dimensions is already low; maybe there are only 30 items in the model to begin with. There is no point in constructing a lower-dimension approximation since it is already low dimension. In this case, the factorization is trivial: the user-item matrix is already a tall/skinny matrix which can be thought of as the user-feature matrix, and the "feature-item" matrix is just the identity matrix. Or vice versa if there are few users.
This utility program will read input and output the result as a model.bin.gz file suitable
for use with the Serving Layer, without dimensionality reduction. Of course, this should only be
done if the dimensionality of one or both is in fact low!
Usage: UnreducedModel [input file dir]
public static void writeUnreducedModel(File inputDir) throws IOException
IOExceptionCopyright © 2012-2013. All Rights Reserved.