sksurv.column.standardize#

sksurv.column.standardize(table, with_std=True)[source]#

Standardize numeric features by removing the mean and scaling to unit variance.

This function performs Z-Normalization on each numeric column of the given table.

If table is a pandas.DataFrame, only numeric columns are modified; all other columns remain unchanged. If table is a numpy.ndarray, it is only modified if it has a numeric dtype, in which case the returned array will have a floating-point dtype.

Parameters:
  • table (pandas.DataFrame or numpy.ndarray) – Data to standardize.

  • with_std (bool, optional, default: True) – If False, data is only centered (mean removed) and not scaled to unit variance.

Returns:

normalized – The standardized data. The output type will be the same as the input type.

Return type:

pandas.DataFrame or numpy.ndarray