e547a82c24b37c157bc9b40d2724a7b1fd0a7b0f,cesium/featurize.py,,save_featureset,#,346
Before Change
Path to store feature data.
features, channels = zip(*fset.columns)
for v in [fset.values, features, channels] + list(kwargs.values()) :
if np.array(v).dtype == np.object:
raise ValueError("Cannot save objects in .npz format.")
np.savez(path, values=fset.values, index=fset.index.values.astype(str),
After Change
kwargs["features"] = fset.T
for k, v in kwargs.items():
if isinstance(v, pd.DataFrame):
arr = v.to_records()
dt_list = arr.dtype.descr
// Change type of indices from object to str
for i, (name, dt) in enumerate(dt_list):
if dt.endswith("O"):
size = max(len(x) for x in arr["index"])
dt_list[i] = (name, "U" + str(size))
kwargs[k] = arr.astype(dt_list)
// Bypass savez to allow for `allow_pickle` keyword
// See https://github.com/numpy/numpy/pull/5770
np.lib.npyio._savez(path, [], kwargs, compress=True, allow_pickle=False)
def load_featureset(path):
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances Project Name: cesium-ml/cesium
Commit Name: e547a82c24b37c157bc9b40d2724a7b1fd0a7b0f
Time: 2017-04-17
Author: brettnaul@gmail.com
File Name: cesium/featurize.py
Class Name:
Method Name: save_featureset
Project Name: kwgoodman/numerox
Commit Name: 1bd41127c7c83f3151b6f47b5fe3f5b317dd5430
Time: 2018-09-14
Author: kwgoodman@gmail.com
File Name: numerox/run.py
Class Name:
Method Name: run
Project Name: ellisdg/3DUnetCNN
Commit Name: e235e0ac2568feabc44f9bf37ec8c7ebbb96cf88
Time: 2017-11-17
Author: david.ellis@unmc.edu
File Name: unet3d/model.py
Class Name:
Method Name: unet_model_3d
Project Name: rasbt/mlxtend
Commit Name: 84df7bb20d76e38f44e0891b5e6040688756c4f9
Time: 2017-06-15
Author: squarious@gmail.com
File Name: mlxtend/classifier/stacking_cv_classification.py
Class Name: StackingCVClassifier
Method Name: fit