The Data Mining Forum
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!
Using TRuleGrowth in Python for sequential rule mining
Date: May 15, 2018 07:50AM
Hello, Prof. Philippe Fournier-Viger.
I'm a master's degree student and I'm doing a project, "Inteligent problem assignment to students", that intends to choose an exercise to present to the user based on what he has already done, and based on data from other users, where the order of the elaborated exercises matters. For that, I intend to use TRuleGrowth algorithm, could you please give me your opinion if this is the apropriate algorithm to use or if you would choose another one?
I only have learned python, so, do you know any python library or python implementation for TRuleGrowth?
Thank you for your attention.
Edited 1 time(s). Last edit at 05/15/2018 04:58PM by webmasterphilfv.
Date: May 15, 2018 08:49AM
You can definitely try these algorithms (RuleGrowth / ERMiner) to discover sequential rules, which could be use to suggest activities to learners. You could consider using the TRuleGrowth algorithm for example, which is an improved version of RuleGrowth offering and additional window parameter.
As for using SPMF from Python, a very simple way could be to call the spmf.jar as an external application from your Python program. SPMF is actually designed to be used from the command line, and takes a text file as input and produce a text file as output. So from a Python program you could call SPMF with a text and then generates the patterns and read the output file to get the result back in your Python program. That would be one way to do it.
Otherwise, it is possible to make some wrapper between SPMF and Python. For example, I know one project that have done something like that:
A wrapper for using some SPMF algorithm (VMSP) in Python: https://github.com/fandu/maximal-sequential-patterns-mining
However, that code is only for one algorithm of SPMF called VMSP and is not written by me. But it could be used as an example of how to make some interface between Java and Python for other algorithms in SPMF.
Date: May 27, 2018 10:29AM
Yes, there is some Java code for that. But it is a student project and it is not public because I did not have time to clean the code and package it properly. And since then, I have included other algorithms for sequence predictions in SPMF.
But if you are interested to get that code, I can send it to you by e-mail. Although the code may not be so clean, I think it should not be hard to understand how it works. Just send me and e-mail to philfv8 AT yahoo DOT com and I will share it with you.