multilabel(機械学習用語)
A multiclass multioutput target where each output is binary.
binary(2値)
陽性: 1
陰性: 0 / -1
表現は dense / sparse 両方ありうる
目的変数について、type_of_target が ‘multilabel-indicator’ を返す
an array of two dimensions with at least two columns, and at most 2 unique values.
multilabel-indicator is more specific but compatible with multiclass-multioutput.
is_multilabel でも判定できる
code: python
>> import numpy as np
>> from sklearn.utils.multiclass import type_of_target
>> type_of_target(np.array(0, 1], [1, 1))
'multilabel-indicator'
>> # クラス1, クラス2, クラス3とすると、サンプル1はクラス2だけ、サンプル2はクラス1,2
>> type_of_target(np.array(-1, 1, -1], [1, 1, -1))
'multilabel-indicator'
preprocessing.MultiLabelBinarizer
as a utility to convert from a list of sets representation to a 2d array or sparse matrix
preprocessing.LabelBinarizer
One-hot encoding a multiclass target with preprocessing.LabelBinarizer turns it into a multilabel problem.
in multilabel classification each possible label corresponds to a binary output.