diff options
Diffstat (limited to 'gnu/packages/python-science.scm')
| -rw-r--r-- | gnu/packages/python-science.scm | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index d2c4caac3a1..6fce8d23192 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | ;;; Copyright © 2021 Greg Hogan <code@greghogan.com> | 13 | ;;; Copyright © 2021 Greg Hogan <code@greghogan.com> |
| 14 | ;;; Copyright © 2021 Roel Janssen <roel@gnu.org> | 14 | ;;; Copyright © 2021 Roel Janssen <roel@gnu.org> |
| 15 | ;;; Copyright © 2021 Paul Garlick <pgarlick@tourbillion-technology.com> | 15 | ;;; Copyright © 2021 Paul Garlick <pgarlick@tourbillion-technology.com> |
| 16 | ;;; Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net> | ||
| 16 | ;;; | 17 | ;;; |
| 17 | ;;; This file is part of GNU Guix. | 18 | ;;; This file is part of GNU Guix. |
| 18 | ;;; | 19 | ;;; |
| @@ -36,6 +37,7 @@ | |||
| 36 | #:use-module (gnu packages check) | 37 | #:use-module (gnu packages check) |
| 37 | #:use-module (gnu packages gcc) | 38 | #:use-module (gnu packages gcc) |
| 38 | #:use-module (gnu packages image-processing) | 39 | #:use-module (gnu packages image-processing) |
| 40 | #:use-module (gnu packages machine-learning) | ||
| 39 | #:use-module (gnu packages maths) | 41 | #:use-module (gnu packages maths) |
| 40 | #:use-module (gnu packages mpi) | 42 | #:use-module (gnu packages mpi) |
| 41 | #:use-module (gnu packages perl) | 43 | #:use-module (gnu packages perl) |
| @@ -47,6 +49,7 @@ | |||
| 47 | #:use-module (gnu packages python-xyz) | 49 | #:use-module (gnu packages python-xyz) |
| 48 | #:use-module (gnu packages simulation) | 50 | #:use-module (gnu packages simulation) |
| 49 | #:use-module (gnu packages sphinx) | 51 | #:use-module (gnu packages sphinx) |
| 52 | #:use-module (gnu packages statistics) | ||
| 50 | #:use-module (gnu packages time) | 53 | #:use-module (gnu packages time) |
| 51 | #:use-module (gnu packages xdisorg) | 54 | #:use-module (gnu packages xdisorg) |
| 52 | #:use-module (gnu packages xml) | 55 | #:use-module (gnu packages xml) |
| @@ -733,3 +736,102 @@ dependencies.") | |||
| 733 | license:silofl1.1 | 736 | license:silofl1.1 |
| 734 | license:cc0 | 737 | license:cc0 |
| 735 | license:public-domain)))) | 738 | license:public-domain)))) |
| 739 | |||
| 740 | (define-public python-pandas-flavor | ||
| 741 | (package | ||
| 742 | (name "python-pandas-flavor") | ||
| 743 | (version "0.2.0") | ||
| 744 | (source | ||
| 745 | (origin | ||
| 746 | (method url-fetch) | ||
| 747 | (uri (pypi-uri "pandas_flavor" version)) | ||
| 748 | (sha256 | ||
| 749 | (base32 | ||
| 750 | "12g4av8gpl6l83yza3h97j3f2jblqv69frlidrvdq8ny2rc6awbq")))) | ||
| 751 | (build-system python-build-system) | ||
| 752 | (propagated-inputs | ||
| 753 | `(("python-pandas" ,python-pandas) | ||
| 754 | ("python-xarray" ,python-xarray))) | ||
| 755 | (home-page "https://github.com/Zsailer/pandas_flavor") | ||
| 756 | (synopsis "Write your own flavor of Pandas") | ||
| 757 | (description "Pandas 0.23 added a simple API for registering accessors | ||
| 758 | with Pandas objects. Pandas-flavor extends Pandas' extension API by | ||
| 759 | |||
| 760 | @itemize | ||
| 761 | @item adding support for registering methods as well | ||
| 762 | @item making each of these functions backwards compatible with older versions | ||
| 763 | of Pandas | ||
| 764 | @end itemize") | ||
| 765 | (license license:expat))) | ||
| 766 | |||
| 767 | (define-public python-pingouin | ||
| 768 | (package | ||
| 769 | (name "python-pingouin") | ||
| 770 | (version "0.3.12") | ||
| 771 | (source | ||
| 772 | ;; The PyPI tarball does not contain the tests. | ||
| 773 | (origin | ||
| 774 | (method git-fetch) | ||
| 775 | (uri (git-reference | ||
| 776 | (url "https://github.com/raphaelvallat/pingouin") | ||
| 777 | (commit (string-append "v" version)))) | ||
| 778 | (file-name (git-file-name name version)) | ||
| 779 | (sha256 | ||
| 780 | (base32 | ||
| 781 | "1ap29x54kdr19vi8qxj9g6cz2r1q4f0z7dcf6g77zwav7hf7r61a")))) | ||
| 782 | (build-system python-build-system) | ||
| 783 | (arguments | ||
| 784 | `(#:phases | ||
| 785 | (modify-phases %standard-phases | ||
| 786 | ;; On loading, Pingouin uses the outdated package to check if a newer | ||
| 787 | ;; version is available on PyPI. This check adds an extra dependency | ||
| 788 | ;; and is irrelevant to Guix users. So, disable it. | ||
| 789 | (add-after 'unpack 'remove-outdated-check | ||
| 790 | (lambda _ | ||
| 791 | (substitute* "setup.py" | ||
| 792 | (("'outdated',") "")) | ||
| 793 | (substitute* "pingouin/__init__.py" | ||
| 794 | (("^from outdated[^\n]*") "") | ||
| 795 | (("^warn_if_outdated[^\n]*") "")))) | ||
| 796 | (replace 'check | ||
| 797 | (lambda* (#:key tests? #:allow-other-keys) | ||
| 798 | (when tests? | ||
| 799 | (invoke "pytest"))))))) | ||
| 800 | (native-inputs | ||
| 801 | `(("python-pytest" ,python-pytest) | ||
| 802 | ("python-pytest-cov" ,python-pytest-cov))) | ||
| 803 | (propagated-inputs | ||
| 804 | `(("python-matplotlib" ,python-matplotlib) | ||
| 805 | ("python-mpmath" ,python-mpmath) | ||
| 806 | ("python-numpy" ,python-numpy) | ||
| 807 | ("python-pandas" ,python-pandas) | ||
| 808 | ("python-pandas-flavor" ,python-pandas-flavor) | ||
| 809 | ("python-scikit-learn" ,python-scikit-learn) | ||
| 810 | ("python-scipy" ,python-scipy) | ||
| 811 | ("python-seaborn" ,python-seaborn) | ||
| 812 | ("python-statsmodels" ,python-statsmodels) | ||
| 813 | ("python-tabulate" ,python-tabulate))) | ||
| 814 | (home-page "https://pingouin-stats.org/") | ||
| 815 | (synopsis "Statistical package for Python") | ||
| 816 | (description "Pingouin is a statistical package written in Python 3 and | ||
| 817 | based mostly on Pandas and NumPy. Its features include | ||
| 818 | |||
| 819 | @itemize | ||
| 820 | @item ANOVAs: N-ways, repeated measures, mixed, ancova | ||
| 821 | @item Pairwise post-hocs tests (parametric and non-parametric) and pairwise | ||
| 822 | correlations | ||
| 823 | @item Robust, partial, distance and repeated measures correlations | ||
| 824 | @item Linear/logistic regression and mediation analysis | ||
| 825 | @item Bayes Factors | ||
| 826 | @item Multivariate tests | ||
| 827 | @item Reliability and consistency | ||
| 828 | @item Effect sizes and power analysis | ||
| 829 | @item Parametric/bootstrapped confidence intervals around an effect size or a | ||
| 830 | correlation coefficient | ||
| 831 | @item Circular statistics | ||
| 832 | @item Chi-squared tests | ||
| 833 | @item Plotting: Bland-Altman plot, Q-Q plot, paired plot, robust correlation, | ||
| 834 | and more | ||
| 835 | @end itemize") | ||
| 836 | (license license:gpl3))) | ||
| 837 | |||
