No project description provided
Project description
PredictionStrength: Prediction Strength for Cluster Validation
Overview
prediction-strength is a Python package designed to implement the concept of Prediction Strength, a score for cluster validation introduced by Robert Tibshirani and Guenther Walther in their seminal paper, "Cluster Validation by Prediction Strength". This package aims to provide a user-friendly and efficient way to apply this powerful score to your clustering solutions, improving your ability to discern the optimal number of clusters and evaluate the stability of your clustering results.
Features
- Efficient computation of Prediction Strength score for various clustering algorithms.
- Flexibility to work with any distance or similarity metric.
- Compatibility with popular data manipulation and analysis libraries like NumPy, Pandas, and Scikit-learn.
- Supports parallel computation for handling large datasets.
Installation
prediction-strength can be installed via pip:
pip install git+git://github.com/HKozubek/PredictionStrength.git#egg=predstr
Quick Start
Here is a simple example of how to use prediction-strength with a k-means clustering algorithm.
from sklearn.cluster import KMeans
from prediction_strength import prediction_strength
# Assume X is your data
kmeans_train = KMeans(n_clusters=3, random_state=0).fit(X_train)
kmeans_test = KMeans(n_clusters=3, random_state=0).fit(X_test)
score = prediction_strength(kmeans_train.predict(X_test), kmeans_test.labels_)
print("Prediction Strength Score: ", score)
Documentation
For a more comprehensive guide on how to use PredStr, please refer to our full documentation.
Contributing
We appreciate all contributions. If you're interested in contributing, please read our contributing guide.
Citation
If you use PredStr in a scientific publication, we would appreciate citations to the following paper:
Tibshirani, R., Walther, G. (2005). Cluster Validation by Prediction Strength. Journal of Computational and Graphical Statistics, 14(3), 511-528.
License
PredStr is distributed under the terms of the MIT License.
Contact
For help and feedback, please feel free to contact the maintainer.
Acknowledgments
The creation of this package would not have been possible without the groundbreaking work of Robert Tibshirani and Guenther Walther.
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 prediction_strength-0.1.0.tar.gz
.
File metadata
- Download URL: prediction_strength-0.1.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.2 Linux/5.10.16.3-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94a2bc2aae22a8e2932930159e451b0161dfdcdd55964fe2156b965e4379c70c |
|
MD5 | 4dcaf8866537abfe3bfb591d19937e31 |
|
BLAKE2b-256 | 63a1ed3f162caddf1d8c46adc4bef29f9ff0508fe4c0ae8881f6bdfea70b07b4 |
File details
Details for the file prediction_strength-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: prediction_strength-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.2 Linux/5.10.16.3-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8995037b215ff97e47143fee45d05043f3fe7a4cbae6e48ad9391512616e03f |
|
MD5 | 4170d172d0dafeaf9a20a484cc05f7e9 |
|
BLAKE2b-256 | dc76703521f8dfce329831a3a7f620c6cdeba08e04874cb5702d9d98c8b36f77 |