funcs.py 文件源码

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

项目:Homology_BG 作者: jyotikab 项目源码 文件源码
def postProcess(PDFeatures1,which):
        PDFeatures2 = np.copy(PDFeatures1)
        cols = np.shape(PDFeatures2)[1]
        for x in xrange(cols):
                indinf = np.where(np.isinf(PDFeatures2[:,x])==True)[0]
                if len(indinf) > 0:
                        PDFeatures2[indinf,x] = 0
                indnan = np.where(np.isnan(PDFeatures2[:,x])==True)[0]
                if len(indnan) > 0:
                        PDFeatures2[indnan,x] = 0

        indLN = np.where(PDFeatures2[:,0] < -1)[0]
        for x in indLN:
                PDFeatures2[x,0] = np.random.uniform(-0.75,-0.99,1)

        term1 = (PDFeatures2[:,2]+PDFeatures2[:,3]+PDFeatures2[:,5])/3.
        print term1

        PDFeatures2[:,1] = 1.-term1
        print "PDF",PDFeatures2[:,1]
        return PDFeatures2
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号