Regression analysis of microbiome and metabolome
0
0
Entering edit mode
2.2 years ago

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 • 627 views
ADD COMMENT
0
Entering edit mode

can you put the code?

ADD REPLY
0
Entering edit mode
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)
ADD REPLY

Login before adding your answer.

Traffic: 1873 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6