May 2020
Intermediate to advanced
404 pages
10h 52m
English
Now, create a folder called api in the root directory of your project. Then, save the trained model, which is the lower-order matrices obtained after factorization of the user-products rating matrix:
import pickleoutput = open('api/model.pkl', 'wb')pickle.dump(P,output)pickle.dump(Q,output)pickle.dump(user_vectorizer,output)output.close()
Saving the models as binary pickle files allows us to quickly load them back into the memory during deployment of the model on the backend of the website.
Now that we are done developing the predictive model, we will move on to building an interface for the application to work on.
Read now
Unlock full access