A library that identifies subgraphs or motifs in a large graph
dotmotif
DotMotif is a library that identifies subgraphs or motifs in a large graph. It looks like this:
# Look for all motifs of the form,
# Neuron A excites B:
A -> B [type = "excitatory"]
# ...and B inhibits C:
B -> C [type = "inhibitory"]
Or like this:
TwitterInfluencer(person) {
# An influencer has more than a million
# followers and is verified.
person.followers > 1000000
person.verified = true
}
InfluencerAwkward(person1, person2) {
# Two people who are both influencers...
TwitterInfluencer(person1)
TwitterInfluencer(person2)
# ...where one follows the other, but...
person1 -> person2
# ...the other doesn't follow back
person2 !> person1
}
# Search for all awkward twitter influencer
# relationships in the dataset:
InfluencerAwkward(X, Y)
To