1{ lib 2, buildPythonPackage 3, fetchPypi 4, isPy27 5, pandas 6, pytestCheckHook 7, scikit-learn 8}: 9 10buildPythonPackage rec { 11 pname = "imbalanced-learn"; 12 version = "0.11.0"; 13 disabled = isPy27; # scikit-learn>=0.21 doesn't work on python2 14 15 src = fetchPypi { 16 inherit pname version; 17 hash = "sha256-dYKuiFjm2wuS/vl90IZgoYKX7hKNeMKr3ABri9hrj9w="; 18 }; 19 20 propagatedBuildInputs = [ scikit-learn ]; 21 nativeCheckInputs = [ pytestCheckHook pandas ]; 22 preCheck = '' 23 export HOME=$TMPDIR 24 ''; 25 disabledTests = [ 26 "estimator" 27 "classification" 28 "_generator" 29 "show_versions" 30 "test_make_imbalanced_iris" 31 "test_rusboost[SAMME.R]" 32 33 # https://github.com/scikit-learn-contrib/imbalanced-learn/issues/824 34 "ValueDifferenceMetric" 35 ]; 36 37 meta = with lib; { 38 description = "Library offering a number of re-sampling techniques commonly used in datasets showing strong between-class imbalance"; 39 homepage = "https://github.com/scikit-learn-contrib/imbalanced-learn"; 40 license = licenses.mit; 41 maintainers = [ maintainers.rmcgibbo ]; 42 }; 43}