FPGrowth<T> constructor
Creates an instance of the FP-Growth algorithm runner.
minSupport is the minimum support threshold. If the value is less than 1.0,
it's treated as a percentage of the total transactions. Otherwise, it's
treated as an absolute count.
logger an optional logger instance. If not provided, a default logger with info level is used.
parallelism the number of isolates to use for parallel processing. Defaults to 1.
This is ignored on the web platform.
Implementation
FPGrowth({required this.minSupport, Logger? logger, this.parallelism = 1})
: _logger = logger ?? Logger() {
if (minSupport <= 0) {
throw ArgumentError.value(
minSupport,
'minSupport',
'Must be greater than 0',
);
}
if (parallelism < 1) {
throw ArgumentError.value(
parallelism,
'parallelism',
'Must be at least 1',
);
}
}