def prepare(self):
with open('%s' % self.cfg.pca_pkl, 'r') as pklfile:
self.pca = pickle.load(pklfile)
try:
self.df = self.df.query('face == 1')
except:
print 'Face column not found in the dataframe',
print 'Treated as not being processed by skin_filter.'
x = self.df[self.ftcols].as_matrix()
x = preprocessing.scale(x)
xp = self.pca.transform(x)
self.dfp = pd.DataFrame(xp)
self.dfp[['number','time']] = self.df[['number','time']]
评论列表
文章目录