ca.pfv.spmf.algorithms.sequentialpatterns.fournier2008_seqdim
Class AlgoFournierViger08
- java.lang.Object
-
- ca.pfv.spmf.algorithms.sequentialpatterns.fournier2008_seqdim.AbstractAlgoPrefixSpan
-
- ca.pfv.spmf.algorithms.sequentialpatterns.fournier2008_seqdim.AlgoFournierViger08
-
public class AlgoFournierViger08 extends AbstractAlgoPrefixSpan
This is the original implementation of the Fournier-Viger algorithm (2008) for sequential pattern mining, which combines features from several algorithms and includes original features such as accepting items with double values. For details about this algorithm see:
Fournier-Viger, P., Nkambou, R & Mephu Nguifo, E. (2008), A Knowledge Discovery Framework for Learning Task Models from User Interactions in Intelligent Tutoring Systems. Proceedings of the 7th Mexican International Conference on Artificial Intelligence (MICAI 2008). LNAI 5317, Springer, pp. 765-778.
This implementation can keep the result into memory and return it by the method runAlgorithm() or save the result directly to a file, if an output file path is provided.- See Also:
SequenceDatabase,Sequence,Sequences,PseudoSequence,PseudoSequenceDatabase,Pair,AlgoKMeansWithSupport,AbstractAlgoPrefixSpan
-
-
Constructor Summary
Constructors Constructor and Description AlgoFournierViger08(double minsupp, double minInterval, double maxInterval, double minWholeInterval, double maxWholeInterval, AlgoKMeansWithSupport algoClustering, boolean findClosedPatterns, boolean enableBackscanPruning)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublegetMinSupp()Get the minsup threshold as a percentage (doule)intgetMinsuppRelative()Get the minsup threshold as an integer (sequence count)voidprintResult(int databaseSize)Print the seq.voidprintStatistics()Print statistics about the algorithm execution to System.out.SequencesrunAlgorithm(SequenceDatabase database)Run the algorithm and save the result to memoryvoidrunAlgorithm(SequenceDatabase database, java.lang.String outputFilePath)Run the algorithm and save the result to a file
-
-
-
Constructor Detail
-
AlgoFournierViger08
public AlgoFournierViger08(double minsupp, double minInterval, double maxInterval, double minWholeInterval, double maxWholeInterval, AlgoKMeansWithSupport algoClustering, boolean findClosedPatterns, boolean enableBackscanPruning)- Parameters:
minsupp- minimum supportminInterval- minimum item interval between two adjacent items. (C1)maxInterval- maximum item interval between two adjacent items. (C2)minWholeInterval- minimum item interval between the head and tail of a sequence. (C3)maxWholeInterval- maximum item interval between the head and tail of a sequence (C4)algoClustering- algorithm for clusteringfindClosedPatterns- to mine only closed sequences
-
-
Method Detail
-
runAlgorithm
public void runAlgorithm(SequenceDatabase database, java.lang.String outputFilePath) throws java.io.IOException
Run the algorithm and save the result to a file- Parameters:
database- a sequence databaseoutputFilePath- an output file- Throws:
java.io.IOException- throw exception if error creating output file
-
runAlgorithm
public Sequences runAlgorithm(SequenceDatabase database) throws java.io.IOException
Run the algorithm and save the result to memory- Specified by:
runAlgorithmin classAbstractAlgoPrefixSpan- Parameters:
database- a sequence database- Returns:
- a set of sequential patterns (Sequences)
- Throws:
java.io.IOException
-
printStatistics
public void printStatistics()
Print statistics about the algorithm execution to System.out.
-
printResult
public void printResult(int databaseSize)
Print the seq. patterns found to System.out. with- Parameters:
databaseSize- the size of the database (a number of sequences)
-
getMinSupp
public double getMinSupp()
Get the minsup threshold as a percentage (doule)- Specified by:
getMinSuppin classAbstractAlgoPrefixSpan- Returns:
- a double
-
getMinsuppRelative
public int getMinsuppRelative()
Get the minsup threshold as an integer (sequence count)- Returns:
- an integer
-
-
DMelt 3.0 © DataMelt by jWork.ORG