Giter Site home page Giter Site logo

how to export the model? about tensorrec HOT 5 CLOSED

jfkirk avatar jfkirk commented on May 24, 2024
how to export the model?

from tensorrec.

Comments (5)

jfkirk avatar jfkirk commented on May 24, 2024

Hey @Composmentis ! We are still building convenience methods for saving and loading models. We'll be tracking that work on #8

I expect that to be merged within the week.

Closing as duplicate

from tensorrec.

borisrev avatar borisrev commented on May 24, 2024

Hi James,

I'm still unclear on @Composmentis 's initial question, i.e. how does saving/loading models enable feeding a previously unseen user to an already trained model with tensorrec?

Thanks!

from tensorrec.

jfkirk avatar jfkirk commented on May 24, 2024

Hey @borisrev -- A user is simply a collection of feature values, so a TensorRec does not know or care if it has seen the user in training.

I interpreted the initial question to mean "I want to train a TensorRec model and save it. In the future, I will want to load it and get predictions for new users." The missing link, at the time of the initial question, is that TensorRec did not have methods for saving and loading the models.

from tensorrec.

borisrev avatar borisrev commented on May 24, 2024

Let's say you're using an identity matrix for the user matrix when training as in the MovieLens example. After training, if you want to pass a new user to predict() along with same item_features used in training, what dimensions would then be appropriate for the new user_features matrix? A row of all 0s with the same number of columns as the user matrix used during training?

Thanks for the quick reply!

from tensorrec.

jfkirk avatar jfkirk commented on May 24, 2024

Ahh sorry I was unclear -- A TensorRec model does not know or care if it has seen the user in training unless the system is built with "Indicator Features". In the scenario you've outlined, the identity matrix for users is a set of indicator features, so all users will need to be present at fit() time.

The number of user/item features must be the same both at fit() and predict() time.

The counter-example would be the Book Crossing dataset with user_indicator and item_indicator set to False. In this case, the features are only metadata and the TensorRec model would not care if the user/item was present during training.

from tensorrec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.