Wrappers for OpenML Data Streams
Ver. 2.0.0 (2025-07-23)
This module provides wrapper functionalities to incorporate public data sets of the OpenML ecosystem.
Learn more:
- class mlpro_int_openml.wrappers.streams.WrStreamProviderOpenML(p_logging=True)
Bases:
Wrapper,StreamProviderWrapper class for OpenML as StreamProvider.
- Parameters:
p_logging – Log level of stream objects (see constants of class Log). Default: Log.C_LOG_ALL.
- C_NAME = 'OpenML'
- C_WRAPPED_PACKAGE: str = 'openml'
- C_MINIMUM_VERSION: str = '0.14.2'
- C_SCIREF_TYPE = 'Online'
- C_SCIREF_AUTHOR = 'OpenML'
- C_SCIREF_URL = 'https://www.openml.org'
- _get_stream_list(p_mode=0, p_logging=True, **p_kwargs) list
Custom class to get a list of stream objects from OpenML.
- Parameters:
p_mode – Operation mode. Default: Mode.C_MODE_SIM.
p_logging – Log level of stream objects (see constants of class Log). Default: Log.C_LOG_ALL.
p_kwargs (dict) – Further stream specific parameters.
- Returns:
stream_list – List of provided streams.
- Return type:
list
- _get_stream(p_id: str = None, p_name: str = None, p_mode=0, p_logging=True, **p_kwargs) Stream
Custom implementation to fetch an OpenML stream object.
- Parameters:
p_id (str) – Optional Id of the requested stream. Default = None.
p_name (str) – Optional name of the requested stream. Default = None.
p_mode – Operation mode. Default: Mode.C_MODE_SIM.
p_logging – Log level (see constants of class Log). Default: Log.C_LOG_ALL.
p_kwargs (dict) – Further stream specific parameters.
- Returns:
s – Stream object or None in case of an error.
- Return type:
Stream
- class mlpro_int_openml.wrappers.streams.WrStreamOpenML(p_id, p_name: str, p_num_instances: int, p_version: str, p_mode=0, p_logging=True, **p_kwargs)
Bases:
StreamWrapper class for Streams from OpenML.
- Parameters:
p_id – Id of the stream.
p_name (str) – Name of the stream.
p_num_instances (int) – Number of instances in the stream.
p_version (str) – Version of the stream. Default = ‘’.
p_feature_space (MSpace) – Optional feature space. Default = None.
p_label_space (MSpace) – Optional label space. Default = None.
p_mode – Operation mode. Valid values are stored in constant C_VALID_MODES.
p_logging – Log level (see constants of class Log). Default: Log.C_LOG_ALL.
p_kwargs (dict) – Further stream specific parameters. See https://docs.openml.org/Python-API/ for more informations. In particular, the optional parameters of method openml.datasets.OpenMLDataset.get_data() can be handed over here (or later by using method set_options()).
- C_TYPE = 'Wrapped OpenML stream'
- C_NAME = ''
- C_SCIREF_TYPE = 'Online'
- _reset()
Custom reset method to download and reset an OpenML stream.
- _setup_feature_space() MSpace
Custom method to set up the feature space of the stream. It is called by method get_feature_space().
- Returns:
feature_space – Feature space of the stream.
- Return type:
MSpace
- _setup_label_space() MSpace
Custom method to set up the label space of the stream. It is called by method get_label_space().
- Returns:
label_space – Label space of the stream.
- Return type:
MSpace
- _download() bool
Custom method to download the corresponding OpenML dataset
- Returns:
True for the download status of the stream
- Return type:
bool
- _get_next() Instance
Custom method to get the next instance of the OpenML stream.
- Returns:
instance – Next instance in the OpenML stream object (None after the last instance in the dataset).
- Return type:
Instance