示例#1
0
def split_group(hyper, local):
	c, power, sigma, trans = split_hyper(hyper)

	M1 = local[n_fixm:n_fixm+n_varm]
	
	sig_like_M0 = np.zeros_like(M0)
	for i in range(n_pop):
		sig_like_M0 += sigma[i] * indicate(M0,trans,i)

	sig_like_M1 = np.zeros_like(M1)
	for i in range(n_pop):
		sig_like_M1 += sigma[i] * indicate(M1,trans,i)

	return sig_like_M0, sig_like_M1
示例#2
0
def split_group(hyper, local):
	c, power, sigma, trans = split_hyper(hyper)

	M1 = local[n_fixm:n_fixm+n_varm]
	
	sig_like_M0 = np.zeros_like(M0)
	for i in range(n_pop):
		''' note the change here '''
		ind = indicate(M0, trans, i)
		mu = c[i] * M0**power[i]
		sig_like_M0 += mu * sigma[i] * ind

	sig_like_M1 = np.zeros_like(M1)
	for i in range(n_pop):
		''' same as above '''
		ind = indicate(M1, trans, i)
		mu = c[i] * M1**power[i]
		sig_like_M1 += mu * sigma[i] * ind

	return sig_like_M0, sig_like_M1