cca_zoo.datasets.load_mfeat_data#

class cca_zoo.datasets.load_mfeat_data(features=None)[source]#

Bases:

Load the Multiple Features (MFeat) dataset.

Parameters: - features (list of str or None, optional): List of feature types to load. Available feature types: [“fac”, “fou”, “kar”, “mor”, “pix”, “zer”]. If None, all available features will be loaded.

Returns: - data (Bunch object): A Scikit-learn Bunch object containing the MFeat dataset. This object has ‘views’ (features), ‘target’ (class labels), ‘DESCR’ (description), and ‘data_module’ attributes.

The function downloads and extracts the MFeat dataset from a remote URL if it’s not already downloaded. It allows you to specify which types of features to load (e.g., “fac”, “fou”, etc.).

The MFeat dataset consists of multiple sets of features, with each set corresponding to a different class. The first 200 patterns are of class ‘0’, followed by sets of 200 patterns for each of the classes ‘1’ to ‘9’.

Example usage: >>> mfeat_data = load_mfeat_data(features=[“fac”, “fou”]) >>> features = mfeat_data.views >>> labels = mfeat_data.target >>> print(features[0].shape) # Shape of the loaded features >>> print(labels.shape) # Shape of the loaded labels