The Data Mining Forum                             open-source data mining software data mining conferences Data Science for Social and Behavioral Analytics DSSBA 2022 data science journal
IMPORTANT: This is the old Data Mining forum.
I keep it online so that you can read the old messages.

Please post your new messages in the new forum: https://forum2.philippe-fournier-viger.com/index.php
 
Using TRuleGrowth in Python for sequential rule mining
Posted by: Andrea Silva
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.

Options: ReplyQuote
Re: TRuleGrowth
Date: May 15, 2018 08:49AM

Hi Andrea,

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.

Best,

Philippe

Options: ReplyQuote
Re: TRuleGrowth
Posted by: Andrea Silva
Date: May 15, 2018 09:21AM

Thank you very much for your help.
I'll try your suggestions to use python.

Best regards,
Andrea Silva

Options: ReplyQuote
Re: TRuleGrowth
Posted by: Andrea Silva
Date: May 27, 2018 09:52AM

Hello, Prof. Philippe Fournier-Viger.
There is any code or algorithm that uses the rules generated by TRuleGrowth algorithm to predict the next item, when provided the antecedent item?

Thank you for your attention.

Options: ReplyQuote
Re: TRuleGrowth
Date: May 27, 2018 10:29AM

Dear Andrea,

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.

Best,

Options: ReplyQuote


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