This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Regression analysis of microbiome and metabolome

I have performed multivariate regression analysis of metabolome and metagenome data and got coefficient values for metabolites to microbiome but I am unable set cutoff for regression model. how do I set cutoff for best model. kindly help me out

regression

can you put the code?

data1=pd.read_csv('micro_trial.csv',index_col=0)
data2=pd.read_csv('metab_trial.csv',index_col=0)

d1=data1.T
d2=data2.T
input_features=pd.read_csv('for_pred.csv',index_col=0)
d3=input_features.T


 for g in d1:
    for f in d2:
       p=np.reshape(d1[g].tolist(),(34,1))
       t=np.reshape(d2[f].tolist(),(34,1))
       print(p,t)
       model=LinearRegression().fit(p,t)
       model_s=model.score(p,t)
       model_i=model.intercept_
       model_c=model.coef_
       model_pred=model.predict(t)
       print('R2 value:',model_s)
       print('intercept:', model_i)
       print('coefficient:',model_c)
       print('predict:', model_pred)

0 answers

No answers yet.

Log in to answer this question.