Miscellaneous utility functions.
Clone an algorithm, but not its fitted data. This is like
scikit.base.clone(), but may not work on arbitrary SciKit estimators. LensKit algorithms are compatible with SciKit clone, however, so feel free to use that if you need more general capabilities.
This function is somewhat derived from the SciKit one.
>>> from lenskit.algorithms.basic import Bias >>> orig = Bias() >>> copy = clone(orig) >>> copy is orig False >>> copy.damping == orig.damping True
Get the current memory use for this process
Get the maximum memory use for this process
Get the number of desired jobs for multiprocessing operations. This does not affect Numba or MKL multithreading.
This count can come from a number of sources: * The
LK_NUM_PROCSenvironment variable * The number of CPUs, divided by