简体   繁体   中英

Jung VoltageScorer - Which vertices to use as 'sources' & 'sinks'?

I would like to evaluate the Voltage Scores of a Graphs' Vertices in Jung using VoltageScorer. ( http://jung.sourceforge.net/doc/api/edu/uci/ics/jung/algorithms/scoring/VoltageScorer.html )

The problem I encounter is that to do so I have to provide 'source' and 'sink' Vertices, but do not know which vertices I am supposed to use as 'sources' and which as 'sinks'.

One of the Constructor Summary in the Documentation is:

VoltageScorer(Hypergraph<V,E> g, Collection<V> sources, Collection<V> sinks) 
          Creates an instance with the specified graph, source vertices 
                           (each of whose 'voltages' are tied to 1), and sinks.

Can someone provide an explanation of how to determine which vertices are ought to be used as 'sources' and which as 'sinks'?

Thank you for your time.

This is not a question which can be answered a priori ; as with most questions of the form "which algorithm/approach should I use?", the answer is "it depends".

For some social network data sets, there are clear choices for which vertices to use as 'sources' and which as 'sinks'.

For others, there may be no such obvious distinctions. In which case, it may not be appropriate to use this algorithm.

One option in the latter case is to run the algorithm a number of times with random choices of sources and sinks, and give each vertex a score which is based on the aggregate scores from each run.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM