tempor.datasources.prediction.temporal.plugin_uci_diabetes module

Module defining the UCI diabetes data source.

class tempor.datasources.prediction.temporal.plugin_uci_diabetes.UCIDiabetesDataSource(make_regular: bool = False, use_int_index: bool = True, targets: tuple[str, ...] = ('hypoglycemic_symptoms',), **kwargs: Any)[source]

Bases: TemporalPredictionDataSource

UCI diabetes data source.

See: https://archive.ics.uci.edu/ml/machine-learning-databases/diabetes

Parameters:
make_regular : bool, optional

Whether to reindex the dataset to have regular timesteps. Defaults to False.

use_int_index : bool, optional

Whether to use integer index. Defaults to True.

targets : Tuple[str, ...], optional

The target feature(s). Defaults to ("hypoglycemic_symptoms",).

**kwargs : Any

Any additional keyword arguments will be passed to parent constructor.

static url() str[source]

Define the URL of the data source, if relevant, otherwise return None.

Returns:

The URL of the data source, if relevant, otherwise None.

Return type:

Optional[str]

static dataset_dir() str[source]

The path to the directory where the data file(s) will be stored, if relevant. If the data source has no data files, return None.

Note

the path should correspond to a subdirectory within data_root_dir.

Returns:

The path of the directory where the data file(s) will be stored, if relevant, else None.

Return type:

Optional[str]

load(**kwargs: Any) TemporalPredictionDataset[source]

The method that should return a temporal prediction dataset.

Parameters:
**kwargs : Any

Any additional keyword arguments.

Returns:

The loaded dataset.

Return type:

dataset.TemporalPredictionDataset

category : ClassVar[plugin_typing.PluginCategory] = 'prediction.temporal'

Plugin category, such as 'prediction.one_off.classification'. Must be set by the plugin class using @register_plugin.

name : ClassVar[plugin_typing.PluginName] = 'uci_diabetes'

Plugin name, such as 'my_nn_classifier'. Must be set by the plugin class using @register_plugin.

plugin_type : ClassVar[plugin_typing.PluginTypeArg] = 'datasource'

Plugin type, such as 'method'. May be optionally set by the plugin class using @register_plugin, else will set the default plugin type.