def selection_val(traj_exp,adj_mat):
r = traj_exp.shape[<NUM_LIT:0>] <EOL>c = traj_exp.shape[<NUM_LIT:1>] <EOL>k = np.sum(adj_mat[<NUM_LIT:0>]><NUM_LIT:0>,dtype=float) <EOL>dev=np.zeros_like(traj_exp,dtype=float) <EOL>val=np.zeros(traj_exp.shape[<NUM_LIT:1>],dtype=float) <EOL>print ("<STR_LIT>")<EOL>ivar=np.var(traj_exp,axis=<NUM_LIT:0>,ddof=<NUM_LIT:1>) <EOL>print ("<STR_LIT>")<EOL>print ("<STR_LIT>") <EOL>print ("<STR_LIT>")<EOL>for i in range(<NUM_LIT:0>,r): <EOL><INDENT>print (((i/r)*<NUM_LIT:100>),end='<STR_LIT:\r>') <EOL>for j in range(<NUM_LIT:0>,c):<EOL><INDENT>dev[i,j] = dev_ij(i,j,traj_exp,adj_mat) <EOL><DEDENT><DEDENT>print ("<STR_LIT>")<EOL>rowsumdev=np.sum(dev,axis=<NUM_LIT:0>) <EOL>print ("<STR_LIT>")<EOL>for i in range(<NUM_LIT:0>,c): <EOL><INDENT>if rowsumdev[i]!=<NUM_LIT:0>: <EOL><INDENT>val[i] = ((ivar[i])/(rowsumdev[i]/(r*k-<NUM_LIT:1>))) <EOL><DEDENT><DEDENT>print ("<STR_LIT>")<EOL>return val<EOL>
Function returns an ndarray of ratios calculated by dividing the summed neighborhood variances by the global variance
:param traj_exp: ndarray representing gene expression
:param adj_mat: ndarray representing the calculated adjacency matrix
:return val: ndarray representing the ratio of summed neighborhood variances by the global variance