2019-07-15 03:48:40 +01:00
|
|
|
{ stdenv, buildPythonPackage, fetchFromGitHub, fetchpatch, numpy, scipy, deap, scikitlearn, python }:
|
2018-06-22 14:38:08 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sklearn-deap";
|
2019-07-15 03:48:40 +01:00
|
|
|
version = "0.2.3";
|
2018-06-22 14:38:08 +01:00
|
|
|
|
|
|
|
# No tests in Pypi
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rsteca";
|
|
|
|
repo = pname;
|
2019-09-09 00:38:31 +01:00
|
|
|
rev = version;
|
2019-07-15 03:48:40 +01:00
|
|
|
sha256 = "1yqnmy8h08i2y6bb2s0a5nx9cwvyg45293whqh420c195gpzg1x3";
|
2018-06-22 14:38:08 +01:00
|
|
|
};
|
|
|
|
|
2019-07-15 03:48:40 +01:00
|
|
|
patches = [
|
|
|
|
# Fix for newer versions of scikit-learn. See: https://github.com/rsteca/sklearn-deap/pull/62
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/rsteca/sklearn-deap/commit/3ae62990fc87f36b59382e7c4db3c74cf99ec3bf.patch";
|
|
|
|
sha256 = "1na6wf4v0dcmyz3pz8aiqkmv76d1iz3hi4iyfq9kfnycgzpv1kxk";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-06-22 14:38:08 +01:00
|
|
|
propagatedBuildInputs = [ numpy scipy deap scikitlearn ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} test.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Use evolutionary algorithms instead of gridsearch in scikit-learn";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/rsteca/sklearn-deap";
|
2018-06-22 14:38:08 +01:00
|
|
|
license = licenses.lgpl3;
|
|
|
|
maintainers = with maintainers; [ psyanticy ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|