Skip to content
Snippets Groups Projects
Commit b5b25f7b authored by Baptiste Bauvin's avatar Baptiste Bauvin
Browse files

Hotfix class selection with example_ids

parent d5235b9c
No related branches found
No related tags found
No related merge requests found
Pipeline #4000 failed
# The base configuration of the benchmark
Base :
log: True
name: ["plausible", "koukou"]
name: ["lives_13view", "koukou"]
label: "_"
type: ".hdf5"
views:
pathf: "../data/"
pathf: "/home/baptiste/Documents/Datasets/Alexis/data/"
nice: 0
random_state: 42
nb_cores: 1
full: True
full: False
debug: True
add_noise: False
noise_std: 0.0
......@@ -21,7 +21,7 @@ Classification:
split: 0.9
nb_folds: 2
nb_class: 2
classes:
classes: ["EMF", ]
type: ["multiview", "monoview"]
algos_monoview: ["decision_tree", "adaboost", "random_forest" ]
algos_multiview: ["weighted_linear_early_fusion",]
......
......@@ -291,8 +291,8 @@ class Dataset():
new_dataset_file = h5py.File(dataset_file_path,"w")
self.dataset.copy("Metadata", new_dataset_file)
if "example_ids" in self.dataset["Metadata"].keys():
ex_ids = new_dataset_file["Metadata"]["example_ids"]
ex_ids[...] = np.array(self.example_ids)[example_indices].astype(np.dtype("S10"))
del new_dataset_file["Metadata"]["example_ids"]
ex_ids = new_dataset_file["Metadata"].create_dataset("example_ids", data=np.array(self.example_ids)[example_indices].astype(np.dtype("S10")))
else:
new_dataset_file["Metadata"].create_dataset("example_ids",
(len(self.example_ids), ),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment