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

Dataset sorts examples ?

parent be62f96b
No related branches found
No related tags found
No related merge requests found
# The base configuration of the benchmark
log: True
log: False
name: ["plausible",]
label: "_"
file_type: ".hdf5"
......@@ -19,15 +19,15 @@ track_tracebacks: False
multiclass_method: "oneVersusOne"
split: 0.49
nb_folds: 2
nb_class: 3
nb_class: 2
classes:
type: ["multiview",]
type: ["multiview","monoview"]
algos_monoview: ["decision_tree" ]
algos_multiview: ["svm_jumbo_fusion",]
algos_multiview: ["weighted_linear_early_fusion",]
stats_iter: 2
metrics: ["accuracy_score", "f1_score"]
metric_princ: "f1_score"
hps_type: "randomized_search"
metric_princ: "accuracy_score"
hps_type: "None"
hps_iter: 1
......
......@@ -195,9 +195,9 @@ class RAMDataset(Dataset):
if type(example_indices) is int:
return self.views[view_index][example_indices, :]
else:
example_indices = np.array(example_indices)
sorted_indices = np.argsort(example_indices)
example_indices = example_indices[sorted_indices]
example_indices = np.asarray(example_indices)
# sorted_indices = np.argsort(example_indices)
# example_indices = example_indices[sorted_indices]
if not self.are_sparse[view_index]:
return self.views[view_index][
example_indices, :]
......@@ -452,12 +452,11 @@ class HDF5Dataset(Dataset):
return self.dataset["View" + str(view_index)][example_indices, :]
else:
example_indices = np.array(example_indices)
sorted_indices = np.argsort(example_indices)
example_indices = example_indices[sorted_indices]
# sorted_indices = np.argsort(example_indices)
# example_indices = example_indices[sorted_indices]
if not self.dataset["View" + str(view_index)].attrs["sparse"]:
return self.dataset["View" + str(view_index)][()][example_indices, :][
np.argsort(sorted_indices), :]
return self.dataset["View" + str(view_index)][()][example_indices, :]#[np.argsort(sorted_indices), :]
else:
sparse_mat = sparse.csr_matrix(
(self.dataset["View" + str(view_index)]["data"][()],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment