PLSA.data package¶
Submodules¶
PLSA.data.processing module¶
Module for processing data
The function of this Module is served for processing data.
-
PLSA.data.processing.
cut_groups
(data, col, cutoffs)¶ Cut data into subsets according to cutoffs
Parameters: Returns: List of sub-data as DataFrame.
Return type: list(pandas.DataFrame)
Examples
>>> cut_groups(data, "X", [0, 0.4, 0.6, 1.0]) [pandas.DataFrame, pandas.DataFrame, pandas.DataFrame]
-
PLSA.data.processing.
parse_surv
(x, label)¶ Parse raw-data for survival analyze(Deep Surival).
Parameters: - x (np.array) – two-dimension array indicating variables.
- label (dict) –
Contain ‘e’, ‘t’.
examples as {‘e’: np.array, ‘t’: np.array}.
Returns: Sorted (x, e, t) tuple, index of people who is failure or at risk, and type of ties.
Return type: Examples
>>> parse_surv(data[x_cols].values, {'e': data['e'].values, 't': data['t'].values})
-
PLSA.data.processing.
prepare_surv
(x, label)¶ Prepare data for survival analyze(Deep Surival).
Parameters: - x (numpy.array) – Two-dimension array indicating variables.
- label (dict) –
Contain ‘e’, ‘t’.
examples as {‘e’: np.array, ‘t’: np.array}.
Returns: Sorted (x, label) tuple of survival data.
Return type: Examples
>>> prepare_surv(data[x_cols].values, {'e': data['e'].values, 't': data['t'].values})