example module

Evaluate a review graph mining algorithm with the amazon dataset.

example.ALGORITHMS = {}

Dictionary of graph loading functions associated with installed algorithms.


The main function.

example.run(method, loop, threshold, output, param)[source]

Run a given algorithm with the Amazon dataset.

Runs a given algorithm and outputs anomalous scores and summaries after each iteration finishes. The function will ends if a given number of loops ends or the update of one iteration becomes smaller than a given threshold.

Some algorithm requires a set of parameters. For example, feagle requires parameter epsilon. Argument param specifies those parameters, and if you want to set 0.1 to the epsilon, pass epsilon=0.1 via the argument.

  • method – name of algorithm.
  • loop – the number of iteration (default: 20).
  • threshold – threshold to judge an update is negligible (default: 10^-3).
  • output – writable object where the output will be written.
  • param – list of key and value pair which are connected with “=”.