immuneML.ml_methods.util package¶
Submodules¶
immuneML.ml_methods.util.Util module¶
-
class
immuneML.ml_methods.util.Util.
Util
[source]¶ Bases:
object
-
static
binarize_labels
(true_y, predicted_y, labels)[source]¶ Binarizes the predictions in place using scikit-learn’s label_binarize() method
-
static
make_binary_class_mapping
(y) → dict[source]¶ Creates binary class mapping from a list of classes which can be strings, numbers or boolean values
- Parameters
y – list of classes per example, as supplied to fit() method of the classifier; it should include all classes that will appear in the data
- Returns
mapping dictionary where 0 and 1 are always the keys and the values are original class names which were mapped for these values
-
static