ranking icon indicating copy to clipboard operation
ranking copied to clipboard

Add shuffling to examples in example features

Open johnvorsten opened this issue 6 years ago • 2 comments

Example_features are made of tensors of shape (batch_size, list_size, feature_space). If examples are passed in a predictable order (ex. ranked from most relevant to least relevant) the model might not generalize well. Add 'shuffle_peritem':True to the Estimator's params to shuffle example features and labels along list_size.

For example, when creating the estimator add the key:value pair 'shuffle_peritem':True

ranker = tf.estimator.Estimator(
    model_fn=model_fn,
    model_dir=_MODEL_DIR,
    config=run_config,
    params={'shuffle_peritem':True})

johnvorsten avatar Nov 16 '19 19:11 johnvorsten

Do you see any difference in practice?

eggie5 avatar Feb 25 '20 00:02 eggie5

I did not see a difference in practice over my original dataset. However I’m not sure there was any relationship between my input features and my target ranking in the first place.

johnvorsten avatar Feb 25 '20 14:02 johnvorsten