RelativeFrequentPatternMining

class geoanalytics.patternMining.RelativeFrequentPatternMining.RelativeFrequentPatternMining(inputFile: str)[source]

Bases: PatternMiner

About this algorithm

Description:

This module implements the RSFPGrowth algorithm for mining relative frequent patterns from transactional databases. The algorithm discovers itemsets whose relative support exceeds a given minimum relative support threshold.

Parameters:
  • inputFile (str): Path to the transactional database file.

Attributes:
  • inputFile (str): The transactional input file provided during object instantiation.

  • miner (RSFPGrowth): Instance of the RSFPGrowth algorithm from the PAMI library.

Execution methods

Calling from a Python program

from geoanalytics.patternMining import RelativeFrequentPatternMining

miner = RelativeFrequentPatternMining("data/input.txt")

miner.run(minSupport=3, minRS=0.5)

Credits

Written by M. Charan Teja, under the guidance of Professor Rage Uday Kiran.

run(minSupport: int, minRS: float)[source]

Executes the RSFPGrowth algorithm to mine relative frequent patterns.

Parameters:
  • minSupport (int) – Minimum support threshold for frequent itemsets.

  • minRS (float) – Minimum relative support threshold.

Output:

Prints the discovered relative frequent patterns to the console.