import yaml import json from passWeightCoeff import CoeffTable fin_name = '../data/semi/coefficient/train0_coeff.json' tables = json.loads(open(fin_name).read()) pw = tables['pws'] pwf = tables['pwfs'] print 'loaded' coeff = CoeffTable(tables = (pw, pwf)) print 'start cal' coeff.lookUp()