SergioFierens / ai4r

Artificial Intelligence for Ruby - A Ruby playground for AI researchers
http://ai4r.rubyforge.org
713 stars 124 forks source link

How to know which items are in which cluster? #33

Open pranny opened 8 years ago

pranny commented 8 years ago

I have a large data set containing urls and some values for each of the urls. Upon clustering, I can see a bunch of clusters along with the data_items, but is there a way to retrieve the original url for a given set of values?

Currently, i have to reverse lookup in the original data structure, and it is not efficient as multiple urls have exact same set of values.

danbernier commented 8 years ago

I was just wondering this same thing. In a toy example, I was able to hack around it by monkey-patching an identifier onto each item, but that's clearly not a great option.

danbernier commented 8 years ago

I think issue #24 represents the same problem:

Is there any way to get the user_ids for each group without looping through and using eval([10,3,0,22]) to find that its in group 1?

Is that what a "class value" is for? Data sets have the last element as the "class value"..

I wasn't able to figure out what "class value" or class_value are, or how to get them out of my data items.