2021-03-23 19:22:30 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPy27
|
2020-04-24 23:36:52 +00:00
|
|
|
, pandas
|
2021-01-05 17:05:55 +00:00
|
|
|
, pytestCheckHook
|
2021-05-20 23:08:51 +00:00
|
|
|
, scikit-learn
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "imbalanced-learn";
|
2021-10-01 09:20:50 +00:00
|
|
|
version = "0.8.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
disabled = isPy27; # scikit-learn>=0.21 doesn't work on python2
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-10-01 09:20:50 +00:00
|
|
|
sha256 = "eaf576b1ba3523a0facf3aaa483ca17e326301e53e7678c54d73b7e0250edd43";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
propagatedBuildInputs = [ scikit-learn ];
|
2021-01-05 17:05:55 +00:00
|
|
|
checkInputs = [ pytestCheckHook pandas ];
|
|
|
|
preCheck = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
export HOME=$TMPDIR
|
|
|
|
'';
|
2021-01-05 17:05:55 +00:00
|
|
|
disabledTests = [
|
|
|
|
"estimator"
|
|
|
|
"classification"
|
|
|
|
"_generator"
|
|
|
|
"show_versions"
|
|
|
|
"test_make_imbalanced_iris"
|
2021-02-17 17:02:09 +00:00
|
|
|
"test_rusboost[SAMME.R]"
|
2021-03-23 19:22:30 +00:00
|
|
|
|
|
|
|
# https://github.com/scikit-learn-contrib/imbalanced-learn/issues/824
|
|
|
|
"ValueDifferenceMetric"
|
2021-01-05 17:05:55 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
2021-02-13 14:23:35 +00:00
|
|
|
maintainers = [ maintainers.rmcgibbo ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|