Clustering using Mathematica

I’ve got a two column table (Fields, Methods) and I’d like to find which Methods relates to many Fields.
Can I accomplish this task using Mathematica?

This are the sample data.




Use Tally[]..
– Feyre
Jul 21 at 15:39



@Feyre: mmm… I look for something more similart to data mining I guess.
– Revious
Jul 22 at 14:02


1 Answer


I’m not fully sure what you’re asking for, but do these ideas help?

data = Import[“”, “Data”][[1, 2]];

#[[1, 2]] -> #[[All, 1]] & /@ GatherBy[data, Last]

“DrawOdds_Main(PrintPageEventArgs,Boolean)” ->
{“_drawMarkets”, “_lastPrintedSport”, “_noPrint”, “_pageHeight”,
“_pageIndex”, “_pageWidth”, “_personalTemplate”,
“_previousPrintingStatus”, “_printingStatus”, “_printRows”,
“_rowIndex”, “_sportIndex”, “_sports”, “_tournamentPrintingData”,
“AltreCondizioniDiStampa(List,List,Int32,PrintRowOrder)” ->
{“_rowIndex”, “_tournamentPrintingData”},
“Init(List,Dictionary)” ->
{“Settings”, “_printDialog”, “_printDocument”,
“_personalTemplate”, “_sports”, “_printRows”},
“InitPrinter()” ->
{“_printDocument”, “_pageHeight”, “_pageWidth”, “_personalTemplate”},
“InizializzaMisureTemplate(PersonalTemplate)” ->
“Print(Int32)” ->
{“_printDialog”, “_printDocument”, “_printerSettingsToPage”, “_printerSettingsFromPage”},
“PrintPreview()” ->
{“_printerSettingsToPage”, “_printerSettingsFromPage”, “_pageIndex”,
“_pageHeight”, “_pageWidth”},
“Reset()” ->
{“_rowIndex”, “_sportIndex”, “_noPrint”, “_drawMarkets”},
“UpdateNextPageParam(PrintPageEventArgs)” ->
{“_printerSettingsToPage”, “_printerSettingsFromPage”,
“_pageIndex”, “_noPrint”, “_drawMarkets”},
“UpdatePrintingStatus(AggregateSport,List)” ->
{“_rowIndex”, “_tournamentPrintingData”, “_lastPrintedSport”,
“_printingStatus”, “_previousPrintingStatus”}

Alternatively you could use GroupBy[data, Last].

Or maybe you’re wanting to visualize it as a network?

Graph[DirectedEdge @@@ Reverse /@ data, VertexLabels -> Placed[“Name”, Tooltip]]