cesium-ml / cesium

Machine Learning Time-Series Platform
Other
670 stars 101 forks source link

suppress warning messages when using featurize_single_ts function #271

Open shujamughal opened 6 years ago

shujamughal commented 6 years ago

Hi,

is it possible to suppress the warning messages which are generated by the featurize_single_ts function during getting the features?

Thanks shuja

stefanv commented 6 years ago

Yes, you can use the language warning filter to switch those off. But, can you show us some of these messages, and do you think they should be suppressed on our end?

shujamughal commented 6 years ago

Hi, the following are the warning messages. and I think, there should be the way to suppress these warnings in the library.

/usr/lib/python3/dist-packages/numpy/core/_methods.py:101: RuntimeWarning: invalid value encountered in subtract x = asanyarray(arr - arrmean) /usr/local/lib/python3.5/dist-packages/cesium/features/cadence_features.py:12: RuntimeWarning: divide by zero encountered in true_divide return (cads[2:] + cads[:-2]) / (cads[1:-1] - cads[:-2]) /usr/lib/python3/dist-packages/numpy/core/_methods.py:101: RuntimeWarning: invalid value encountered in subtract x = asanyarray(arr - arrmean) /usr/local/lib/python3.5/dist-packages/cesium/features/cadence_features.py:12: RuntimeWarning: divide by zero encountered in true_divide return (cads[2:] + cads[:-2]) / (cads[1:-1] - cads[:-2]) /usr/lib/python3/dist-packages/numpy/core/_methods.py:101: RuntimeWarning: invalid value encountered in subtract x = asanyarray(arr - arrmean) /usr/local/lib/python3.5/dist-packages/cesium/features/cadence_features.py:12: RuntimeWarning: divide by zero encountered in true_divide return (cads[2:] + cads[:-2]) / (cads[1:-1] - cads[:-2]) /usr/lib/python3/dist-packages/numpy/core/_methods.py:101: RuntimeWarning: invalid value encountered in subtract x = asanyarray(arr - arrmean) /usr/local/lib/python3.5/dist-packages/cesium/features/cadence_features.py:12: RuntimeWarning: divide by zero encountered in true_divide return (cads[2:] + cads[:-2]) / (cads[1:-1] - cads[:-2]) /usr/lib/python3/dist-packages/numpy/core/_methods.py:101: RuntimeWarning: invalid value encountered in subtract x = asanyarray(arr - arrmean) /usr/local/lib/python3.5/dist-packages/cesium/features/cadence_features.py:12: RuntimeWarning: divide by zero encountered in true_divide return (cads[2:] + cads[:-2]) / (cads[1:-1] - cads[:-2]) /usr/lib/python3/dist-packages/numpy/core/_methods.py:101: RuntimeWarning: invalid value encountered in subtract x = asanyarray(arr - arrmean) /usr/local/lib/python3.5/dist-packages/cesium/features/cadence_features.py:12: RuntimeWarning: divide by zero encountered in true_divide return (cads[2:] + cads[:-2]) / (cads[1:-1] - cads[:-2]) /usr/lib/python3/dist-packages/numpy/core/_methods.py:101: RuntimeWarning: invalid value encountered in subtract x = asanyarray(arr - arrmean) /usr/lib/python3/dist-packages/numpy/lib/function_base.py:3569: RuntimeWarning: Invalid value encountered in median RuntimeWarning) /usr/lib/python3/dist-packages/numpy/lib/function_base.py:3834: RuntimeWarning: Invalid value encountered in percentile RuntimeWarning) /usr/local/lib/python3.5/dist-packages/cesium/features/cadence_features.py:12: RuntimeWarning: divide by zero encountered in true_divide

stefanv commented 5 years ago

@acrellin We should probably not be seeing divide by zero errors. Can you reproduce these?

talhaanwarch commented 5 years ago

@stefanv i am facing the same issue, though i am running the example (http://cesium-ml.org/docs/auto_examples/plot_EEG_Example.html) ,you can simply reproduce it, while running feature section

BHBoeschen commented 5 years ago

i am having troubles with the sample dataset of Andrzejak et al. as well. is there a way around it?

stefanv commented 2 years ago

I cannot reproduce with the current version; can you verify that it is still present?