ITADN

Train and Test Data split error

#274Closedanonimoustt 创建于 2023-11-20
A
anonimousttcommented
Hi, I was trying to split the following protein data: [ ['0', ' associated', ' WTGMESEEENK'] ['1', ' associated', ' ILSDPSDDTKG'] ['2', ' associated', ' VRLIPSWTTVI'] ['3', ' associated', ' PQTSPSPKRAT'] ['4', ' associated', ' PPLVGTYNTLL'] ['5', ' associated', ' QRLIQSHPESA'] ['6', ' associated', ' EKLALYVYEYL'] ['7', ' associated', ' GSRSRTPSLPT'] ['8', ' associated', ' IDLPMSPRTLD'] ['9', ' associated', ' LRIICSHEHYV'] ['10', ' associated', ' IKEDVYLSHDH'] ['11', ' associated', ' NRNGDTCVTLL'] ['12', ' associated', ' SAEMKSAALEE'] ['13', ' associated', ' LSDSLSGSSLY'] ['14', ' associated', ' LPRASSLNENV'] ['15', ' associated', ' NSGDFYDLYGG'] ['16', ' associated', ' SVNPEYFSAAD'] ['17', ' associated', ' NPGLETHRKRK'] ['18', ' associated', ' EVFDFSQRQKD'] ['19', ' associated', ' FKRQLSLRINE'] ['20', ' associated', ' ASPSNSCQDST'] ['21', ' associated', ' EDRFLTPGRAQ'] ['22', ' associated', ' LSRVDSTTCLF'] ] Using from ampligraph.evaluation import train_test_split_no_unseen X_train, X_test = train_test_split_no_unseen(np.array(data33), test_size=10)#,allow_duplication=True) Even I tried setting allow_duplication=True it is showing error Exception: Cannot create a test split of the desired size. Some entities will not occur in both training and test set. Set allow_duplication=True,remove filter on test predicates or set test_size to a smaller value. Once I set allow_duplication=True I got the following error: ValueError: 'a' cannot be empty unless no samples are taken Would you please help to resolve this?
关闭于 2023-11-22 2 条评论