Sundar-Tibshirani Gap Statistic for cluster analysis
Project description
Sundar-Tibshirani Gap Statistic Package
This package implements the
Sundar-Tibshirani Gap Statistic when the Cluster Labels are specified.
Installation
- Clone the repository:
git clone https://github.com/pvsundar/sundar_gap_stat.git
- Navigate to the package directory:
cd sundar_gap_stat
- Install the package and its dependencies:
pip install .
Alternatively, you can install directly from the GitHub repository:
pip install git+https://github.com/pvsundar/sundar_gap_stat.git
Usage Example
Here’s a basic example of how to use the package with the Iris dataset:
from sklearn.datasets import load_iris
from gap_statistic.utils import sundar_tibshirani_gap_statistic_main
from sklearn.datasets import fetch_openml
import numpy as np
X, y = load_iris(return_X_y=True)
sundar_tibshirani_gap_statistic_main(X, y, k=3)
Contributing
Feel free to open an issue or submit a pull request if you'd like to contribute.
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
Acknowledgments
Special thanks to all contributors and the open-source community. in particular to the code by Mavengence who created the package for the Tibshirani Gap Statistic. https://github.com/Mavengence/GapStatistics/blob/main/gapstatistics/gapstatistics.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sundar_gap_stat-1.2.tar.gz
.
File metadata
- Download URL: sundar_gap_stat-1.2.tar.gz
- Upload date:
- Size: 18.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bcc7b8f9b1e7b19261ad2042fa6692141f7714a6319ffedad7621f876c7d9d6 |
|
MD5 | 3e447e61b2b1930b4b69641ae2ee8be3 |
|
BLAKE2b-256 | 0fa6c88981f33c3822df461ab1fb04ce22c3a80de3db8112c1e90ccf55504a29 |
File details
Details for the file sundar_gap_stat-1.2-py3-none-any.whl
.
File metadata
- Download URL: sundar_gap_stat-1.2-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a217296b68da2e42efda350865615972ec6baf800271a2fb342127e00b9209b2 |
|
MD5 | 8c1b7aa5251778cfe40ef36966ec6e31 |
|
BLAKE2b-256 | 2f0e11c300158e7495a03981121841aafabe847b1a4307ad7a0eeb93d6c79ee0 |