forked from mayank5ingh/py-recommendation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtrain.py
More file actions
22 lines (15 loc) · 809 Bytes
/
train.py
File metadata and controls
22 lines (15 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""
Created on Mon Jan 16 01:30:40 2017
@author: mayank singh
sample-data is collection of offer ids and their descriptions(Harvested from OfferMaster.csv)
on which TF-IDF is run and their cosine similarities calculated and stored in redis.
sample-data has been trimmed considerably in order to compensate for low RAM.
sample-data latest contains untrimmed dataset including all offerids,should be considered
for deployment on a system with a large(>=8Gb) RAM preferabally a server
train.py is having only two lines of code but has a separate file
as it ensures server resources are not being over-utilized by running
training every time a recommendation is required to be made.
Train once and Predict multiple times.
"""
from engines import content_engine
content_engine.train('sample-data.csv')