multiview_generator.base
base
- class MultiViewSubProblemsGenerator(random_state=42, n_samples=100, n_classes=4, n_views=4, error_matrix=None, n_features=3, class_weights=1.0, redundancy=0.0, complementarity=0.0, complementarity_level=3, mutual_error=0.0, name='generated_dataset', config_file=None, sub_problem_type='base', sub_problem_configurations=None, min_rndm_val=-1, max_rndm_val=1, **kwargs)
This engine generates one monoview sub-problem for each view with independant data. If then switch descriptions between the samples to create error and difficulty in the dataset
- Parameters:
random_state – The random state or seed.
n_samples – The number of samples that the dataset will contain
n_classes – The number of classes in which the samples will be labelled
n_views – The number of views describing the samples
error_matrix – The error matrix giving in row i column j the error of the Bayes classifier on Class i for View j
n_features – The number of features describing the samples for each view (can specify an int or array-like of length
n_views
)class_weights – The proportion of the dataset that will be labelled in each class. Must specify an array-like of size n_classes ([0.1,0.45,0.45] will output a dataset with with 10% of the samples in the first class and 45% in the two others.)
redundancy – The proportion of the samples that will be well-decribed by all the views.
# :param complementarity: The proportion of samples that will be well-decribed only by some views :param complementarity_level: The number of views that will have a bad description of the complementray samples :param mutual_error: The proportion of samples that will be mis-described by all the views :param name: The name of the dataset (will be used to name the file) :param config_file: The path to the yaml config file. If provided, the config fil entries will overwrite the one passed as arguments.
- to_hdf5_mc(saving_path='.')
This is used to save the dataset in an HDF5 file, compatible with SuMMIT
- Parameters:
saving_path (str) – where to save the dataset, the file will be names after the self.name attribute.
- Returns:
None
- gen_report(output_path='.', file_type='md', save=True, n_cv=5)
Generates a markdown report based on the configuration. If
save
is True, it will be saved inoutput_path
as <self.name>.<file_type
> .- Parameters:
output_path (str) – path to store the text report.
file_type (str) – Type of file in which the report is saved (currently supported : “md” or “txt”)
save (bool) – Whether to save the string in a file or not.
- Returns:
The report string
- gen_view_report(view_index)