Classification.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:UVA 作者: chiachun 项目源码 文件源码
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']]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号