Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions #6

Open
erwanlenagard opened this issue Feb 10, 2022 · 4 comments
Open

Questions #6

erwanlenagard opened this issue Feb 10, 2022 · 4 comments

Comments

@erwanlenagard
Copy link

Hello,

Thank you for sharing you great work. I'd like to have a better understanding of the "fit_transform" function.

How do you intend to use the parameter "image_names" ? For instance, i'd like to classify facebook posts. Does it means that I can pass posts messages with images embeddings to improve topics results ? Can you share any example of code using this parameter ?

Is it possible to return top keywords describing each topic ? As far as I understand your code 'fit_transform' returns only the list of topic predictions.

Thank you very much

@MaartenGr
Copy link
Owner

MaartenGr commented Feb 10, 2022

The parameter image_names are essentially the paths to the images, such as those facebook images, that you intend to cluster. You can then enrich those clusters with textual information, such as the facebook messages. You can do it like this:

from concept import ConceptModel

concept_model = ConceptModel()
concepts = concept_model.fit_transform(paths_to_my_facebook_images, docs=list_of_my_facebook_messages)

Then, you can visualize the top keywords describing each with concept_model.visualize_concepts(). To get the actual keywords, you can access the concepts through concept_model.topics.

I would advise going through the example in the documentation to get a feel of how the application works.

@erwanlenagard
Copy link
Author

Thank you for your explaination. I just don't get the difference between 'images' and 'image_names' parameters in the documentation.

image

@xinli2008
Copy link

hello, @erwanlenagard !
Have you solved the problem of parameter 'images' and 'image_names'? If yes, can you give a code example?
Best

@MaartenGr
Copy link
Owner

Apologies for the very late response! Seems this got lost in my inbox somewhere...

I just don't get the difference between 'images' and 'image_names' parameters in the documentation.

Ah, my apologies, that indeed confuses things! Then my earlier response is not at that accurate. In that response, I was referring to images and not image_names.

The image_names variable actually does not do anything except track some of the image names internally with the intention of extracting representative images for each cluster. In practice, I should have removed that variable as it does not influence the application in any way, and extracting representative images is not yet implemented. For now, you can ignore it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants