catch22
catch22 copied to clipboard
Python 3. Dead kernel after catch22 usage
OS: Ubuntu 18.04 Python version: 3.6.3 Catch22 version: 0.0.1
Issue description: I generate dataframe with small amount of data in columns (1,2,3,4 elements, etc.). I try to use catch22_all method in a case when amount of data is equal to 2 and I have dead kernel as output.
Code example:
groups = df.groupby(["column_id"]).groups
for id_group, idx in groups.items():
group_data = df.loc[idx].drop(["column_id"], axis=1)
# Dead kernel when group_data.shape[0] == 2
buf = pd.DataFrame([f for f in group_data.apply(catch22.catch22_all)])
Hello Migal,
sorry to hear you are experiencing trouble with catch22. What do you mean by "amount of data is equal to 2"? catch22_all is only suited for univariate time series that are stored in a vector. Did you try it without the apply
function of pandas?
Carl
What do you mean by "amount of data is equal to 2"?
I mean case when group_data.shape[0] == 2
Did you try it without the
apply
function of pandas
Sure. This code have the same behavior:
buf = pd.DataFrame(catch22.catch22_all(group_data[column_name]), dtype=np.float64)
Please try it without the direct use of pandas data frames by converting the column to a numpy array. I'll try to make catch22 pandas-ready but I guess for now you'll have to stick with Python lists or numpy arrays.
Please try it without the direct use of pandas data frames by converting the column to a numpy array. I'll try to make catch22 pandas-ready but I guess for now you'll have to stick with Python lists or numpy arrays.
I understand your concerns.
I try to set list as input into the catch22 functions and I have dead kernel as result. Here is the code:
functions = dir(catch22)[:-11] # get all functions from catch22
i=0
func = getattr(catch22, functions[i])
func(list(group_data[column_name]))
Have the same problem, kernel dies if apply function on array with len 1 or 2. Could be useful to add exception for it.