I've been playing around with RankLib for a few days. I've observed that RankLib can train a model to optimise rankings in the input file and use that model to produce new scores for resources based on the various training models supported in the app.
I have a slightly different use case in that I want to be able to extract the weightings from the trained models and apply them inside a proprietary search engine to my features. I'm not sure how to do this despite debugging through the RankLib code - for example looking at ListNet the model appears to provide the inputs for a Neural Net with a cumulative variable wsum computed and the sigmoid function applied to the end result to obtain a score.
Any help in pointing me in the right direction would be appreciated.
Thanks,
Chris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
ListNet uses a combination of gradient descent listwise loss function and a simple neural net. The net used is just a linear one, i.e. inputs corresponding to the number of features and their weights only. No hidden layers.
Since output models are text files, you can just read the weights for the inputs from the file. The numbers represent the input feature layer (layer 0) and the weights corresponding to each feature.
Your application only needs to be able to instantiate a very simple neural net with inputs corresponding to your feature count, and the assignment of the weights.
You can use the RankLib Evaluator to load a saved model, then run new ranked lists to output scores and new rankings. Add a query relevance file and you can evaluate how the model did on new data. You might want to make use of this facility before transfering saved model information to your application.
Transfer function used is sigmoid/logistic [1/(1+exp(-x)].
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I've been playing around with RankLib for a few days. I've observed that RankLib can train a model to optimise rankings in the input file and use that model to produce new scores for resources based on the various training models supported in the app.
I have a slightly different use case in that I want to be able to extract the weightings from the trained models and apply them inside a proprietary search engine to my features. I'm not sure how to do this despite debugging through the RankLib code - for example looking at ListNet the model appears to provide the inputs for a Neural Net with a cumulative variable wsum computed and the sigmoid function applied to the end result to obtain a score.
Any help in pointing me in the right direction would be appreciated.
Thanks,
Chris
ListNet uses a combination of gradient descent listwise loss function and a simple neural net. The net used is just a linear one, i.e. inputs corresponding to the number of features and their weights only. No hidden layers.
Since output models are text files, you can just read the weights for the inputs from the file. The numbers represent the input feature layer (layer 0) and the weights corresponding to each feature.
Your application only needs to be able to instantiate a very simple neural net with inputs corresponding to your feature count, and the assignment of the weights.
You can use the RankLib Evaluator to load a saved model, then run new ranked lists to output scores and new rankings. Add a query relevance file and you can evaluate how the model did on new data. You might want to make use of this facility before transfering saved model information to your application.
Transfer function used is sigmoid/logistic [1/(1+exp(-x)].