56fb5f5ecfdaafc57b67db632004c6272f068e2e,seglearn/util.py,,check_ts_data,#,9
Before Change
"""
if type(X) is np.recarray:
_check_ts(X["ts"])
elif type(X) is list o r type(X) is np.ndarray:
_check_ts(X)
else:
raise TypeError
def _check_ts(X):
Nvars = np.array([np.row_stack(X[i]).shape[1] for i in range(len(X))])
assert len(np.unique(Nvars)) == 1
After Change
Xt, Xs = get_ts_data_parts(X)
if Xs is not None:
assert len(Xt) == len(Xs)
N_tvars = np.array([np.row_stack(Xt[i]).shape[1] for i in range(len(Xt))])
assert len(np.unique(N_tvars)) == 1
def ts_stats(Xt, y, fs = 1.0, class_labels = None):
"""
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 7
Instances Project Name: dmbee/seglearn
Commit Name: 56fb5f5ecfdaafc57b67db632004c6272f068e2e
Time: 2018-03-08
Author: david.mo.burns@gmail.com
File Name: seglearn/util.py
Class Name:
Method Name: check_ts_data
Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 3397e6bfd55584c62d64911ecdaf588ca3469b79
Time: 2020-04-01
Author: 31518063+kurtisvg@users.noreply.github.com
File Name: noxfile-template.py
Class Name:
Method Name:
Project Name: neuroailab/tnn
Commit Name: ec872ac8f3e8d62bb78819761cc33d5f2faf4580
Time: 2019-12-26
Author: anayebi@stanford.edu
File Name: tnn/cell.py
Class Name: GenFuncCell
Method Name: __init__
Project Name: pgmpy/pgmpy
Commit Name: 97b2ccec94583a7876566a340f06e84a63340272
Time: 2015-03-26
Author: pratyaksh@me.com
File Name: pgmpy/inference/ExactInference.py
Class Name: VariableElimination
Method Name: induced_graph