%global _empty_manifest_terminate_build 0 Name: python-momentum Version: 0.2.7 Release: 1 Summary: Running estimates of moments License: MIT URL: https://github.com/microprediction/momentum Source0: https://mirrors.nju.edu.cn/pypi/web/packages/9d/7c/1f52beeb73b440ecd2cdccf1898e8dbc0e796af158a890e95ddfa585f49f/momentum-0.2.7.tar.gz BuildArch: noarch Requires: python3-wheel %description # momentum ![tests](https://github.com/microprediction/momentum/workflows/tests/badge.svg) ![deploy](https://github.com/microprediction/momentum/workflows/deploy/badge.svg) A trivial mini-package for computing the running univariate mean, variance, kurtosis and skew - No dependencies ... not even numpy. - No classes ... unless you want them. - State is a dict, for trivial serialization. - Tested against scipy, creme, statistics For multivariate covariance updating, maybe see [precise](https://github.com/microprediction/precise). ### Install pip install momentum ### Usage: running mean, var from momentum import var_init, var_update from pprint import pprint m = var_init() for x in [5,3,2.4,1.0,5.0]: m = var_update(m,x) pprint(m) ### Usage: running mean, var, kurtosis and skew from momentum import kurtosis_init, kurtosis_update m = kurtosis_init() for x in [5,3,2.4,1.0,5.0]: m = kurtosis_update(m,x) pprint(m) File an issue if you need more help using this. ### Usage: running recency-weighted mean, var from momentum import rvar_init, rvar_update from pprint import pprint m = rvar_init(rho=0.01,n=15) for x in [5,3,2.4,1.0,5.0]: m = rvar_update(m,x) pprint(m) This will switch from running variance to a weighted variance after 15 data points. %package -n python3-momentum Summary: Running estimates of moments Provides: python-momentum BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-momentum # momentum ![tests](https://github.com/microprediction/momentum/workflows/tests/badge.svg) ![deploy](https://github.com/microprediction/momentum/workflows/deploy/badge.svg) A trivial mini-package for computing the running univariate mean, variance, kurtosis and skew - No dependencies ... not even numpy. - No classes ... unless you want them. - State is a dict, for trivial serialization. - Tested against scipy, creme, statistics For multivariate covariance updating, maybe see [precise](https://github.com/microprediction/precise). ### Install pip install momentum ### Usage: running mean, var from momentum import var_init, var_update from pprint import pprint m = var_init() for x in [5,3,2.4,1.0,5.0]: m = var_update(m,x) pprint(m) ### Usage: running mean, var, kurtosis and skew from momentum import kurtosis_init, kurtosis_update m = kurtosis_init() for x in [5,3,2.4,1.0,5.0]: m = kurtosis_update(m,x) pprint(m) File an issue if you need more help using this. ### Usage: running recency-weighted mean, var from momentum import rvar_init, rvar_update from pprint import pprint m = rvar_init(rho=0.01,n=15) for x in [5,3,2.4,1.0,5.0]: m = rvar_update(m,x) pprint(m) This will switch from running variance to a weighted variance after 15 data points. %package help Summary: Development documents and examples for momentum Provides: python3-momentum-doc %description help # momentum ![tests](https://github.com/microprediction/momentum/workflows/tests/badge.svg) ![deploy](https://github.com/microprediction/momentum/workflows/deploy/badge.svg) A trivial mini-package for computing the running univariate mean, variance, kurtosis and skew - No dependencies ... not even numpy. - No classes ... unless you want them. - State is a dict, for trivial serialization. - Tested against scipy, creme, statistics For multivariate covariance updating, maybe see [precise](https://github.com/microprediction/precise). ### Install pip install momentum ### Usage: running mean, var from momentum import var_init, var_update from pprint import pprint m = var_init() for x in [5,3,2.4,1.0,5.0]: m = var_update(m,x) pprint(m) ### Usage: running mean, var, kurtosis and skew from momentum import kurtosis_init, kurtosis_update m = kurtosis_init() for x in [5,3,2.4,1.0,5.0]: m = kurtosis_update(m,x) pprint(m) File an issue if you need more help using this. ### Usage: running recency-weighted mean, var from momentum import rvar_init, rvar_update from pprint import pprint m = rvar_init(rho=0.01,n=15) for x in [5,3,2.4,1.0,5.0]: m = rvar_update(m,x) pprint(m) This will switch from running variance to a weighted variance after 15 data points. %prep %autosetup -n momentum-0.2.7 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-momentum -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Thu May 18 2023 Python_Bot - 0.2.7-1 - Package Spec generated