def grid_BIKE2(pdr, alphas_log, y_id = 'Solubility_log_mol_l'): print "BIKE with (A+B)+W" xM1 = jpd.pd_get_xM( pdr, radius=6, nBits=4096) xM2 = jpd.pd_get_xM_MACCSkeys( pdr) yV = jpd.pd_get_yV( pdr, y_id = y_id) #A1 = jpyx.calc_tm_sim_M( xM1) #A2 = jpyx.calc_tm_sim_M( xM2) #A = np.concatenate( ( A1, A2), axis = 1) xM = np.concatenate( ( xM1, xM2), axis = 1) A = jpyx.calc_tm_sim_M( xM1) print A.shape molw_l = jchem.rdkit_molwt( pdr.SMILES.tolist()) print np.shape( molw_l) A_molw = jchem.add_new_descriptor( A, molw_l) print A_molw.shape gs = jgrid.gs_Ridge( A_molw, yV, alphas_log=alphas_log) jutil.show_gs_alpha( gs.grid_scores_) jgrid.cv( 'Ridge', A_molw, yV, alpha = gs.best_params_['alpha']) return gs
def grid_MLR_B(pdr, alphas_log, y_id = 'Solubility_log_mol_l'): print "MLR with B" xM2 = jpd.pd_get_xM_MACCSkeys( pdr) xM_molw = xM2 yV = jpd.pd_get_yV( pdr, y_id = y_id) gs = jgrid.gs_Ridge( xM_molw, yV, alphas_log=alphas_log) jutil.show_gs_alpha( gs.grid_scores_) jgrid.cv( 'Ridge', xM_molw, yV, alpha = gs.best_params_['alpha']) return gs
def grid_MLR_A(pdr, alphas_log, y_id = 'Solubility_log_mol_l'): print "MLR with A" xM1 = jpd.pd_get_xM( pdr, radius=6, nBits=4096) xM_molw = xM1 yV = jpd.pd_get_yV( pdr, y_id = y_id) gs = jgrid.gs_Ridge( xM_molw, yV, alphas_log=alphas_log) jutil.show_gs_alpha( gs.grid_scores_) jgrid.cv( 'Ridge', xM_molw, yV, alpha = gs.best_params_['alpha']) return gs