2018-03-31 18:49:52 +01:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi, scikitlearn, pandas, nose, pytest }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "imbalanced-learn";
|
2018-11-04 10:35:02 +00:00
|
|
|
version = "0.4.2";
|
2018-03-31 18:49:52 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-11-04 10:35:02 +00:00
|
|
|
sha256 = "f830ebc2042b642648bfe48a9253b45019ab15a5d0ac0bbdd7261e304e71609d";
|
2018-03-31 18:49:52 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ scikitlearn ];
|
|
|
|
checkInputs = [ nose pytest pandas ];
|
|
|
|
checkPhase = ''
|
|
|
|
export HOME=$PWD
|
|
|
|
# skip some tests that fail because of minimal rounding errors
|
|
|
|
py.test imblearn --ignore=imblearn/metrics/classification.py
|
|
|
|
py.test doc/*.rst
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Library offering a number of re-sampling techniques commonly used in datasets showing strong between-class imbalance";
|
|
|
|
homepage = https://github.com/scikit-learn-contrib/imbalanced-learn;
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|