joy50706 / iAMPCN

11 stars 6 forks source link

cv_BUG #3

Closed cfz1998 closed 1 month ago

cfz1998 commented 1 month ago

https://github.com/joy50706/iAMPCN/blob/master/predict.py#L145-150

cfz1998 commented 1 month ago

what's the means about textcnn_cdhit_100_0.pth.tar?

cfz1998 commented 1 month ago

Maybe textcnn_cdhit_100_{cv_number}.pth.tar?

Sweetsour-crap commented 1 month ago

I have found the same problem. It may be a mistake by the authors.

It should be changed into ''' for cv_number in range(10): testing(testfasta=fas_seq, model_file=f'models/AMP_2nd/{function_name}/textcnn_cdhit100{cv_number}.pth.tar', save_file=f'tmp_save/{function_name}/{temp_save_AMPfilename}{cv_number}.csv', batch_size=batch_size, patience=10, n_epochs=epochs,seq_len=seq_len,cdhit_value=cdhit_value,cv_number=cv_number) ''' as you mentioned. Otherwise, the input data will only be predicted by the first model of the ten folds, and get the same probabilities.