tempor.datasources.time_to_event.plugin_pbc module

Module containing the PBC data source.

class tempor.datasources.time_to_event.plugin_pbc.PBCDataSource(**kwargs: Any)[source]

Bases: TimeToEventAnalysisDataSource

PBC data source.

The data is from the PBC2 dataset, as found here: https://search.r-project.org/CRAN/refmans/DynForest/html/pbc2.html

Actual data obtained from: https://raw.githubusercontent.com/autonlab/auton-survival/cf583e598ec9ab92fa5d510a0ca72d46dfe0706f/dsm/datasets/pbc2.csv

Temporal features are: - "drug" - "ascites" - "hepatomegaly" - "spiders" - "edema" - "histologic" - "serBilir" - "serChol" - "albumin" - "alkaline" - "SGOT" - "platelets" - "prothrombin" - "age"

Static features are: - "sex"

The target is: - "status2" as found in the autonlab/auton-survival version.

Parameters:
**kwargs : Any

Keyword arguments to be passed to the parent class.

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]

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]

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

The method that should return a time-to-event analysis dataset.

Parameters:
**kwargs : Any

Any additional keyword arguments.

Returns:

The loaded dataset.

Return type:

dataset.TimeToEventAnalysisDataset

category : ClassVar[plugin_typing.PluginCategory] = 'time_to_event'

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

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

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.