about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/imbalanced-learn/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/imbalanced-learn/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/imbalanced-learn/default.nix26
1 files changed, 26 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/imbalanced-learn/default.nix b/nixpkgs/pkgs/development/python-modules/imbalanced-learn/default.nix
new file mode 100644
index 000000000000..9020d2cc12ce
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/imbalanced-learn/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, buildPythonPackage, fetchPypi, scikitlearn, pandas, nose, pytest }:
+
+buildPythonPackage rec {
+  pname = "imbalanced-learn";
+  version = "0.4.3";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "5bd9e86e40ce4001a57426541d7c79b18143cbd181e3330c1a3e5c5c43287083";
+  };
+
+  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;
+  };
+}