2ab1119596b420cc696a783271d617562ccf7e28,cesium/tests/fixtures.py,,sample_featureset,#,42

Before Change


                                           for i in range(n_channels)])
                 for f in features}
    fset = xr.Dataset(feat_dict)
    fset.coords["name"] = ts_names
    fset.coords["channel"] = range(n_channels)
    if targets:
        ts_targets = np.array(list(islice(cycle(targets), size)))

After Change


def sample_featureset(size, n_channels=1, features=["mean"], targets=None,
                      names=None, meta_features=[]):
    ts_names = np.arange(size).astype("str")
    index = pd.MultiIndex.from_tuples([(f, i) for f in features for i in range(n_channels)],
                                      names=["feature", "channel"])
    fset = pd.DataFrame(np.random.random((size, len(features) * n_channels)),
                        columns=index)
    if targets:
        targets = np.array(list(islice(cycle(targets), size)))
    if names:
        fset.index = names
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: cesium-ml/cesium
Commit Name: 2ab1119596b420cc696a783271d617562ccf7e28
Time: 2017-03-29
Author: brettnaul@gmail.com
File Name: cesium/tests/fixtures.py
Class Name:
Method Name: sample_featureset


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 5c34d497ab32ea731b687c5863f104615f666d06
Time: 2019-02-16
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAFetch/QAQuery.py
Class Name:
Method Name: QA_fetch_index_min


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 5c34d497ab32ea731b687c5863f104615f666d06
Time: 2019-02-16
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAFetch/QAQuery.py
Class Name:
Method Name: QA_fetch_index_day