<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Digital Humanities Questions &#38; Answers &#187; Topic: What tools can be used to create topic model network graphs?</title>
		<link>http://digitalhumanities.org/answers/topic/what-tools-can-be-used-to-create-topic-model-network-graphs</link>
		<description>Digital Humanities Questions &amp; Answers &#187; Topic: What tools can be used to create topic model network graphs?</description>
		<language>en-US</language>
		<pubDate>Sun, 26 May 2013 06:57:25 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://digitalhumanities.org/answers/search.php</link>
		</textInput>
		<atom:link href="http://digitalhumanities.org/answers/rss/topic/what-tools-can-be-used-to-create-topic-model-network-graphs" rel="self" type="application/rss+xml" />

		<item>
			 
				<title>Gaet86 on "What tools can be used to create topic model network graphs?"</title>
						<link>http://digitalhumanities.org/answers/topic/what-tools-can-be-used-to-create-topic-model-network-graphs#post-1674</link>
			<pubDate>Mon, 04 Jun 2012 15:21:37 +0000</pubDate>
			<dc:creator>Gaet86</dc:creator>
			<guid isPermaLink="false">1674@http://digitalhumanities.org/answers/</guid>
			<description>&#60;p&#62;Hi boys,&#60;br /&#62;
I have many 'topics model' create with Mallet's library, of this type:&#60;br /&#62;
TOPIC 1&#60;br /&#62;
school 0.3&#60;br /&#62;
teacher 0.2&#60;br /&#62;
science 0.08&#60;br /&#62;
mathematics 0.07&#60;br /&#62;
matter 0.05&#60;br /&#62;
student 0.03&#60;/p&#62;
&#60;p&#62;I want to generate a network, where each topic is a node.&#60;br /&#62;
I tried to use Gephi, but I do not know how to import all topics into csv file.&#60;br /&#62;
I gently ask if you can help.&#60;br /&#62;
Thanks in advance...&#60;/p&#62;
&#60;p&#62;Gaetano
&#60;/p&#62;</description>
		</item>
		<item>
			 
				<title>rjlewis on "What tools can be used to create topic model network graphs?"</title>
						<link>http://digitalhumanities.org/answers/topic/what-tools-can-be-used-to-create-topic-model-network-graphs#post-1626</link>
			<pubDate>Wed, 02 May 2012 14:50:06 +0000</pubDate>
			<dc:creator>rjlewis</dc:creator>
			<guid isPermaLink="false">1626@http://digitalhumanities.org/answers/</guid>
			<description>&#60;p&#62;Do you really mean that you want nodes for documents &#60;em&#62;and topics&#60;/em&#62;, a &#38;lt;dfn&#38;gt;bimodal graph&#38;lt;/dfn&#38;gt;? In that case your graph would have a small number of nodes (the topic nodes) with high centrality. And then thousands of small nodes (the document nodes) with low centrality. If this is the case, how are you calculating the topic weight for a document?&#60;/p&#62;
&#60;p&#62;It seems to make more sense to me to have nodes for just documents, and edges between documents that share a topic; a &#38;lt;dfn&#38;gt;multigraph&#38;lt;/dfn&#38;gt;. Then the greater the number of edges between two nodes, the closer they are in topic. Or alternatively, you could define edge to be a function of the number of topics two documents have in common, which basically amounts to the same thing but alleviates the requirement to be able to represent multigraphs.&#60;/p&#62;
&#60;p&#62;As for tools to visualise this, here's some Perl which creates a GraphML from a list of documents titled A, B, C, D, E, F, G, and H which each cover one or more topics, 1, 2, 3, 4, 5, 6, or 7:&#60;/p&#62;


&#60;div class=&#34;bb_syntax&#34;&#62;&#60;div class=&#34;code&#34;&#62;&#60;pre class=&#34;perl&#34; style=&#34;font-family:monospace;&#34;&#62;&#60;span style=&#34;color: #666666; font-style: italic;&#34;&#62;#!/usr/bin/perl&#60;/span&#62;
&#38;nbsp;
&#60;span style=&#34;color: #000000; font-weight: bold;&#34;&#62;use&#60;/span&#62; strict&#60;span style=&#34;color: #339933;&#34;&#62;;&#60;/span&#62;
&#60;span style=&#34;color: #000000; font-weight: bold;&#34;&#62;use&#60;/span&#62; Graph&#60;span style=&#34;color: #339933;&#34;&#62;::&#60;/span&#62;&#60;span style=&#34;color: #006600;&#34;&#62;Easy&#60;/span&#62;&#60;span style=&#34;color: #339933;&#34;&#62;;&#60;/span&#62;
&#38;nbsp;
&#60;span style=&#34;color: #b1b100;&#34;&#62;my&#60;/span&#62; &#60;span style=&#34;color: #0000ff;&#34;&#62;$graph&#60;/span&#62; &#60;span style=&#34;color: #339933;&#34;&#62;=&#60;/span&#62; Graph&#60;span style=&#34;color: #339933;&#34;&#62;::&#60;/span&#62;&#60;span style=&#34;color: #006600;&#34;&#62;Easy&#60;/span&#62;&#60;span style=&#34;color: #339933;&#34;&#62;-&#38;gt;&#60;/span&#62;&#60;span style=&#34;color: #006600;&#34;&#62;new&#60;/span&#62;&#60;span style=&#34;color: #339933;&#34;&#62;;&#60;/span&#62;
&#60;span style=&#34;color: #b1b100;&#34;&#62;my&#60;/span&#62; &#60;span style=&#34;color: #0000ff;&#34;&#62;$topics&#60;/span&#62; &#60;span style=&#34;color: #339933;&#34;&#62;=&#60;/span&#62; &#60;span style=&#34;color: #009900;&#34;&#62;&#38;#123;&#60;/span&#62;&#60;span style=&#34;color: #009900;&#34;&#62;&#38;#125;&#60;/span&#62;&#60;span style=&#34;color: #339933;&#34;&#62;;&#60;/span&#62;
&#38;nbsp;
&#60;span style=&#34;color: #b1b100;&#34;&#62;for&#60;/span&#62; &#60;span style=&#34;color: #009900;&#34;&#62;&#38;#40;&#60;/span&#62;&#60;span style=&#34;color: #009999;&#34;&#62;&#38;lt;DATA&#38;gt;&#60;/span&#62;&#60;span style=&#34;color: #009900;&#34;&#62;&#38;#41;&#60;/span&#62; &#60;span style=&#34;color: #009900;&#34;&#62;&#38;#123;&#60;/span&#62;
    &#60;span style=&#34;color: #b1b100;&#34;&#62;my&#60;/span&#62; &#60;span style=&#34;color: #009900;&#34;&#62;&#38;#40;&#60;/span&#62;&#60;span style=&#34;color: #0000ff;&#34;&#62;$title&#60;/span&#62;&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62; &#60;span style=&#34;color: #0000ff;&#34;&#62;$topic&#60;/span&#62;&#60;span style=&#34;color: #009900;&#34;&#62;&#38;#41;&#60;/span&#62; &#60;span style=&#34;color: #339933;&#34;&#62;=&#60;/span&#62; &#60;span style=&#34;color: #000066;&#34;&#62;split&#60;/span&#62; &#60;span style=&#34;color: #009966; font-style: italic;&#34;&#62;/,/&#60;/span&#62;&#60;span style=&#34;color: #339933;&#34;&#62;;&#60;/span&#62;
&#38;nbsp;
    &#60;span style=&#34;color: #b1b100;&#34;&#62;my&#60;/span&#62; &#60;span style=&#34;color: #0000ff;&#34;&#62;$document&#60;/span&#62; &#60;span style=&#34;color: #339933;&#34;&#62;=&#60;/span&#62; &#60;span style=&#34;color: #0000ff;&#34;&#62;$graph&#60;/span&#62;&#60;span style=&#34;color: #339933;&#34;&#62;-&#38;gt;&#60;/span&#62;&#60;span style=&#34;color: #006600;&#34;&#62;add_node&#60;/span&#62;&#60;span style=&#34;color: #009900;&#34;&#62;&#38;#40;&#60;/span&#62;&#60;span style=&#34;color: #0000ff;&#34;&#62;$title&#60;/span&#62;&#60;span style=&#34;color: #009900;&#34;&#62;&#38;#41;&#60;/span&#62;&#60;span style=&#34;color: #339933;&#34;&#62;;&#60;/span&#62;
&#38;nbsp;
    &#60;span style=&#34;color: #0000ff;&#34;&#62;$graph&#60;/span&#62;&#60;span style=&#34;color: #339933;&#34;&#62;-&#38;gt;&#60;/span&#62;&#60;span style=&#34;color: #006600;&#34;&#62;add_edge_once&#60;/span&#62;&#60;span style=&#34;color: #009900;&#34;&#62;&#38;#40;&#60;/span&#62;&#60;span style=&#34;color: #0000ff;&#34;&#62;$document&#60;/span&#62;&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62; &#60;span style=&#34;color: #0000ff;&#34;&#62;$_&#60;/span&#62;&#60;span style=&#34;color: #009900;&#34;&#62;&#38;#41;&#60;/span&#62; &#60;span style=&#34;color: #b1b100;&#34;&#62;foreach&#60;/span&#62; &#60;span style=&#34;color: #009900;&#34;&#62;&#38;#40;&#60;/span&#62;&#60;span style=&#34;color: #339933;&#34;&#62;@&#60;/span&#62;&#60;span style=&#34;color: #009900;&#34;&#62;&#38;#123;&#60;/span&#62; &#60;span style=&#34;color: #0000ff;&#34;&#62;$topics&#60;/span&#62;&#60;span style=&#34;color: #339933;&#34;&#62;-&#38;gt;&#60;/span&#62;&#60;span style=&#34;color: #009900;&#34;&#62;&#38;#123;&#60;/span&#62;&#60;span style=&#34;color: #0000ff;&#34;&#62;$topic&#60;/span&#62;&#60;span style=&#34;color: #009900;&#34;&#62;&#38;#125;&#60;/span&#62; &#60;span style=&#34;color: #009900;&#34;&#62;&#38;#125;&#60;/span&#62;&#60;span style=&#34;color: #009900;&#34;&#62;&#38;#41;&#60;/span&#62;&#60;span style=&#34;color: #339933;&#34;&#62;;&#60;/span&#62;
&#38;nbsp;
    &#60;span style=&#34;color: #000066;&#34;&#62;push&#60;/span&#62; &#60;span style=&#34;color: #339933;&#34;&#62;@&#60;/span&#62;&#60;span style=&#34;color: #009900;&#34;&#62;&#38;#123;&#60;/span&#62; &#60;span style=&#34;color: #0000ff;&#34;&#62;$topics&#60;/span&#62;&#60;span style=&#34;color: #339933;&#34;&#62;-&#38;gt;&#60;/span&#62;&#60;span style=&#34;color: #009900;&#34;&#62;&#38;#123;&#60;/span&#62;&#60;span style=&#34;color: #0000ff;&#34;&#62;$topic&#60;/span&#62;&#60;span style=&#34;color: #009900;&#34;&#62;&#38;#125;&#60;/span&#62; &#60;span style=&#34;color: #009900;&#34;&#62;&#38;#125;&#60;/span&#62;&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62; &#60;span style=&#34;color: #0000ff;&#34;&#62;$title&#60;/span&#62;
	&#60;span style=&#34;color: #b1b100;&#34;&#62;or&#60;/span&#62; &#60;span style=&#34;color: #0000ff;&#34;&#62;$topics&#60;/span&#62;&#60;span style=&#34;color: #339933;&#34;&#62;-&#38;gt;&#60;/span&#62;&#60;span style=&#34;color: #009900;&#34;&#62;&#38;#123;&#60;/span&#62;&#60;span style=&#34;color: #0000ff;&#34;&#62;$topic&#60;/span&#62;&#60;span style=&#34;color: #009900;&#34;&#62;&#38;#125;&#60;/span&#62; &#60;span style=&#34;color: #339933;&#34;&#62;=&#60;/span&#62; &#60;span style=&#34;color: #009900;&#34;&#62;&#38;#91;&#60;/span&#62;&#60;span style=&#34;color: #0000ff;&#34;&#62;$title&#60;/span&#62;&#60;span style=&#34;color: #009900;&#34;&#62;&#38;#93;&#60;/span&#62;&#60;span style=&#34;color: #339933;&#34;&#62;;&#60;/span&#62;
&#60;span style=&#34;color: #009900;&#34;&#62;&#38;#125;&#60;/span&#62;
&#38;nbsp;
&#60;span style=&#34;color: #000066;&#34;&#62;print&#60;/span&#62; &#60;span style=&#34;color: #0000ff;&#34;&#62;$graph&#60;/span&#62;&#60;span style=&#34;color: #339933;&#34;&#62;-&#38;gt;&#60;/span&#62;&#60;span style=&#34;color: #006600;&#34;&#62;as_graphml&#60;/span&#62;&#60;span style=&#34;color: #339933;&#34;&#62;;&#60;/span&#62;
&#60;span style=&#34;color: #000000; font-weight: bold;&#34;&#62;__END__&#60;/span&#62;
A&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62;&#60;span style=&#34;color: #cc66cc;&#34;&#62;2&#60;/span&#62;
A&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62;&#60;span style=&#34;color: #cc66cc;&#34;&#62;4&#60;/span&#62;
B&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62;&#60;span style=&#34;color: #cc66cc;&#34;&#62;1&#60;/span&#62;
B&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62;&#60;span style=&#34;color: #cc66cc;&#34;&#62;2&#60;/span&#62;
B&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62;&#60;span style=&#34;color: #cc66cc;&#34;&#62;6&#60;/span&#62;
C&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62;&#60;span style=&#34;color: #cc66cc;&#34;&#62;2&#60;/span&#62;
C&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62;&#60;span style=&#34;color: #cc66cc;&#34;&#62;3&#60;/span&#62;
D&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62;&#60;span style=&#34;color: #cc66cc;&#34;&#62;1&#60;/span&#62;
D&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62;&#60;span style=&#34;color: #cc66cc;&#34;&#62;2&#60;/span&#62;
D&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62;&#60;span style=&#34;color: #cc66cc;&#34;&#62;5&#60;/span&#62;
D&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62;&#60;span style=&#34;color: #cc66cc;&#34;&#62;7&#60;/span&#62;
E&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62;&#60;span style=&#34;color: #cc66cc;&#34;&#62;2&#60;/span&#62;
E&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62;&#60;span style=&#34;color: #cc66cc;&#34;&#62;3&#60;/span&#62;
F&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62;&#60;span style=&#34;color: #cc66cc;&#34;&#62;1&#60;/span&#62;
F&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62;&#60;span style=&#34;color: #cc66cc;&#34;&#62;2&#60;/span&#62;
F&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62;&#60;span style=&#34;color: #cc66cc;&#34;&#62;6&#60;/span&#62;
G&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62;&#60;span style=&#34;color: #cc66cc;&#34;&#62;1&#60;/span&#62;
G&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62;&#60;span style=&#34;color: #cc66cc;&#34;&#62;5&#60;/span&#62;
G&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62;&#60;span style=&#34;color: #cc66cc;&#34;&#62;6&#60;/span&#62;
G&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62;&#60;span style=&#34;color: #cc66cc;&#34;&#62;7&#60;/span&#62;
H&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62;&#60;span style=&#34;color: #cc66cc;&#34;&#62;1&#60;/span&#62;
H&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62;&#60;span style=&#34;color: #cc66cc;&#34;&#62;2&#60;/span&#62;
H&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62;&#60;span style=&#34;color: #cc66cc;&#34;&#62;4&#60;/span&#62;
H&#60;span style=&#34;color: #339933;&#34;&#62;,&#60;/span&#62;&#60;span style=&#34;color: #cc66cc;&#34;&#62;7&#60;/span&#62;&#60;/pre&#62;&#60;/div&#62;&#60;/div&#62;



&#60;p&#62;I tried importing the output of this in Gephi and it looked basically correct.&#60;/p&#62;
&#60;p&#62;By the way, when you say &#34;topic model&#34;, are your topics just keywords? Or are you talking about vectors of word frequencies?
&#60;/p&#62;</description>
		</item>
		<item>
			 
				<title>Lisa Rhody on "What tools can be used to create topic model network graphs?"</title>
						<link>http://digitalhumanities.org/answers/topic/what-tools-can-be-used-to-create-topic-model-network-graphs#post-1625</link>
			<pubDate>Wed, 02 May 2012 14:47:21 +0000</pubDate>
			<dc:creator>Lisa Rhody</dc:creator>
			<guid isPermaLink="false">1625@http://digitalhumanities.org/answers/</guid>
			<description>&#60;p&#62;Shawn,&#60;br /&#62;
Yes! That's what I was looking for.  I'm sorry that I somehow missed it on your blog, but I'm grateful that you took the time to explain it here.  For some reason I couldn't wrap my head around how the .csv file needed to be formatted to get it the way I wanted it in Gephi.  I haven't tried it yet, but I'm about to.  Thank you for the generous reply!&#60;br /&#62;
-Lisa
&#60;/p&#62;</description>
		</item>
		<item>
			 
				<title>Shawn on "What tools can be used to create topic model network graphs?"</title>
						<link>http://digitalhumanities.org/answers/topic/what-tools-can-be-used-to-create-topic-model-network-graphs#post-1623</link>
			<pubDate>Wed, 02 May 2012 14:15:54 +0000</pubDate>
			<dc:creator>Shawn</dc:creator>
			<guid isPermaLink="false">1623@http://digitalhumanities.org/answers/</guid>
			<description>&#60;p&#62;Hi Lisa,&#60;/p&#62;
&#60;p&#62;I've written about this sort of thing on my blog a few times - &#60;a href=&#34;http://electricarchaeologist.wordpress.com/&#34; rel=&#34;nofollow&#34;&#62;http://electricarchaeologist.wordpress.com/&#60;/a&#62; &#60;/p&#62;
&#60;p&#62;Take your topic modeling composition data. Create a spreadsheet where you have three columns, source, target, and weight. Put your docs and topics under source and target as appropriate, and then the percentage composition under weight. Save as a csv file.&#60;/p&#62;
&#60;p&#62;Then, in Gephi, create a new project. Click on 'data laboratory'. Click on 'edges' under 'data table'. Click 'import spreadsheet'. Navigate to your csv file. Make sure the 'as table' is set to edges table. click next, click finish.&#60;/p&#62;
&#60;p&#62;Then, go back to the 'overview' pane, and down the left hand side under layout you can select different algorithms that'll take the edge weight into account. &#60;/p&#62;
&#60;p&#62;...is that the kind of thing you had in mind? You can also include a 'type' column in your csv file, with 'directed' or 'undirected' as appropriate.
&#60;/p&#62;</description>
		</item>
		<item>
			 
				<title>Lisa Rhody on "What tools can be used to create topic model network graphs?"</title>
						<link>http://digitalhumanities.org/answers/topic/what-tools-can-be-used-to-create-topic-model-network-graphs#post-1622</link>
			<pubDate>Wed, 02 May 2012 14:02:41 +0000</pubDate>
			<dc:creator>Lisa Rhody</dc:creator>
			<guid isPermaLink="false">1622@http://digitalhumanities.org/answers/</guid>
			<description>&#60;p&#62;&#60;em&#62;Replying to @&#60;a href='http://digitalhumanities.org/answers/profile/parezcoydigo'&#62;parezcoydigo&#60;/a&#62;'s &#60;a href=&#34;http://digitalhumanities.org/answers/topic/what-tools-can-be-used-to-create-topic-model-network-graphs#post-1621&#34;&#62;post&#60;/a&#62;:&#60;/em&#62;&#60;/p&#62;
&#60;p&#62;That tool looks fantastic because of its flexibility and because it can be worked right into the running of the model.  Unfortunately, at this point I don't have the Python scripting ability to really use it right away.  Do you know of something with a GUI interface with the same flexibility?
&#60;/p&#62;</description>
		</item>
		<item>
			 
				<title>parezcoydigo on "What tools can be used to create topic model network graphs?"</title>
						<link>http://digitalhumanities.org/answers/topic/what-tools-can-be-used-to-create-topic-model-network-graphs#post-1621</link>
			<pubDate>Wed, 02 May 2012 12:59:20 +0000</pubDate>
			<dc:creator>parezcoydigo</dc:creator>
			<guid isPermaLink="false">1621@http://digitalhumanities.org/answers/</guid>
			<description>&#60;p&#62;I think you could do this with &#60;a href=&#34;http://networkx.lanl.gov/&#34;&#62;networkx&#60;/a&#62;? As you run the topic model, you can build the graph directly with weighted edges, or any other number of &#60;a href=&#34;http://networkx.lanl.gov/tutorial/tutorial.html#edge-attributes&#34;&#62;edge attributes&#60;/a&#62;.
&#60;/p&#62;</description>
		</item>
		<item>
			 
				<title>Lisa Rhody on "What tools can be used to create topic model network graphs?"</title>
						<link>http://digitalhumanities.org/answers/topic/what-tools-can-be-used-to-create-topic-model-network-graphs#post-1620</link>
			<pubDate>Wed, 02 May 2012 12:42:48 +0000</pubDate>
			<dc:creator>Lisa Rhody</dc:creator>
			<guid isPermaLink="false">1620@http://digitalhumanities.org/answers/</guid>
			<description>&#60;p&#62;I'm looking for a tool that can generate a network graph that creates nodes for documents and topics where the edge pull is determined by topic weight.  In other words, if I have a topic model of 40 topics run on a dataset of several thousand documents, I want to be able to display how strongly each document is pulled toward each topic in the network.  I've seen it done in several instances, but I'm wondering what tools people are using to do this and to what degree of satisfaction... I've tried SNA visualization tools (Gephi, NodeXL, and yEd), but those generally require that the edge weight be internally computed.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
