The Data Mining Forum                             open-source data mining software open-source data mining software data science journal data mining conferences
This forum is about data mining, data science and big data: algorithms, source code, datasets, implementations, optimizations, etc. You are welcome to post call for papers, data mining job ads, link to source code of data mining algorithms or anything else related to data mining. The forum is hosted by P. Fournier-Viger. No registration is required to use this forum!.  
SPMF output into Graphviz question
Posted by: tassieTom
Date: March 25, 2020 03:16PM

Hi Philippe,

Thank you for writing an amazingly useful article on visualising the output of SPMF using graphviz.

http://data-mining.philippe-fournier-viger.com/discovering-visualizing-sequential-patterns-web-log-data-using-spmf/

I was able to replicate your FIFA results using your Java script. However, what I dont understand is what it is doing. It is "condensing" or shrinking the sequential output and is only using one node and edge (source to target)

So if there are two edges or ouputs from the same node:
4 -1 10 -1 #SUP: 15
4 -1 5 -1 #SUP: 17
only the one is used.

Would you mind briefly explaining what your java is doing besides getting the file into DOT format ie how you are selecting and shrinking the sequential network that is output from SPMF?

Also, just a note on a tiny issue--
TKS is putting TWO spaces before the #SUP: output,
which is prevents the java code from running because all your other algorithms have one space before the #SUP.

A quick tip too---there is a wonderful graphic software called Gephi which allows DOT format input and which has fantastic possibilities.

Thanks again for producing such wonderful software and blog.
Regards,
Tom

Options: ReplyQuote
Re: SPMF output into Graphviz question
Date: March 25, 2020 05:57PM

Hi Tom,

Thanks a lot for your message. Happy to know that the software and blog are useful.

1) I have fixed the space error in the TKS! I will upload the bug fix in the next version of SPMF soon.

2) I have checked the code to conver to GraphViz and there was indeed some bug. It was not supposed to condense the edges. It was actually missing some edges. I have fixed the code and replaced the code on the blog with the correct version that will show all the edges.

http://data-mining.philippe-fournier-viger.com/discovering-visualizing-sequential-patterns-web-log-data-using-spmf/

The code is doing a loop over all sequential patterns, and it will put an edge between two items if they appear in two consecutive itemsets whithin a sequential pattern.

For example, a sequential pattern 1 -1 2 -1 3 -1
would result in drawing these edges:

1 to 2
2 to 3

3) Thanks for letting me know about Gephi. I have heard about it. But I have never used it. I should try it. :-)

Best regards,

Philippe

Options: ReplyQuote
Re: SPMF output into Graphviz question
Posted by: tassieTom
Date: March 25, 2020 07:56PM

This is brilliant, thank you Philippe.
Keep up your wonderful work.
Many thanks,
Tom

Options: ReplyQuote
Re: SPMF output into Graphviz question
Posted by: tassieTom
Date: March 25, 2020 09:23PM

Philippe, sorry to be a pain, but the java doesn't compile, I get the following error:

C:\Users\Administrator\Desktop>javac MainTestConvertToDotFormat.java
MainTestConvertToDotFormat.java:75: error: incompatible types: Object cannot be converted to String
for(String otherVertex : edge.getValue()) {
^
Note: MainTestConvertToDotFormat.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error

I know very little about java, so I can't fix what is probably just a typo.
When you get a minute, could you look at it?
Many thanks, Tom

Options: ReplyQuote
Re: SPMF output into Graphviz question
Date: March 25, 2020 10:13PM

Hi Tom,

I see,

There was a little mistake. The first line "package ca.pfv.spmf.test" should have been removed. You can download the code here:


http://philippe-fournier-viger.com/www2/MainTestConvertToDotFormat.java

Then to compile it, you can type:

javac MainTestConvertToDotFormat.java

in the command line.

If it does not work, a problem may be that you have an old version of Java.

To check the version of Java, you can type:

java -version

I think that you need Java version at least 1.6 to run this code!

Hope this works now! On my computer, it can compile successfully!

By the way, if you have some interesting results and you think it is interesting to others, you may share them! I would be happy to see some.

Best regards,

Philippe



Edited 1 time(s). Last edit at 03/25/2020 10:14PM by webmasterphilfv.

Options: ReplyQuote
Re: SPMF output into Graphviz question
Posted by: tassieTom
Date: March 26, 2020 12:59AM

Philippe, thank you very much for your help, I appreciate it.
This is fantastic, it lets you see what is going on by adding a visual aspect.
It's all working well!

I am testing some interesting things, will post results in the near future if it turns out worthwhile.

Many thanks again!
Regards,
Tom

Options: ReplyQuote
Re: SPMF output into Graphviz question
Date: March 26, 2020 02:28AM

Glad to know it works!

I think that pattern visualization is a very interesting topic. I did work much on this but there are certainly many things that could be done. Will be looking forward to see what you do if you got something interesting to share! :-)

Best regards,

Philippe

Options: ReplyQuote


This forum is powered by Phorum and provided by P. Fournier-Viger (© 2012).
Terms of use.