Question 8
Given the following information, what will be the output of the code snippet?
- continuous: is an array-like of floats that are not all integers, and is 1D or a column vector.
- continuous-multioutput: is a 2D array of floats that are not all integers, and both dimensions are of size .
- binary: contains discrete values and is 1D or a column vector.
- multiclass: contains more than two discrete values, is not a sequence of sequences, and is 1D or a column vector.
- multiclass-multioutput: is a 2D array that contains more than two discrete values, is not a sequence of sequences, and both dimensions are of size .
- multilabel-indicator: is a label indicator matrix, an array of two dimensions with at least two columns, and at most 2 unique values.
- unknown: is array-like but none of the above, such as a 3D array, sequence of sequences, or an array of non-sequence objects.
from sklearn.utils.multiclass import type_of_targetimport numpy as np
print(type_of_target(['a', 'b', 'a']))print(type_of_target(np.array([['horror','fantasy'], ['adventure','fantasy'], ['adventure','fantasy']])))print(type_of_target(np.array([[1.5, 2.0], [3.0, 1.6]])))print(type_of_target(np.array([[0, 1], [1, 1]])))