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
评论列表
文章目录