BulletinMachine now has two more parameters, sk_prim_class_weight and sk_class_weight. These are used to set the class_weight parameter on sklearn models. Since the exact configuration of the model outputs change depending on the data, this has to be generated internally.
sk_prim_class_weight is used for the model calculating the danger_level, emergency_warning, problem_1 etc. sk_class_weight is applied to the "CLASS" models on the subproblem, i.e. things like cause and dsize.
Each parameter defaults to None. "balanced" and "balanced_subsample" is passed directly to the model.
However, to fine-tune the weights, a dict can be sent. If we specifically want to change the weight of danger level 4, send a dict as {"danger_level": {'4': {0: 2, 1: 2}}} to sk_prim_class_weight. This way, each weight can be changed individually.
Resolves #7.
BulletinMachine now has two more parameters,
sk_prim_class_weight
andsk_class_weight
. These are used to set theclass_weight
parameter on sklearn models. Since the exact configuration of the model outputs change depending on the data, this has to be generated internally.sk_prim_class_weight
is used for the model calculating thedanger_level
,emergency_warning
,problem_1
etc.sk_class_weight
is applied to the "CLASS" models on the subproblem, i.e. things likecause
anddsize
.Each parameter defaults to
None
."balanced"
and"balanced_subsample"
is passed directly to the model.However, to fine-tune the weights, a dict can be sent. If we specifically want to change the weight of danger level 4, send a dict as
{"danger_level": {'4': {0: 2, 1: 2}}}
tosk_prim_class_weight
. This way, each weight can be changed individually.