def unigram_smoothing(data, model): td, idf, vocab = data td = td[:, :-1] lsa = LSA(model) res = lsa.unigram_smoothing() print res.shape print np.abs(td - res).sum() / float(res.shape[0] * res.shape[1])
def unigram_smoothing(data, model): td, idf, vocab = data td = td[:,:-1] lsa = LSA(model) res = lsa.unigram_smoothing() print res.shape print np.abs(td-res).sum() / float(res.shape[0] * res.shape[1])