DESlib icon indicating copy to clipboard operation
DESlib copied to clipboard

Faiss Powered Multi-Label Classification

Open GeorgePearse opened this issue 2 years ago • 2 comments

Do any of the implementations of KNN within this repo extend to the multi-label case? That is to say, usable in the context of multi-object detection from neural network embeddings or similar.

I was particularly hopeful that KNNE might work? But it's not obvious from the relevant literature.

Thanks a lot.

GeorgePearse avatar Oct 06 '21 17:10 GeorgePearse

Hello,

These implementations (Faiss and KNNE) do not support multi-label classification natively. However, it is possible to easily extend them to work in a multi-label classification using scikit-learn meta-estimators which can transform a base classifier into a multi-label estimator (e.g., classifier chains): https://scikit-learn.org/stable/modules/classes.html#module-sklearn.multioutput

I know that KNNE is already compatible with those meta-estimators. For the FaissKNN I just need to add a few lines of code to make it fully compatible with sklearn standards.

Menelau avatar Oct 06 '21 22:10 Menelau

Hi @GeorgePearse

Sorry for the interruption.

Did you manage to perform DS on multi-label datasets?

I think the discussion is also related to my question here.

The issue is with y_val needs to be a 1d array, while target values/labels for multi-label datasets are more than 1 dimension.

jayahm avatar Jun 09 '22 05:06 jayahm