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";
|
2022-01-23 02:10:13 +00:00
|
|
|
version = "0.9.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
disabled = isPy27; # scikit-learn>=0.21 doesn't work on python2
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-01-23 02:10:13 +00:00
|
|
|
sha256 = "836a4c137cc3c10310d4f6cd5ec34600ff488d7f8c243a997c3f9b551c91d0b2";
|
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
|
|
|
};
|
|
|
|
}
|