How to define quadratic weighted kappa as eval_metric in catboost classifier I am using catboost for a multiclass classification problem. I want to use quadratic weighted kappa as the evaluation metric.

Catboost already has WKappa as an eval_metric but it is linearly weighted variant, not quadratic.

clf = CatBoostClassifier(objective='MultiClass',
eval_metric=q_weighted_kappa(),
learning_rate=0.01,
n_estimators=750,
od_type="Iter",
depth=35,
early_stopping_rounds=500,
random_seed=42,


)

I need help to define the function q_weighted_kappa() that I can use as specified above.
Sklearn kappa has 2 variants: simple and weigthed. It seems WKappa refers to weighted (quadratic) kappa in terms of sklearn, and Kappa - to simple.