Toolkit for bias estimation in unbiased learning to rank
Project description
Personal toolkit for bias estimation in unbiased learning to rank
Installation
pip install ultr-bias-toolkit
Offline bias estimation methods
We implement multiple offline position bias estimation methods, including three intervention harvesting approaches:
from ultr_bias_toolkit.bias.naive import NaiveCtrEstimator
from ultr_bias_toolkit.bias.intervention_harvesting import PivotEstimator, AdjacentChainEstimator, AllPairsEstimator
estimators = {
"CTR Rate": NaiveCtrEstimator(),
"Pivot One": PivotEstimator(pivot_rank=1),
"Adjacent Chain": AdjacentChainEstimator(),
"Global All Pairs": AllPairsEstimator(),
}
examination_dfs = []
for name, estimator in estimators.items():
examination_df = estimator(df)
examination_df["estimator"] = name
examination_dfs.append(examination_df)
examination_df = pd.concat(examination_dfs)
examination_df.head()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for ultr_bias_toolkit-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e37b8c6d8bf12571be7ab29148ce85974ce0511044289ec846092299cdd9f19 |
|
MD5 | 3829025eec475aa275dddcdb7014e76f |
|
BLAKE2b-256 | de894569529c050f693cafb27750e0d060d0ddd6b88e735af816342c94296ff1 |