Codes has two parts:
1.Context-awared Propensity Estimation
2.Context-awared IPW rank-SVM
This job connects with paper 'Unbiased Learning to Rank in Feeds Recommendation', which is accepted by WSDM 2021.
We share our codes here for others repetition.