add sample weights function to utils for later usage
This commit is contained in:
parent
f2845e635e
commit
6a47b5f245
4
utils.py
4
utils.py
@ -16,3 +16,7 @@ def get_custom_class_weights(client, server):
|
|||||||
"client": client_class_weight,
|
"client": client_class_weight,
|
||||||
"server": server_class_weight
|
"server": server_class_weight
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def get_custom_sample_weights(client, server):
|
||||||
|
return class_weight.compute_sample_weight("balanced", np.vstack((client, server)).T)
|
||||||
|
Loading…
Reference in New Issue
Block a user