Open Pryanic opened 5 years ago
@Pryanic did you found any solution of above error?
@Anticsss This problem is due to the difference between the length of list and k. The k value must be less than or equal to the length of the list. (k<= len(list)) You need fix RankNet.py like this. line 110 train_ndcg = self.ndcg(y_train, train_score) line 111 test_ndcg = self.ndcg(y_test, test_score) ↓ line 110 train_ndcg = self.ndcg(y_train, train_score, len(y_train)) line 111 test_ndcg = self.ndcg(y_test, test_score, len(y_test))
@Anticsss This problem is due to the difference between the length of list and k. The k value must be less than or equal to the length of the list. (k<= len(list)) You need fix RankNet.py like this. line 110 train_ndcg = self.ndcg(y_train, train_score) line 111 test_ndcg = self.ndcg(y_test, test_score) ↓ line 110 train_ndcg = self.ndcg(y_train, train_score, len(y_train)) line 111 test_ndcg = self.ndcg(y_test, test_score, len(y_test))
is this right? this is not solution of above error...
I wrote the following code
and got the next error, could you please help me with it