A python implementation of the AdaRank algorithm. It is based on weak ranker which use signle feature.
The following code will run Adarank for 500 iteration with optimzation function NDCG@5. If all features are selected 5 times, our algorithm will stop.
model = Adaank(scorer=NDCGScorer_qid(K=5))
model.fit(X, y, qid, X_vali, y_vali, qid_vali)
pred = model.predict(X_test)
print(NDCGScorer_qid(K=5)(y_test,pred,qid_test).mean())
Xu and Li. AdaRank: a boosting algorithm for information retrieval. In Proceedings of SIGIR '07, pages 391–398. ACM, 2007.