Skip to content

Commit de99c20

Browse files
committed
added tuto similarity computer
1 parent 1696beb commit de99c20

32 files changed

Lines changed: 433 additions & 268 deletions

docs/index.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,14 @@ <h3>English</h3>
133133
<a href="generated-pdf/semantic-web-importer-en.pdf">pdf</a>,
134134
<a href="https://github.com/seinecle/gephi-tutorials/blob/master/src/main/asciidoc/en/plugins/semantic-web-importer-en.adoc">source</a>)
135135
</li>
136+
<li>
137+
A plugin to create a network from a data table in Excel or csv (
138+
<a href="generated-html/similarity-computer-en.html">web</a>,
139+
<a href="generated-slides/similarity-computer-en.html">slides</a>,
140+
<a href="generated-pdf/similarity-computer-en.pdf">pdf</a>,
141+
<a href="https://github.com/seinecle/gephi-tutorials/blob/master/src/main/asciidoc/en/plugins/similarity-computer-en.adoc">source</a>)
142+
</li>
143+
136144
</ul>
137145
</li>
138146

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<version>1.0</version>
99
<packaging>jar</packaging>
1010
<properties>
11-
<!--<doc>en/plugins/semantic-web-importer-en.adoc</doc>-->
11+
<doc>en/plugins/similarity-computer-en.adoc</doc>
1212
<medium.publish>false</medium.publish>
1313
</properties>
1414
<parent>

src/main/asciidoc/en/plugins/k-partite-bi-partite-graph-en.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ When it’s installed, you should be able to see or display the ** Multimode Net
151151

152152
//ST: !
153153

154-
Then, load the graph and :
154+
Then, load the graph and:
155155

156156
* Click on **Load Attributes** and select **Type** on **Attribute Type.**
157157
* For left matrix select **Administrator – Company** and right matrix **Company – Adminstrator**

src/main/asciidoc/en/plugins/semantic-web-importer-en.adoc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Plugin Author: https://github.com/ErwanDemairy[Erwan Demairy]
3232

3333
Plugin sources: https://scm.gforge.inria.fr/anonscm/git/segviz-public/gephi-plugins.git/[git://scm.gforge.inria.fr/segviz-public/gephi-plugins.git]
3434

35-
Licensed under: Cecill-C
35+
Licensed under: http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html[Cecill-C]
3636

3737

3838
//ST: Introduction
@@ -100,7 +100,9 @@ image::en/semantic-web-importer/setup_1.png[align="center", title="Setup endpoin
100100
//ST: !
101101

102102
Go to *Query* tab, remove the dummy query and put this one:
103-
```
103+
104+
[source,SQL]
105+
----
104106
CONSTRUCT{
105107
?person <http://gephi.org/type> "person".
106108
?movie <http://gephi.org/type> "movie".
@@ -113,7 +115,8 @@ WHERE
113115
?movie ?rel2 ?person.
114116
?person a <http://dbpedia.org/ontology/Person>.
115117
}
116-
```
118+
----
119+
117120
//ST: !
118121

119122
Finally, click on *Run*
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
= Creating a network from a table of entities and their attributes
2+
Clément Levallois <clementlevallois@gmail.com>
3+
2017-02-22
4+
5+
last modified: {docdate}
6+
7+
:icons: font
8+
:iconsfont: font-awesome
9+
:revnumber: 1.0
10+
:example-caption!:
11+
ifndef::imagesdir[:imagesdir: ../../images]
12+
ifndef::sourcedir[:sourcedir: ../../../../main/java]
13+
14+
:title-logo-image: gephi-logo-2010-transparent.png[width="450" align="center"]
15+
16+
image::gephi-logo-2010-transparent.png[width="450" align="center"]
17+
18+
//ST: 'Escape' or 'o' to see all sides, F11 for full screen, 's' for speaker notes
19+
20+
21+
== Presentation of the plugin
22+
//ST: Presentation of the plugin
23+
24+
//ST: !
25+
26+
This plugin is created by https://www.clementlevallois.net[Clement Levallois].
27+
28+
It converts a spreadsheet or a csv file into a network.
29+
30+
//ST: !
31+
32+
This plugin enables you to:
33+
34+
* Start from a data table in Excel or csv format
35+
* In the data table, nodes are the entities listed in column A
36+
* Nodes' attributes must be listed in columns B, C, D, etc.
37+
* Connections will be created between nodes, when they have identical attributes.
38+
* Attributes can have values, stored in columns right next to the attribute.
39+
40+
//ST: !
41+
==== 1. The input
42+
//ST: !
43+
44+
image::https://docs.google.com/drawings/d/1TkShesrj6PsObLdj3fCMLScxTXJgopxTEICPv8CPd4Y/pub?w=840&h=887[align="center", title="An Excel file"]
45+
46+
47+
//ST: !
48+
==== 2. The output
49+
//ST: !
50+
51+
image::en/similarity-computer/result.png[align="center", title="Resulting network"]
52+
53+
== Installing the plugin
54+
//ST: Installing the plugin
55+
//ST: !
56+
57+
image::https://docs.google.com/drawings/d/1dgcXEC-nrQQtLvEtSLCrzKXfAdi2Hy1jCslyf2ky20A/pub?w=956&h=530[align="center", title="Choose the menu Tools then Plugins"]
58+
59+
//ST: !
60+
61+
image::https://docs.google.com/drawings/d/1u4LqlnQby5DQVmq4csZ6f7sq_Z33F33UqtBZ43eh4pc/pub?w=645&h=406[align="center", title="Click on the tab Available Plugins"]
62+
63+
//ST: !
64+
65+
image::https://docs.google.com/drawings/d/18hovYg9G5ek39rILj-aRlEpaWnN6doQeg15iX6lU0aY/pub?w=833&h=543[align="center", title="Install the plugin then restart Gephi"]
66+
67+
== Opening the plugin
68+
//ST: Opening the plugin
69+
//ST: !
70+
71+
image::https://docs.google.com/drawings/d/1eu5O9KiGDAXJSkQuXHYq37T8vSvlZCPMgjwpa4C4Bh4/pub?w=1423&h=851[align="center", title="Open the plugin via the menu File - Import"]
72+
73+
== Using the plugin
74+
//ST: Using the plugin
75+
76+
//ST: !
77+
==== First panel
78+
//ST: !
79+
80+
image::https://docs.google.com/drawings/d/1T1MfrbkD-0JXU0gJittis1SzC6oTS3TzN2NqwkKtRVE/pub?w=1412&h=920[align="center", title="Select a file"]
81+
82+
//ST: Is your file with a header?
83+
84+
//ST: !
85+
86+
image::en/similarity-computer/file-without-header-en.png[align="center", title="A file without headers"]
87+
88+
//ST: !
89+
90+
image::en/similarity-computer/file-with-header-en.png[align="center", title="A file with headers"]
91+
92+
//ST: !
93+
==== Second panel
94+
//ST: !
95+
96+
image::en/similarity-computer/plugin-4-en.png[align="center", title="Parameter for weight"]
97+
98+
//ST: !
99+
==== Third panel
100+
//ST: !
101+
102+
image::en/similarity-computer/plugin-5-en.png[align="center", title="Confirmation panel"]
103+
104+
== How is the similarity computed, exactly?
105+
//ST: How is the similarity computed, exactly?
106+
//ST: !
107+
108+
We use the cosine similarity. Sounds complicated, but it is not. http://stackoverflow.com/questions/1746501/can-someone-give-an-example-of-cosine-similarity-in-a-very-simple-graphical-wa[Check here].
109+
110+
The source code for the cosine calculation is in this https://github.com/gephi/gephi-plugins/blob/master-forge/modules/SimilarityComputer/src/main/java/net/clementlevallois/computer/CosineCalculation.java[file], at https://github.com/gephi/gephi-plugins/blob/master-forge/modules/SimilarityComputer/src/main/java/net/clementlevallois/computer/CosineCalculation.java#L110[this place].
111+
112+
== FAQ / special notes on the plugin
113+
//ST: FAQ / special notes on the plugin
114+
//ST: !
115+
116+
==== 1. Excel files should be .xlsx, not .xls
117+
118+
Because they represent two slightly different files formats, and the plugin supports only .xlsx
119+
120+
//ST: !
121+
122+
==== 2. csv files are ok.
123+
124+
If you select a http://www.computerhope.com/issues/ch001356.htm[csv file], you will be asked to indicate the field delimiter and optionally the text delimiter.
125+
126+
image::en/similarity-computer/plugin-6-en.png[align="center", title="When a csv file is selected"]
127+
128+
//ST: !
129+
130+
==== 3. You can't use numerical values in the attributes
131+
132+
image::en/similarity-computer/numerical-attributes-en.png[align="center", title="Age is a numerical attribute"]
133+
134+
This is too bad. If there is enough demand for it I'll add this feature, which is not trivial.
135+
136+
//ST: !
137+
138+
==== 4. Each entity should appear only on one line
139+
140+
image::en/similarity-computer/plugin-7-en.png[align="center", title="An entity appearing twice"]
141+
142+
David appears on lines 2 and 5 (because he made two purchases). Only the latest line where David appears (line 5) will be taken into account.
143+
144+
== The end
145+
//ST: The end!
146+
147+
Visit https://www.facebook.com/groups/gephi/[the Gephi group on Facebook] to get help,
148+
149+
or visit https://seinecle.github.io/gephi-tutorials/[the website for more tutorials]

0 commit comments

Comments
 (0)