mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-27 19:30:28 +08:00
fce97176d6
* Updated cython build scripts * Updated setup.py to to install catalyst package * Updated momentum example to use catalyst package * catalyst executable now supports loading pipelines from multiple bundles
18 lines
363 B
Python
18 lines
363 B
Python
"""
|
|
Algorithms for computing quantiles on numpy arrays.
|
|
"""
|
|
from numpy.lib import apply_along_axis
|
|
from pandas import qcut
|
|
|
|
|
|
def quantiles(data, nbins_or_partition_bounds):
|
|
"""
|
|
Compute rowwise array quantiles on an input.
|
|
"""
|
|
return apply_along_axis(
|
|
qcut,
|
|
1,
|
|
data,
|
|
q=nbins_or_partition_bounds, labels=False,
|
|
)
|