Skip to content

Commit

Permalink
Fine tune logging
Browse files Browse the repository at this point in the history
  • Loading branch information
pbloem committed Nov 10, 2016
1 parent b0e4ad6 commit 8f143a2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/nl/peterbloem/motive/DPlainMotifExtractor.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public DPlainMotifExtractor(

private void run()
{
Global.log().info("Sampling motifs");
if(samples > 10000) Global.log().info("Sampling motifs");
fm = new FrequencyModel<DGraph<L>>();

// * The (overlapping) instances
Expand All @@ -135,12 +135,12 @@ private void run()

// SubgraphGenerator<L> gen = new SubgraphGenerator<L>(data, intGen);

Global.log().info("Start sampling.");
if(samples > 10000) Global.log().info("Start sampling.");
int interval = samples / 20;

for (int i : Series.series(samples))
{
if (i % interval == 0)
if (i % interval == 0 && samples > 10000)
Global.log().info("Samples finished: " + i + " (" + ((i*100)/samples) + "%)");

List<Integer> indices = gen.generate();
Expand All @@ -162,7 +162,7 @@ private void run()
occurrences.get(sub).add(occurrence);
}

Global.log().info("Removing overlapping occurrences.");
if(samples > 10000) Global.log().info("Removing overlapping occurrences.");
// * Remove overlapping occurrences
// (keep the ones with the lowest exdegrees)
FrequencyModel<DGraph<L>> newFm =
Expand Down Expand Up @@ -225,7 +225,7 @@ private void run()
fm = newFm;
occurrences = newOccurrences;

Global.log().info("Finished sampling motifs and removing overlaps.");
if(samples > 10000) Global.log().info("Finished sampling motifs and removing overlaps.");

tokens = new ArrayList<DGraph<L>>(fm.sorted());
}
Expand Down

0 comments on commit 8f143a2

Please sign in to comment.