Open vikramsubramanian opened 4 months ago
train
method in the bugbug/model.py
file where the self.le.fit(y)
call is made.y
is being transformed into a 1-dimensional array before being passed to self.le.fit(y)
.y
is a multi-dimensional array with shape (198635, 5), it likely means that it contains multiple labels or features per instance. You need to select the correct label column or flatten the array.y
should only contain one label per instance, modify the code to select the correct column from y
. For example, if y
is a 2D numpy array and the labels are in the first column, you would use y = y[:, 0]
before fitting the label encoder.y
is a list of lists or a 2D array that needs to be flattened, you can use y = np.ravel(y)
to flatten it into a 1D array.y
to be a 1D array, the self.le.fit(y)
call should work without raising a ValueError
.
_Originally posted by in
See also: )