ranking
ranking copied to clipboard
LibSVM & Keras Example
I would appreciate a lot if an example using TensorFlow Ranking Keras API that loads data in LibSVM format, and that it loads them in batches instead of in memory, is added to this library
LibSVM example with TensorFlow Ranking (no Keras and loads in memory): https://github.com/tensorflow/ranking/blob/master/tensorflow_ranking/examples/tf_ranking_libsvm.py
Resource: LibSVM & Keras https://www.alibabacloud.com/blog/dnn-training-for-libsvm-formatted-data---from-keras-to-estimator_595415
For LibSVM datasets, we now recommend using the tensorflow_datasets
(TFDS) package. It already has a few standard LTR datasets that are in LibSVM format, most notably MSLR-WEB30K and Istella, see:
- https://www.tensorflow.org/datasets/catalog/istella
- https://www.tensorflow.org/datasets/catalog/mslrweb
The exact LibSVM parser is implemented here and can possibly be extended for your specific use-case. To see how to add custom datasets to TFDS you can refer to https://www.tensorflow.org/datasets/add_dataset.