Python Forum
Sample weights using XGBClassifier
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sample weights using XGBClassifier
#1
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Why is "weights" in the function header and loop paulgureghian 2 2,471 Jul-16-2018, 10:46 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020