summit.multiview_platform.multiview package

Submodules

summit.multiview_platform.multiview.exec_multiview module

exec_multiview(directory, dataset_var, name, classification_indices, k_folds, nb_cores, database_type, path, labels_dictionary, random_state, labels, hps_method='None', hps_kwargs={}, metrics=None, n_iter=30, **kwargs)

Used to execute multiview classification and result analysis

Parameters:

directory (indicate the directory)

dataset_var :

name

classification_indices

k_folds

nb_cores

database_type

path

labels_dictionary : dict dictionary of labels

random_stateint seed, RandomState instance, or None (default=None)

The seed of the pseudo random number multiview_generator to use when shuffling the data.

labels

hps_method

metrics

n_iter : int number of iterations

kwargs

Return type:

MultiviewResult

exec_multiview_multicore(directory, core_index, name, learning_rate, nb_folds, database_type, path, labels_dictionary, random_state, labels, hyper_param_search=False, nb_cores=1, metrics=None, n_iter=30, **arguments)

execute multiview process on

Parameters:
  • directory (indicate the directory)

  • core_index

  • name (name of the data file to perform)

  • learning_rate

  • nb_folds

  • database_type

  • path (path to the data name)

  • labels_dictionary

  • random_state (int seed, RandomState instance, or None (default=None)) – The seed of the pseudo random number multiview_generator to use when shuffling the data.

  • labels

  • hyper_param_search

  • nb_cores (in number of cores)

  • metrics (metric to use)

  • n_iter (int number of iterations)

  • arguments (others arguments)

Returns:

database_type, path, labels_dictionary, random_state, labels, hyper_param_search=hyper_param_search, metrics=metrics, n_iter=n_iter, **arguments

Return type:

exec_multiview on directory, dataset_var, name, learning_rate, nb_folds, 1,

init_constants(kwargs, classification_indices, metrics, name, nb_cores, k_folds, dataset_var, directory)

Used to init the constants :param kwargs: :param classification_indices: :param metrics: :param name: :param nb_cores: :type nb_cores: nint number of cares to execute :param k_folds: :param dataset_var: dataset variable :type dataset_var: {array-like} shape (n_samples, n_features)

Returns:

classifier_config, views, learning_rate)

Return type:

tuple of (classifier_name, t_start, views_indices,

save_results(string_analysis, images_analysis, output_file_name, confusion_matrix)

Save results in derectory

Parameters:
  • classifier (classifier class)

  • labels_dictionary (dict dictionary of labels)

  • string_analysis (str)

  • views

  • classifier_module (module of the classifier)

  • classification_kargs

  • directory (str directory)

  • learning_rate

  • name

  • images_analysis

summit.multiview_platform.multiview.multiview_utils module

class BaseMultiviewClassifier(random_state)

Bases: BaseClassifier

BaseMultiviewClassifier base of Multiview classifiers

Parameters:

random_state (int seed, RandomState instance, or None (default=None)) – The seed of the pseudo random number multiview_generator to use when shuffling the data.

accepts_multi_class(random_state, n_samples=10, dim=2, n_classes=3, n_views=2)

Base function to test if the classifier accepts a multiclass task. It is highly recommended to overwrite it with a simple method that returns True or False in the classifier’s module, as it will speed up the benchmark

abstractmethod fit(X, y, train_indices=None, view_indices=None)
abstractmethod predict(X, sample_indices=None, view_indices=None)
set_fit_request(*, train_indices: bool | None | str = '$UNCHANGED$', view_indices: bool | None | str = '$UNCHANGED$') BaseMultiviewClassifier

Request metadata passed to the fit method.

Note that this method is only relevant if enable_metadata_routing=True (see sklearn.set_config()). Please see User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to fit if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to fit.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Note

This method is only relevant if this estimator is used as a sub-estimator of a meta-estimator, e.g. used inside a Pipeline. Otherwise it has no effect.

Parameters:
  • train_indices (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for train_indices parameter in fit.

  • view_indices (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for view_indices parameter in fit.

Returns:

self – The updated object.

Return type:

object

set_predict_request(*, sample_indices: bool | None | str = '$UNCHANGED$', view_indices: bool | None | str = '$UNCHANGED$') BaseMultiviewClassifier

Request metadata passed to the predict method.

Note that this method is only relevant if enable_metadata_routing=True (see sklearn.set_config()). Please see User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to predict if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to predict.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Note

This method is only relevant if this estimator is used as a sub-estimator of a meta-estimator, e.g. used inside a Pipeline. Otherwise it has no effect.

Parameters:
  • sample_indices (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for sample_indices parameter in predict.

  • view_indices (str, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED) – Metadata routing for view_indices parameter in predict.

Returns:

self – The updated object.

Return type:

object

class ConfigGenerator(classifier_names)

Bases: object

rvs(random_state=None)
class MultiviewResult(classifier_name, classifier_config, metrics_scores, full_labels, hps_duration, fit_duration, pred_duration, class_metric_scores, clf)

Bases: object

get_classifier_name()
class MultiviewResultAnalyzer(view_names, classifier, classification_indices, k_folds, hps_method, metrics_dict, n_iter, class_label_names, pred, directory, base_file_name, labels, database_name, nb_cores, duration, feature_ids)

Bases: ResultAnalyser

get_base_string()
get_view_specific_info()
get_available_monoview_classifiers(need_probas=False)
get_monoview_classifier(classifier_name, multiclass=False)

Module contents