title: Training personalized based machine learning models
body: <p>i work on a php project along with python which uses flask as api  which predict user like on a post based on the previous engagement on other posts and its purely user based.</p>
  
  <p>my requirement is suppose there are 1000`s of users in our system. and they have done likes for old posts before.when new posts arrive i need to somehow identify whether user likes it or not .and this is done via a cron job</p>
  
  <p><strong>approach 1</strong></p>
  
  <p>i am using Logistic regression as model so probably need dynamic pkl file for each user.because different users engagement on same post is different so i need to save some thing like model_{user_id}.pkl file where user_id is the user id of the user</p>
  
  <p><strong>approach 2</strong></p>
  
  <p>use content based recommended system.but as far as i know it can't store like a pkl file in production. so for each users from the 1000`s of users i need to run the recommender function.</p>
  
  <p><strong>approach 1 drawback</strong></p>
  
  <p>creating dynamic pkl file for each user which means more files.i never seen this approach on internet</p>
  
  <p><strong>approach 2 drawback</strong></p>
  
  <p>calling the recommender function for each user is probably a bad idea i believe .that will heavily affect cpu usage etc.</p>
  
  <p>can somebody please help me how to properly solve this problem.i am new in machine learning . please consider my question. thanks in advance.</p>