diff options
author | CoprDistGit <infra@openeuler.org> | 2023-04-10 13:14:33 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-04-10 13:14:33 +0000 |
commit | 7533269c0d79cc56c9037596b9d9dbd350fe1a38 (patch) | |
tree | 7768f2fe37d676b95549006488c3f94b11210531 | |
parent | 1e512d0c57c5108f2c6eb2cec8632f4965dcab76 (diff) |
automatic import of python-missingpy
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-missingpy.spec | 183 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 185 insertions, 0 deletions
@@ -0,0 +1 @@ +/missingpy-0.2.0.tar.gz diff --git a/python-missingpy.spec b/python-missingpy.spec new file mode 100644 index 0000000..d65311f --- /dev/null +++ b/python-missingpy.spec @@ -0,0 +1,183 @@ +%global _empty_manifest_terminate_build 0 +Name: python-missingpy +Version: 0.2.0 +Release: 1 +Summary: Missing Data Imputation for Python +License: GNU General Public License v3 (GPLv3) +URL: https://github.com/epsilon-machine/missingpy +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/20/ef/2c8b77dc55f0e1af9eb9b01ed220abf3957ae205c7b355951a02783416a0/missingpy-0.2.0.tar.gz +BuildArch: noarch + + +%description + missing_values : integer or "NaN", optional (default = "NaN") + The placeholder for the missing values. All occurrences of + `missing_values` will be imputed. For missing values encoded as + ``np.nan``, use the string value "NaN". + n_neighbors : int, optional (default = 5) + Number of neighboring samples to use for imputation. + weights : str or callable, optional (default = "uniform") + Weight function used in prediction. Possible values: + - 'uniform' : uniform weights. All points in each neighborhood + are weighted equally. + - 'distance' : weight points by the inverse of their distance. + in this case, closer neighbors of a query point will have a + greater influence than neighbors which are further away. + - [callable] : a user-defined function which accepts an + array of distances, and returns an array of the same shape + containing the weights. + metric : str or callable, optional (default = "masked_euclidean") + Distance metric for searching neighbors. Possible values: + - 'masked_euclidean' + - [callable] : a user-defined function which conforms to the + definition of _pairwise_callable(X, Y, metric, **kwds). In other + words, the function accepts two arrays, X and Y, and a + ``missing_values`` keyword in **kwds and returns a scalar distance + value. + row_max_missing : float, optional (default = 0.5) + The maximum fraction of columns (i.e. features) that can be missing + before the sample is excluded from nearest neighbor imputation. It + means that such rows will not be considered a potential donor in + ``fit()``, and in ``transform()`` their missing feature values will be + imputed to be the column mean for the entire dataset. + col_max_missing : float, optional (default = 0.8) + The maximum fraction of rows (or samples) that can be missing + for any feature beyond which an error is raised. + copy : boolean, optional (default = True) + If True, a copy of X will be created. If False, imputation will + be done in-place whenever possible. Note that, if metric is + "masked_euclidean" and copy=False then missing_values in the + input matrix X will be overwritten with zeros. + +%package -n python3-missingpy +Summary: Missing Data Imputation for Python +Provides: python-missingpy +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-missingpy + missing_values : integer or "NaN", optional (default = "NaN") + The placeholder for the missing values. All occurrences of + `missing_values` will be imputed. For missing values encoded as + ``np.nan``, use the string value "NaN". + n_neighbors : int, optional (default = 5) + Number of neighboring samples to use for imputation. + weights : str or callable, optional (default = "uniform") + Weight function used in prediction. Possible values: + - 'uniform' : uniform weights. All points in each neighborhood + are weighted equally. + - 'distance' : weight points by the inverse of their distance. + in this case, closer neighbors of a query point will have a + greater influence than neighbors which are further away. + - [callable] : a user-defined function which accepts an + array of distances, and returns an array of the same shape + containing the weights. + metric : str or callable, optional (default = "masked_euclidean") + Distance metric for searching neighbors. Possible values: + - 'masked_euclidean' + - [callable] : a user-defined function which conforms to the + definition of _pairwise_callable(X, Y, metric, **kwds). In other + words, the function accepts two arrays, X and Y, and a + ``missing_values`` keyword in **kwds and returns a scalar distance + value. + row_max_missing : float, optional (default = 0.5) + The maximum fraction of columns (i.e. features) that can be missing + before the sample is excluded from nearest neighbor imputation. It + means that such rows will not be considered a potential donor in + ``fit()``, and in ``transform()`` their missing feature values will be + imputed to be the column mean for the entire dataset. + col_max_missing : float, optional (default = 0.8) + The maximum fraction of rows (or samples) that can be missing + for any feature beyond which an error is raised. + copy : boolean, optional (default = True) + If True, a copy of X will be created. If False, imputation will + be done in-place whenever possible. Note that, if metric is + "masked_euclidean" and copy=False then missing_values in the + input matrix X will be overwritten with zeros. + +%package help +Summary: Development documents and examples for missingpy +Provides: python3-missingpy-doc +%description help + missing_values : integer or "NaN", optional (default = "NaN") + The placeholder for the missing values. All occurrences of + `missing_values` will be imputed. For missing values encoded as + ``np.nan``, use the string value "NaN". + n_neighbors : int, optional (default = 5) + Number of neighboring samples to use for imputation. + weights : str or callable, optional (default = "uniform") + Weight function used in prediction. Possible values: + - 'uniform' : uniform weights. All points in each neighborhood + are weighted equally. + - 'distance' : weight points by the inverse of their distance. + in this case, closer neighbors of a query point will have a + greater influence than neighbors which are further away. + - [callable] : a user-defined function which accepts an + array of distances, and returns an array of the same shape + containing the weights. + metric : str or callable, optional (default = "masked_euclidean") + Distance metric for searching neighbors. Possible values: + - 'masked_euclidean' + - [callable] : a user-defined function which conforms to the + definition of _pairwise_callable(X, Y, metric, **kwds). In other + words, the function accepts two arrays, X and Y, and a + ``missing_values`` keyword in **kwds and returns a scalar distance + value. + row_max_missing : float, optional (default = 0.5) + The maximum fraction of columns (i.e. features) that can be missing + before the sample is excluded from nearest neighbor imputation. It + means that such rows will not be considered a potential donor in + ``fit()``, and in ``transform()`` their missing feature values will be + imputed to be the column mean for the entire dataset. + col_max_missing : float, optional (default = 0.8) + The maximum fraction of rows (or samples) that can be missing + for any feature beyond which an error is raised. + copy : boolean, optional (default = True) + If True, a copy of X will be created. If False, imputation will + be done in-place whenever possible. Note that, if metric is + "masked_euclidean" and copy=False then missing_values in the + input matrix X will be overwritten with zeros. + +%prep +%autosetup -n missingpy-0.2.0 + +%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-missingpy -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.2.0-1 +- Package Spec generated @@ -0,0 +1 @@ +8ef4daf2e3626f80121308619cb05277 missingpy-0.2.0.tar.gz |