Class PatternDetectionRandom