diff options
author | Maurice Laveaux <m.laveaux@student.tue.nl> | 2014-05-22 16:33:24 +0200 |
---|---|---|
committer | Maurice Laveaux <m.laveaux@student.tue.nl> | 2014-05-22 16:33:24 +0200 |
commit | 4f32eedd2bd49837cc297acce399c108e8b558a7 (patch) | |
tree | e80ceb3fdf38db9552b52bd7f0c6b209c6c4bc28 /src/Chapter4/centrality/examples | |
parent | 1da00321db0aa8c412c3ff1dff5734962ee49240 (diff) | |
download | TwitterDataAnalytics-4f32eedd2bd49837cc297acce399c108e8b558a7.tar.gz |
Removed unused source files
* Removed the shitty examples.
Diffstat (limited to 'src/Chapter4/centrality/examples')
4 files changed, 0 insertions, 136 deletions
diff --git a/src/Chapter4/centrality/examples/BetweennessCentralityExample.java b/src/Chapter4/centrality/examples/BetweennessCentralityExample.java deleted file mode 100644 index ab9f7e6..0000000 --- a/src/Chapter4/centrality/examples/BetweennessCentralityExample.java +++ /dev/null @@ -1,31 +0,0 @@ -package centrality.examples; - -import Chapter4.util.TweetFileToGraph; -import java.io.File; -import GraphElements.RetweetEdge; -import GraphElements.UserNode; -import edu.uci.ics.jung.algorithms.importance.BetweennessCentrality; -import edu.uci.ics.jung.graph.DirectedGraph; - -public class BetweennessCentralityExample { - public static void main(String[] args){ - - File tweetFile; - - if(args.length > 0){ - tweetFile = new File(args[0]); - } - else{ - tweetFile = new File("synthetic_retweet_network.json"); - } - - DirectedGraph<UserNode, RetweetEdge> retweetGraph = TweetFileToGraph.getRetweetNetwork(tweetFile); - - //calculate the betweenness centrality - BetweennessCentrality<UserNode, RetweetEdge> betweenness = new BetweennessCentrality<UserNode, RetweetEdge>(retweetGraph); - - betweenness.evaluate(); - betweenness.printRankings(true, true); - - } -} diff --git a/src/Chapter4/centrality/examples/EigenvectorCentralityExample.java b/src/Chapter4/centrality/examples/EigenvectorCentralityExample.java deleted file mode 100644 index 172dd16..0000000 --- a/src/Chapter4/centrality/examples/EigenvectorCentralityExample.java +++ /dev/null @@ -1,36 +0,0 @@ -package centrality.examples; - -import Chapter4.util.TweetFileToGraph; -import java.io.File; -import GraphElements.RetweetEdge; -import GraphElements.UserNode; -import edu.uci.ics.jung.algorithms.scoring.EigenvectorCentrality; -import edu.uci.ics.jung.graph.DirectedGraph; - -public class EigenvectorCentralityExample { - public static void main(String[] args){ - - File tweetFile; - - if(args.length > 0){ - tweetFile = new File(args[0]); - } - else{ - tweetFile = new File("synthetic_retweet_network.json"); - } - - DirectedGraph<UserNode, RetweetEdge> retweetGraph = TweetFileToGraph.getRetweetNetwork(tweetFile); - -// EigenVectorScorer scorer = new EigenVectorScorer(retweetGraph); -// for(UserNode node : retweetGraph.getVertices()){ -// System.out.println(node + " - " + scorer.getVertexScore(node)); -// } - - EigenvectorCentrality<UserNode, RetweetEdge> eig = new EigenvectorCentrality<UserNode, RetweetEdge>(retweetGraph); - eig.evaluate(); - - for(UserNode node : retweetGraph.getVertices()){ - System.out.println(node + " - " + eig.getVertexScore(node)); - } - } -} diff --git a/src/Chapter4/centrality/examples/InDegreeCentralityExample.java b/src/Chapter4/centrality/examples/InDegreeCentralityExample.java deleted file mode 100644 index 6a027ac..0000000 --- a/src/Chapter4/centrality/examples/InDegreeCentralityExample.java +++ /dev/null @@ -1,30 +0,0 @@ -package Chapter4.centrality.examples; - -import Chapter4.util.TweetFileToGraph; -import java.io.File; -import GraphElements.RetweetEdge; -import GraphElements.UserNode; -import edu.uci.ics.jung.graph.DirectedGraph; - -public class InDegreeCentralityExample { - - public static void main(String[] args){ - - File tweetFile; - - if(args.length > 0){ - tweetFile = new File(args[0]); - } - else{ - tweetFile = new File("synthetic_retweet_network.json"); - } - - DirectedGraph<UserNode, RetweetEdge> retweetGraph = TweetFileToGraph.getRetweetNetwork(tweetFile); - - //calculate the betweenness centrality - for(UserNode node : retweetGraph.getVertices()){ - System.out.println(node + " - " + retweetGraph.getInEdges(node).size()); - } - - } -} diff --git a/src/Chapter4/centrality/examples/PageRankCentralityExample.java b/src/Chapter4/centrality/examples/PageRankCentralityExample.java deleted file mode 100644 index dd44efd..0000000 --- a/src/Chapter4/centrality/examples/PageRankCentralityExample.java +++ /dev/null @@ -1,39 +0,0 @@ -package Chapter4.centrality.examples; - -import Chapter4.util.TweetFileToGraph; -import java.io.File; -import GraphElements.RetweetEdge; -import GraphElements.UserNode; -import edu.uci.ics.jung.algorithms.scoring.PageRank; -import edu.uci.ics.jung.graph.DirectedGraph; - -public class PageRankCentralityExample { - public static void main(String[] args){ - - File tweetFile; - - if(args.length > 0){ - tweetFile = new File(args[0]); - } - else{ - tweetFile = new File("synthetic_retweet_network.json"); - } - - DirectedGraph<UserNode, RetweetEdge> retweetGraph = TweetFileToGraph.getRetweetNetwork(tweetFile); - - - PageRank<UserNode, RetweetEdge> pageRank = new PageRank<UserNode, RetweetEdge>(retweetGraph, .5); - pageRank.evaluate(); - - for(UserNode node : retweetGraph.getVertices()){ - System.out.println(node + " - " + pageRank.getVertexScore(node)); - } - -// EigenvectorCentrality<UserNode, RetweetEdge> eig = new EigenvectorCentrality<UserNode, RetweetEdge>(retweetGraph); -// eig.evaluate(); -// -// for(UserNode node : retweetGraph.getVertices()){ -// System.out.println(node + " - " + eig.getVertexScore(node)); -// } - } -} |