from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.linear_model import SGDRegressor
vect = TfidfVectorizer(input='filename')
Xtrain = vect.fit_transform(documents)
How to predict a continuous value (time) from text documents?