Created
          July 12, 2020 23:17 
        
      - 
      
 - 
        
Save neelriyer/4778d6be6c5b234121b84c79b4b7dae7 to your computer and use it in GitHub Desktop.  
    Collab filtering create data bunch
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | from fastai.collab import * | |
| from fastai.tabular import * | |
| user_name = 'userId' | |
| item_name = 'movieId' | |
| rating_name = 'rating' | |
| x = ratings.drop([rating_name, 'timestamp'],axis=1) | |
| y = ratings[rating_name].astype(np.float32) | |
| data = ColumnarModelData.from_data_frame(path, val_idxs, x, y, [user_name, item_name], bs=64) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment