pegasus.arcsinh
- pegasus.arcsinh(data, cofactor=5.0, jitter=False, random_state=0, base_matrix=None, target_matrix=None, select=True)[source]
Conduct arcsinh transform on the current matrix.
If jitter == True, jittering by adding a randomized value in U([-0.5, 0.5)). This will also make the matrix dense. Mimic Cytobank.
- Parameters
cofactor (
float, optional, default:5.0) – Cofactor used in cytobank, arcsinh(x / cofactor).jitter (
bool, optional, default:False) – Add a ‘arcsinh.jitter’ matrix in dense format, jittering by adding a randomized value in U([-0.5, 0.5)).random_state (
int, optional, default:0) – Random seed for generating jitters.base_matrix (
str, optional, default:None.) – The key name of the matrix to perform arcsinh. If None, the current matrix.target_matrix (
str, optional, default:None.) – The key name of the matrix to store the arcsinh results. If None, base_matrix + “.arcsinh”.select (
bool, optional, default:None.) – Select the arcsinh matrix as the current matrix (can be accessed via data.X).
- Return type
None- Returns
NoneAdd the arcsinh matrix to
data.matrices.Note that if the detected base_matrix`==`X, we’ll change the name to counts instead.
Examples
>>> pg.arcsinh(data)