You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When labels are hierarchical and represented as a list of lists and all inner lists don't have equal length, numpy array constructor gives the following error
setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (1781,) + inhomogeneous part.
This happens in HierarchicalClassifier.py at line 164.
Seeing the line at 171, where you are leveling the labels, I wonder if it should be done before converting to numpy array.
For Sample data, where Y_train_modifed = [['a'], ['b', 'c']]
This code gives the above error. lcppn2 = LocalClassifierPerParentNode(local_classifier=model, verbose=1, bert=True) lcppn2.fit(X_train, Y_train_modified)
hi-class version: 4.12.1
numpy version: 1.26.4
The text was updated successfully, but these errors were encountered:
Thank you for reporting this issue. I believe I fixed it in PR #138, but please let me know if the issue persists in the new version 4.13.1, which will be released shortly.
When labels are hierarchical and represented as a list of lists and all inner lists don't have equal length, numpy array constructor gives the following error
This happens in HierarchicalClassifier.py at line 164.
Seeing the line at 171, where you are leveling the labels, I wonder if it should be done before converting to numpy array.
For Sample data, where
Y_train_modifed = [['a'], ['b', 'c']]
This code gives the above error.
lcppn2 = LocalClassifierPerParentNode(local_classifier=model, verbose=1, bert=True) lcppn2.fit(X_train, Y_train_modified)
hi-class version: 4.12.1
numpy version: 1.26.4
The text was updated successfully, but these errors were encountered: