PreferredAI / cornac

A Comparative Framework for Multimodal Recommender Systems
https://cornac.preferred.ai
Apache License 2.0
845 stars 138 forks source link

[FEATURE] Support for multiple generic FeatureModalities for items #592

Open angelogeninatti opened 5 months ago

angelogeninatti commented 5 months ago

Description

In my use case, I need to incorporate multiple modalities inside my data, including Audio and Video. As of right now, the only way I found to incorporate them both is to concatenate them in a single FeatureModality object, which is not ideal. It would be best to be able to use a list of FeatureModality objects.

Expected behavior with the suggested feature

As of right now, the only way to do it is: item_embeddings = FeatureModality(features=[Concatenated Modalities], ids=...) ratio_split = RatioSplit( data=dataset, test_size=0.1, item_feature=item_embeddings )

It would be best to have something like: item_embeddings = [FeatureModality(features=Modality 1, ids=...), FeatureModality(features=Modality 2, ids=...)] ratio_split = RatioSplit( data=dataset, test_size=0.1, item_feature_list=item_embeddings )

Other Comments

None

tqtg commented 5 months ago

This is very interesting use case. What we should do is to add more modalities (e.g., Audio) into our framework similarly to others, instead of concatenate different modalities into one. By default, any modality should extend from and behave like a FeatureModality.