%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
[](https://travis-ci.com/lachhebo/pyclustertend) [](https://pypi.org/project/pyclustertend/) [](https://pyclustertend.readthedocs.io/en/master/) [](https://pepy.tech/project/pyclustertend) [](https://codecov.io/gh/lachhebo/pyclustertend)
[](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
[](https://travis-ci.com/lachhebo/pyclustertend) [](https://pypi.org/project/pyclustertend/) [](https://pyclustertend.readthedocs.io/en/master/) [](https://pepy.tech/project/pyclustertend) [](https://codecov.io/gh/lachhebo/pyclustertend)
[](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
[](https://travis-ci.com/lachhebo/pyclustertend) [](https://pypi.org/project/pyclustertend/) [](https://pyclustertend.readthedocs.io/en/master/) [](https://pepy.tech/project/pyclustertend) [](https://codecov.io/gh/lachhebo/pyclustertend)
[](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