FaultTolerantFrequentPatternMining
- class geoanalytics.patternMining.FaultTolerantFrequentPatternMining.FaultTolerantFrequentPatternMining(inputFile: str)[source]
Bases:
PatternMinerAbout this algorithm
- Description:
This module implements the FTFPGrowth algorithm for discovering fault-tolerant frequent patterns in transactional datasets. Fault-tolerant patterns allow a limited number of item mismatches while still preserving a minimum support threshold, making the algorithm useful in noisy or imperfect data environments.
- Parameters:
inputFile (str): Path to the input transactional database file.
- Attributes:
inputFile (str): Input file provided during object instantiation.
miner (FTFPGrowth): Instance of the FTFPGrowth algorithm from the PAMI library.
Execution methods
Calling from a Python program
from geoanalytics.patternMining import FaultTolerantFrequentPatternMining miner = FaultTolerantFrequentPatternMining("data/input.txt") miner.run(minSupport=3, itemSup=2, minLength=2, faultTolerance=1)
Credits
Written by M. Charan Teja, under the guidance of Professor Rage Uday Kiran.
- run(minSupport: int, itemSup: int, minLength: int, faultTolerance: int)[source]
Executes the FTFPGrowth algorithm to mine fault-tolerant frequent patterns.
- Parameters:
minSupport (int) – Minimum support threshold for frequent itemsets.
itemSup (int) – Minimum individual item frequency threshold.
minLength (int) – Minimum length of the itemset to be considered.
faultTolerance (int) – Maximum number of tolerated faults (missing or mismatched items) in the itemsets.
- Output:
Prints the fault-tolerant frequent patterns to the console.