cox_regression.client module

Client module for cox regression

class cox_regression.client.Client(config, client_name)[source]

Bases: Client

The client class, representing data owning clients in the learning process. Based on logistic regression client.

__init__(config, client_name)[source]

Initializes the client

Parameters:

config (Config) – The configuration for the experiment

compute_time_bins(global_max_time)[source]

Compute time bins given a max event time

Parameters:

global_max_time (int) – The global max event time

Return type:

ndarray[Any, dtype[float64]]

Returns:

The time bins

async get_global_max_time()[source]

Get the global maximum event time.

Return type:

int

Returns:

The global maximum event time

load_data()[source]

Load the data as in logistic regression, but add the time column to the data. The time column is the last column in the data and can hence be used in further analysis.

Return type:

tuple[ndarray[Any, dtype[float64]], ndarray[Any, dtype[bool_]]]

Returns:

A data set containing covariates and time column and an array containing failure data.

Raises:

FileNotFoundError – if the training data file does not exist.

async preprocessing()[source]

Preprocess the data: create time bins and stack the data

Return type:

None