-
Notifications
You must be signed in to change notification settings - Fork 882
Description
mlxtend/mlxtend/frequent_patterns/apriori.py
Line 224 in 115278b
_bools = X[:, combin[:, 0]] == all_ones |
Processing 24785850 combinations | Sampling itemset size 6
Traceback (most recent call last):
File "***.py", line 116, in
frequent_itemsets = apriori(df, min_support=0.8, use_colnames=True, verbose=1)File "C:\ProgramData\Anaconda3\lib\site-packages\mlxtend\frequent_patterns\apriori.py", line 219, in apriori
_bools = X[:, combin[:, 0]] == all_onesFile "C:\ProgramData\Anaconda3\lib\site-packages\scipy\sparse_index.py", line 53, in getitem
return self._get_sliceXarray(row, col)File "C:\ProgramData\Anaconda3\lib\site-packages\scipy\sparse\csc.py", line 222, in _get_sliceXarray
return self._major_index_fancy(col)._minor_slice(row)File "C:\ProgramData\Anaconda3\lib\site-packages\scipy\sparse\compressed.py", line 693, in _major_index_fancy
res_indices = np.empty(nnz, dtype=idx_dtype)ValueError: negative dimensions are not allowed
In my apriori.py, variable "combin" is a (4130975, 6) dataframe comprise of indices (dtype = int32).
In compressed.py, numpy cumsum takes the dtype from indices of "combin".
Negative values appeared after the numpy cumsum reached maximum of int32.
Not sure if it is an exception for numpy cumsum or mlxtend apriori.