splitCountsColwise
- oasis_stat.splitCountsColwise(mat, downSampleFrac=0.5)[source]
Downsamples a matrix columnwise, to ensure that each column is equally well represented in the train / test downsampled matrices.
- Parameters:
mat (numpy.ndarray) – The input matrix, IxJ.
downSampleFrac (float, optional) – The fraction of counts to retain per column. Default is 0.5.
- Returns:
The downsampled matrix, IxJ.
- Return type:
out_mat (numpy.ndarray)
Description
Wrapper function for splitCounts() that splits a given fraction, splitFraction, of the counts in each column of a matrix into two separate matrices.