MCPcopy Create free account
hub / github.com/dblalock/bolt / load_dataset_object

Function load_dataset_object

experiments/python/main.py:45–55  ·  view source on GitHub ↗
(which_dataset, **load_dataset_kwargs)

Source from the content-addressed store, hash-verified

43# ================================================================ Clustering
44
45def load_dataset_object(which_dataset, **load_dataset_kwargs):
46 X_train, Q, X_test, true_nn = datasets.load_dataset(
47 which_dataset, **load_dataset_kwargs)
48 assert Q.shape[-1] == X_train.shape[-1]
49
50 if isinstance(which_dataset, str):
51 name = files.basename(which_dataset, noext=True)
52 else:
53 name = which_dataset.__name__ # assumes which_dataset is a class
54
55 return Dataset(Q, X_train, X_test, true_nn, name)
56
57
58Dataset = namedtuple('Dataset', [

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected