summit.multiview_platform.multiview_classifiers.additions package

Submodules

summit.multiview_platform.multiview_classifiers.additions.diversity_utils module

class CoupleDiversityFusionClassifier(random_state=None, classifier_names=None, monoview_estimators=None, classifier_configs=None)

Bases: DiversityFusionClassifier

choose_combination(X, y, samples_indices, view_indices)
set_fit_request(*, train_indices: bool | None | str = '$UNCHANGED$', view_indices: bool | None | str = '$UNCHANGED$') CoupleDiversityFusionClassifier

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$') CoupleDiversityFusionClassifier

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 DiversityFusionClassifier(random_state=None, classifier_names=None, monoview_estimators=None, classifier_configs=None)

Bases: BaseMultiviewClassifier, BaseFusionClassifier

This is the base class for all the diversity fusion based classifiers.

fit(X, y, train_indices=None, view_indices=None)
get_classifiers_decisions(X, view_indices, samples_indices)
init_combinations(X, sample_indices, view_indices)
predict(X, sample_indices=None, view_indices=None)

Just a weighted majority vote

set_fit_request(*, train_indices: bool | None | str = '$UNCHANGED$', view_indices: bool | None | str = '$UNCHANGED$') DiversityFusionClassifier

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$') DiversityFusionClassifier

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 GlobalDiversityFusionClassifier(random_state=None, classifier_names=None, monoview_estimators=None, classifier_configs=None)

Bases: DiversityFusionClassifier

choose_combination(X, y, samples_indices, view_indices)
set_fit_request(*, train_indices: bool | None | str = '$UNCHANGED$', view_indices: bool | None | str = '$UNCHANGED$') GlobalDiversityFusionClassifier

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$') GlobalDiversityFusionClassifier

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

summit.multiview_platform.multiview_classifiers.additions.early_fusion_from_monoview module

class BaseEarlyFusion(monoview_classifier='decision_tree', random_state=None, **kwargs)

Bases: BaseMultiviewClassifier

fit(X, y, train_indices=None, view_indices=None)
get_feature_importances()
get_params(deep=True)

Get parameters for this estimator.

Parameters:

deep (bool, default=True) – If True, will return the parameters for this estimator and contained subobjects that are estimators.

Returns:

params – Parameter names mapped to their values.

Return type:

dict

hdf5_to_monoview(dataset, samples)

Here, we concatenate the views for the asked samples

predict(X, sample_indices=None, view_indices=None)
set_fit_request(*, train_indices: bool | None | str = '$UNCHANGED$', view_indices: bool | None | str = '$UNCHANGED$') BaseEarlyFusion

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_params(**params)

Set the parameters of this estimator.

The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object.

Parameters:

**params (dict) – Estimator parameters.

Returns:

self – Estimator instance.

Return type:

estimator instance

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

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

transform_data_to_monoview(dataset, sample_indices)

Here, we extract the data from the HDF5 dataset file and store all the concatenated views in one variable

summit.multiview_platform.multiview_classifiers.additions.fusion_utils module

class BaseFusionClassifier

Bases: object

init_monoview_estimator(classifier_name, classifier_config, classifier_index=None, multiclass=False)

summit.multiview_platform.multiview_classifiers.additions.jumbo_fusion_utils module

class BaseJumboFusion(random_state, classifiers_names=None, classifier_configs=None, nb_cores=1, weights=None, nb_monoview_per_view=1, rs=None)

Bases: LateFusionClassifier

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

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_params(nb_monoview_per_view=1, **params)

Set the parameters of this estimator.

The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object.

Parameters:

**params (dict) – Estimator parameters.

Returns:

self – Estimator instance.

Return type:

estimator instance

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

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

summit.multiview_platform.multiview_classifiers.additions.kernel_learning module

class KernelClassifier(random_state=None)

Bases: BaseMultiviewClassifier

extract_labels(predicted_labels)
format_X(X, sample_indices, view_indices)
init_kernels(nb_view=2)
set_fit_request(*, train_indices: bool | None | str = '$UNCHANGED$', view_indices: bool | None | str = '$UNCHANGED$') KernelClassifier

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$') KernelClassifier

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 KernelConfigDistribution(seed=42)

Bases: object

draw(nb_view)
class KernelConfigGenerator

Bases: object

rvs(random_state=None)
class KernelDistribution(seed=42)

Bases: object

draw(nb_view)
class KernelGenerator

Bases: object

rvs(random_state=None)

summit.multiview_platform.multiview_classifiers.additions.late_fusion_utils module

class ClassifierCombinator(need_probas=False)

Bases: object

rvs(random_state=None)
class ClassifierDistribution(seed=42, available_classifiers=None)

Bases: object

draw(nb_view, rs=None)
class ConfigDistribution(seed=42, available_classifiers=None)

Bases: object

draw(nb_view, rs=None)
class LateFusionClassifier(random_state=None, classifiers_names=None, classifier_configs=None, nb_cores=1, weights=None, rs=None)

Bases: BaseMultiviewClassifier, BaseFusionClassifier

fit(X, y, train_indices=None, view_indices=None)
get_classifiers(classifiers_names, nb_choices)
init_classifiers(nb_view, nb_monoview_per_view=None)
init_params(nb_view, mutliclass=False)
set_fit_request(*, train_indices: bool | None | str = '$UNCHANGED$', view_indices: bool | None | str = '$UNCHANGED$') LateFusionClassifier

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$') LateFusionClassifier

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 MultipleConfigGenerator

Bases: object

rvs(random_state=None)
class WeightDistribution(seed=42, distribution_type='uniform')

Bases: object

draw(nb_view)
class WeightsGenerator(distibution_type='uniform')

Bases: object

rvs(random_state=None)

summit.multiview_platform.multiview_classifiers.additions.utils module

get_names(classed_list)

Module contents