1{ lib, buildPythonPackage, fetchPypi, scikit-learn, pandas, nose, pytest }: 2 3buildPythonPackage rec { 4 pname = "imbalanced-learn"; 5 version = "0.4.3"; 6 7 src = fetchPypi { 8 inherit pname version; 9 sha256 = "5bd9e86e40ce4001a57426541d7c79b18143cbd181e3330c1a3e5c5c43287083"; 10 }; 11 12 propagatedBuildInputs = [ scikit-learn ]; 13 checkInputs = [ nose pytest pandas ]; 14 checkPhase = '' 15 export HOME=$PWD 16 # skip some tests that fail because of minimal rounding errors 17 # or large dependencies 18 py.test imblearn -k 'not classification \ 19 and not _generator \ 20 and not _forest \ 21 and not wrong_memory' 22 ''; 23 24 meta = with lib; { 25 description = "Library offering a number of re-sampling techniques commonly used in datasets showing strong between-class imbalance"; 26 homepage = "https://github.com/scikit-learn-contrib/imbalanced-learn"; 27 license = licenses.mit; 28 }; 29}