-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'XGBRanker' object has no attribute 'score' #19
Comments
Sta robba funziona se usata correttamente ;-) You are missing to translate the XGBoost model into an RTEnsemble model (the one that models an ensemble of regression trees in RankEval). For example, take a look at the following notebook showing how to use the RTEnsemble model in conjunction with LightGBM (XGBoost is almost the same). So to summarize:
P.S. Also the dataset has to be in the RankEval format. It is not allowed to use a raw numpy array, but you can create a RankEval dataset from a numpy array easily (using X, y and query_ids) |
Closer, I'm not able to reload the model. Do I need to worry about how the model was trained?
|
I feel like your problem is related to the open issue #12 I recently discovered. It occurs when XGBoost, after fitting a tree, prunes out some nodes before going on with the boosting phase... I'll try to fix it tomorrow...your code seems to be correct. |
The problem has been solved. The solution is in the develop branch. It will be merged soon in the master. |
I'm able to build/run master, but am not able to run develop:
I just copied the VERSION file over and it worked. I'm now past this problem and the model now loads. |
Could you kindly retry? This bug should already have been fixed in the master, so I merged all the PRs made there on the develop branch as well. Let me know. |
I'm passed this issue, so closing. |
Ma sta robba non funziona! ;-)
I've created an XGBRanker object with the sklearn API and tried to use the rankeval effectiveness analysis. It requires a
score()
function, which makes sense, but I don't see that XGBRanker has one, and I don't know if sklearn requires one. Thoughts?with the following output
The text was updated successfully, but these errors were encountered: