cerebral.features.generate_sample_weights_categorical(samples: DataFrame, class_feature: str, class_weights: list[float]) array[source]

Based on per-class weights, generate per-sample weights.

Parameters:
samples: DataFrame

DataFrame containing data to assign weights to.

class_feature: str

The feature defining the class to which a sample belongs.

class_weights: list[float]

The per-class weightings.


Last update: Feb 09, 2023