num_combinations
num_combinations(n, k, with_replacement=False)
Function to calculate the number of possible combinations.
Parameters
-
n
:int
Total number of items.
-
k
:int
Number of elements of the target itemset.
-
with_replacement
:bool
(default: False)Allows repeated elements if True.
Returns
-
comb
:int
Number of possible combinations.
Examples
For usage examples, please see http://rasbt.github.io/mlxtend/user_guide/math/num_combinations/