Python Forum
Sample weights using XGBClassifier - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Sample weights using XGBClassifier (/thread-9570.html)



Sample weights using XGBClassifier - MagnusOlsen - Apr-16-2018

Hi, totally new here (and quite new in the kingdom of ML) and this is my first question;

I am using XGBClassifier (latest version) in python training a dataset where the observations (should) have different weights. More specifically in am trying modelling the probability for an insurance policy to have a claim. The insurance policies may be on risk (have insurance cover) for different durations e.g. 1 month, 6 month 1 year creating the need to weight them according to how long they are on risk.

Is it possible to pass this (N*1) vectors which sums up to 1 to the XGBClassifier? If so, is the implication of this that obs. with weights are more likely to be picked by the sampling algo?

Hope somebody can enlighten me. Please let me know if I need to clarify something.

Best,

Magnus