From 32d481188e3cd13fad03647522b350109a96948c Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Fri, 5 May 2023 12:20:10 +0000 Subject: automatic import of python-pyclustertend --- .gitignore | 1 + python-pyclustertend.spec | 284 ++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 286 insertions(+) create mode 100644 python-pyclustertend.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..d9df690 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/pyclustertend-1.8.2.tar.gz diff --git a/python-pyclustertend.spec b/python-pyclustertend.spec new file mode 100644 index 0000000..0e9cbbf --- /dev/null +++ b/python-pyclustertend.spec @@ -0,0 +1,284 @@ +%global _empty_manifest_terminate_build 0 +Name: python-pyclustertend +Version: 1.8.2 +Release: 1 +Summary: A package to assess cluster tendency for unsupervised learning +License: BSD-3-Clause +URL: https://github.com/lachhebo/pyclustertend +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/04/a5/0d0043f93d9d499c720866e9eba068da9d76ca9d519a22fd008913abf74e/pyclustertend-1.8.2.tar.gz +BuildArch: noarch + +Requires: python3-scikit-learn +Requires: python3-matplotlib +Requires: python3-numpy +Requires: python3-pandas +Requires: python3-numba + +%description +# pyclustertend + + + + + + +[![Build Status](https://travis-ci.com/lachhebo/pyclustertend.svg?branch=master)](https://travis-ci.com/lachhebo/pyclustertend) [![PyPi Status](https://img.shields.io/pypi/v/pyclustertend.svg?color=brightgreen)](https://pypi.org/project/pyclustertend/) [![Documentation Status](https://readthedocs.org/projects/pyclustertend/badge/?version=master)](https://pyclustertend.readthedocs.io/en/master/) [![Downloads](https://pepy.tech/badge/pyclustertend)](https://pepy.tech/project/pyclustertend) [![codecov](https://codecov.io/gh/lachhebo/pyclustertend/branch/master/graph/badge.svg)](https://codecov.io/gh/lachhebo/pyclustertend) +[![DOI](https://zenodo.org/badge/187477036.svg)](https://zenodo.org/badge/latestdoi/187477036) + +pyclustertend is a python package specialized in cluster tendency. Cluster tendency consist to assess if clustering algorithms are relevant for a dataset. + +Three methods for assessing cluster tendency are currently implemented and one additional method based on metrics obtained with a KMeans estimator : + + + +- [x] Hopkins Statistics +- [x] VAT +- [x] iVAT + +- [x] Metric based method (silhouette, calinksi, davies bouldin) + +## Installation + +```shell + pip install pyclustertend +``` + +## Usage + +### Example Hopkins + +```python + >>>from sklearn import datasets + >>>from pyclustertend import hopkins + >>>from sklearn.preprocessing import scale + >>>X = scale(datasets.load_iris().data) + >>>hopkins(X,150) + 0.18950453452838564 +``` + +### Example VAT + +```python + >>>from sklearn import datasets + >>>from pyclustertend import vat + >>>from sklearn.preprocessing import scale + >>>X = scale(datasets.load_iris().data) + >>>vat(X) +``` + + + +### Example iVat + +```python + >>>from sklearn import datasets + >>>from pyclustertend import ivat + >>>from sklearn.preprocessing import scale + >>>X = scale(datasets.load_iris().data) + >>>ivat(X) +``` + + + +## Notes + +It's preferable to scale the data before using hopkins or vat algorithm as they use distance between observations. Moreover, vat and ivat algorithms +do not really fit to massive databases. A first solution is to sample the data before using those algorithms. + + +%package -n python3-pyclustertend +Summary: A package to assess cluster tendency for unsupervised learning +Provides: python-pyclustertend +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-pyclustertend +# pyclustertend + + + + + + +[![Build Status](https://travis-ci.com/lachhebo/pyclustertend.svg?branch=master)](https://travis-ci.com/lachhebo/pyclustertend) [![PyPi Status](https://img.shields.io/pypi/v/pyclustertend.svg?color=brightgreen)](https://pypi.org/project/pyclustertend/) [![Documentation Status](https://readthedocs.org/projects/pyclustertend/badge/?version=master)](https://pyclustertend.readthedocs.io/en/master/) [![Downloads](https://pepy.tech/badge/pyclustertend)](https://pepy.tech/project/pyclustertend) [![codecov](https://codecov.io/gh/lachhebo/pyclustertend/branch/master/graph/badge.svg)](https://codecov.io/gh/lachhebo/pyclustertend) +[![DOI](https://zenodo.org/badge/187477036.svg)](https://zenodo.org/badge/latestdoi/187477036) + +pyclustertend is a python package specialized in cluster tendency. Cluster tendency consist to assess if clustering algorithms are relevant for a dataset. + +Three methods for assessing cluster tendency are currently implemented and one additional method based on metrics obtained with a KMeans estimator : + + + +- [x] Hopkins Statistics +- [x] VAT +- [x] iVAT + +- [x] Metric based method (silhouette, calinksi, davies bouldin) + +## Installation + +```shell + pip install pyclustertend +``` + +## Usage + +### Example Hopkins + +```python + >>>from sklearn import datasets + >>>from pyclustertend import hopkins + >>>from sklearn.preprocessing import scale + >>>X = scale(datasets.load_iris().data) + >>>hopkins(X,150) + 0.18950453452838564 +``` + +### Example VAT + +```python + >>>from sklearn import datasets + >>>from pyclustertend import vat + >>>from sklearn.preprocessing import scale + >>>X = scale(datasets.load_iris().data) + >>>vat(X) +``` + + + +### Example iVat + +```python + >>>from sklearn import datasets + >>>from pyclustertend import ivat + >>>from sklearn.preprocessing import scale + >>>X = scale(datasets.load_iris().data) + >>>ivat(X) +``` + + + +## Notes + +It's preferable to scale the data before using hopkins or vat algorithm as they use distance between observations. Moreover, vat and ivat algorithms +do not really fit to massive databases. A first solution is to sample the data before using those algorithms. + + +%package help +Summary: Development documents and examples for pyclustertend +Provides: python3-pyclustertend-doc +%description help +# pyclustertend + + + + + + +[![Build Status](https://travis-ci.com/lachhebo/pyclustertend.svg?branch=master)](https://travis-ci.com/lachhebo/pyclustertend) [![PyPi Status](https://img.shields.io/pypi/v/pyclustertend.svg?color=brightgreen)](https://pypi.org/project/pyclustertend/) [![Documentation Status](https://readthedocs.org/projects/pyclustertend/badge/?version=master)](https://pyclustertend.readthedocs.io/en/master/) [![Downloads](https://pepy.tech/badge/pyclustertend)](https://pepy.tech/project/pyclustertend) [![codecov](https://codecov.io/gh/lachhebo/pyclustertend/branch/master/graph/badge.svg)](https://codecov.io/gh/lachhebo/pyclustertend) +[![DOI](https://zenodo.org/badge/187477036.svg)](https://zenodo.org/badge/latestdoi/187477036) + +pyclustertend is a python package specialized in cluster tendency. Cluster tendency consist to assess if clustering algorithms are relevant for a dataset. + +Three methods for assessing cluster tendency are currently implemented and one additional method based on metrics obtained with a KMeans estimator : + + + +- [x] Hopkins Statistics +- [x] VAT +- [x] iVAT + +- [x] Metric based method (silhouette, calinksi, davies bouldin) + +## Installation + +```shell + pip install pyclustertend +``` + +## Usage + +### Example Hopkins + +```python + >>>from sklearn import datasets + >>>from pyclustertend import hopkins + >>>from sklearn.preprocessing import scale + >>>X = scale(datasets.load_iris().data) + >>>hopkins(X,150) + 0.18950453452838564 +``` + +### Example VAT + +```python + >>>from sklearn import datasets + >>>from pyclustertend import vat + >>>from sklearn.preprocessing import scale + >>>X = scale(datasets.load_iris().data) + >>>vat(X) +``` + + + +### Example iVat + +```python + >>>from sklearn import datasets + >>>from pyclustertend import ivat + >>>from sklearn.preprocessing import scale + >>>X = scale(datasets.load_iris().data) + >>>ivat(X) +``` + + + +## Notes + +It's preferable to scale the data before using hopkins or vat algorithm as they use distance between observations. Moreover, vat and ivat algorithms +do not really fit to massive databases. A first solution is to sample the data before using those algorithms. + + +%prep +%autosetup -n pyclustertend-1.8.2 + +%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-pyclustertend -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Fri May 05 2023 Python_Bot - 1.8.2-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..4763c4c --- /dev/null +++ b/sources @@ -0,0 +1 @@ +d6fd5a693c8a5be8d99444cf63c39d9c pyclustertend-1.8.2.tar.gz -- cgit v1.2.3