stereo.core.StPipeline.scale¶
- StPipeline.scale(zero_center=True, max_value=None, layer=None, inplace=True, add_layer=False, res_key='scale')[source]¶
Scale express matrix to unit variance and zero mean.
- Parameters:
zero_center (
bool) – ifFalse, ignore zero variables, which allows to deal with sparse input efficently.max_value (
Optional[float]) – truncate to this value after scaling, ifNone, do not truncate.layer (
Optional[str]) – the key of layer to be used instead of the data.exp_matrix.inplace (
bool) – whether to replace the data.exp_matrix or save the result indata.layers.add_layer (
bool) – whether to save the result indata.layerssimultaneously wheninplaceis True.res_key (
str) – the key to save the result indata.layerswheninplaceis False oradd_layeris True.
- Return type:
Depending on
inplace, ifTrue, the data will be replaced by those scaled.