diff --git a/data/Plausible.hdf5 b/data/Plausible.hdf5 deleted file mode 100644 index 4f10a2ad8f524e8692771be0ab2f3f3709f37c16..0000000000000000000000000000000000000000 Binary files a/data/Plausible.hdf5 and /dev/null differ diff --git a/data/Plausible0.hdf5 b/data/Plausible0.hdf5 deleted file mode 100644 index c7e0dd9d3a42182c5879b66d3ac225656171d2e0..0000000000000000000000000000000000000000 Binary files a/data/Plausible0.hdf5 and /dev/null differ diff --git a/data/Plausible1.hdf5 b/data/Plausible1.hdf5 deleted file mode 100644 index c7e0dd9d3a42182c5879b66d3ac225656171d2e0..0000000000000000000000000000000000000000 Binary files a/data/Plausible1.hdf5 and /dev/null differ diff --git a/multiview_platform/mono_multi_view_classifiers/result_analysis.py b/multiview_platform/mono_multi_view_classifiers/result_analysis.py index a94f8e1ed9a8fb838a5ea897eb7ba4f540abb73b..d99e65147639428888dfada8d07515ca1a7b9cbc 100644 --- a/multiview_platform/mono_multi_view_classifiers/result_analysis.py +++ b/multiview_platform/mono_multi_view_classifiers/result_analysis.py @@ -415,10 +415,11 @@ def publish2Dplot(data, classifiers_names, nbClassifiers, nbExamples, nbCopies, """ figWidth = max(nbClassifiers / width_denominator, minSize) figHeight = max(nbExamples / height_denominator, minSize) + print(figHeight, figWidth, nbClassifiers, nbExamples) figKW = {"figsize": (figWidth, figHeight)} - fig, ax = plt.subplots(nrows=1, ncols=1, **figKW) + fig, ax = plt.subplots(nrows=1, ncols=1,)# **figKW) cmap, norm = iterCmap(stats_iter) - cax = plt.imshow(data, interpolation='none', cmap=cmap, norm=norm, + cax = plt.imshow(data, cmap=cmap, norm=norm, aspect='auto') plt.title('Errors depending on the classifier') ticks = np.arange(nbCopies / 2 - 0.5, nbClassifiers * nbCopies, nbCopies) @@ -426,7 +427,8 @@ def publish2Dplot(data, classifiers_names, nbClassifiers, nbExamples, nbCopies, plt.xticks(ticks, labels, rotation="vertical") cbar = fig.colorbar(cax, ticks=[-100 * stats_iter / 2, 0, stats_iter]) cbar.ax.set_yticklabels(['Unseen', 'Always Wrong', 'Always Right']) - fig.tight_layout() + # fig.tight_layout() + fig.savefig(fileName + "error_analysis_2D.png", bbox_inches="tight", transparent=True) plt.close() diff --git a/multiview_platform/mono_multi_view_classifiers/utils/get_multiview_db.py b/multiview_platform/mono_multi_view_classifiers/utils/get_multiview_db.py index a3f2e1d1d480a3bac9f12ac83931549741d4a757..3116890b723295c6d2e66f6db45660f4323d08bf 100644 --- a/multiview_platform/mono_multi_view_classifiers/utils/get_multiview_db.py +++ b/multiview_platform/mono_multi_view_classifiers/utils/get_multiview_db.py @@ -36,13 +36,13 @@ def get_plausible_db_hdf5(features, path, file_name, nb_class=3, label_names=["No".encode(), "Yes".encode(), "Maybe".encode()], random_state=None, full=True, add_noise=False, - noise_std=0.15, nb_view=3, nb_examples=100, + noise_std=0.15, nb_view=3, nb_examples=5000, nb_features=10): """Used to generate a plausible dataset to test the algorithms""" - if not os.path.exists(os.path.dirname(path + "Plausible.hdf5")): + if not os.path.exists(os.path.dirname(path + "plausible.hdf5")): try: - os.makedirs(os.path.dirname(path + "Plausible.hdf5")) + os.makedirs(os.path.dirname(path + "plausible.hdf5")) except OSError as exc: if exc.errno != errno.EEXIST: raise @@ -76,10 +76,10 @@ def get_plausible_db_hdf5(features, path, file_name, nb_class=3, dataset = Dataset(views=views, labels=labels, labels_names=label_names, view_names=view_names, - are_sparse=are_sparse, file_name="Plausible.hdf5", + are_sparse=are_sparse, file_name="plausible.hdf5", path=path) labels_dictionary = {0: "No", 1: "Yes"} - return dataset, labels_dictionary, "Plausible" + return dataset, labels_dictionary, "plausible" elif nb_class >= 3: firstBound = int(nb_examples / 3) rest = nb_examples - 2 * int(nb_examples / 3) @@ -115,10 +115,10 @@ def get_plausible_db_hdf5(features, path, file_name, nb_class=3, dataset = Dataset(views=views, labels=labels, labels_names=label_names, view_names=view_names, are_sparse=are_sparse, - file_name="Plausible.hdf5", + file_name="plausible.hdf5", path=path) labels_dictionary = {0: "No", 1: "Yes", 2: "Maybe"} - return dataset, labels_dictionary, "Plausible" + return dataset, labels_dictionary, "plausible" class DatasetError(Exception):