semvec/pypi-packages huggingface dataset:
teg-CCC 0.0.3
Estimate the true number of clusters for k-means clustering using the Cluster Consistency Criterion (CCC).
Requires Python: >=3.9

Estimate the true number of clusters for k-means clustering using the Cluster Consistency Criterion (CCC).

This algorithm follows the rationale that true cluster centres should be similar in random split-halves of the data. If too maby clusters are specified, the cluster centres will become driven by random sampling error.

The CCC implements this as follows. For each number of clusters, the data are split into random halves for a given number of splits (e.g., 20). For each split, a k-means cluster analysis is run on each half separately. The distances between most-similar cluster centres are summed. The similarity score is e^(-distance_sum). The mean similarity score over random splits is the score for the given number of clusters.

The best estimate of the true number of clusters is determined by where the improvement in score drops off, which occurs when the number of clusters becomes higher than the true number of clusters.

The file test.py gives an example and simulation script. Usage is:

O = teg_CCC.get_best_k_CCC(X)

where X is a 2D array of shape N_Observations x N_Variables. There is an optional argument for max_n_clusters, set to 10 by default. The output is a dictionary with the estimate of true cluster centres (best_n) as well as the similarity score per number of clusters (scores_per_n) and the associated number of clusters (n_vec).
pysparkplus 0.0.3
Pyspark extra functions!
Requires Python: >=3.9,<4.0

<a href="https://github.com/wiseupdata/wiseupdata">
  <img align="left" alt="Wise Up Data's Instagram" width="22px" src="https://raw.githubusercontent.com/wiseupdata/wiseupdata/main/assets/instagram.png" />   
</a> 
<a href="https://github.com/wiseupdata/wiseupdata">
  <img align="left" alt="wise Up Data's Discord" width="22px" src="https://raw.githubusercontent.com/wiseupdata/wiseupdata/main/assets/discord.png" />
</a>
<a href="https://github.com/wiseupdata/wiseupdata">
  <img align="left" alt="wise Up Data | Twitter" width="22px" src="https://raw.githubusercontent.com/wiseupdata/wiseupdata/main/assets/twitter.png" />
</a>
<a href="https://github.com/wiseupdata/wiseupdata">
  <img align="left" alt="wise Up Data's LinkedIN" width="22px" src="https://raw.githubusercontent.com/wiseupdata/wiseupdata/main/assets/linkedin.png" />
</a>

![visitors](https://visitor-badge.glitch.me/badge?page_id=wiseupdata.pysparkplus&left_color=green&right_color=black)
![license](https://img.shields.io/github/license/wiseupdata/pysparkplus)
[![pypi](https://img.shields.io/pypi/v/pysparkplus?color=green)](https://pypi.python.org/pypi/pysparkplus)
[![downloads](https://pepy.tech/badge/pysparkplus/month)](https://pepy.tech/project/pysparkplus)
[![versions](https://img.shields.io/pypi/pyversions/pysparkplus.svg)](https://github.com/wiseupdata/pysparkplus)

---

<a href="https://github.com/wiseupdata/wiseupdata">
<img align="left" alt="img" src="https://raw.githubusercontent.com/wiseupdata/pysparkplus/main/assets/imgs/pyspark.png" width="300" />
</a>

<h1>
Pyspark extra functions ❤️
</h1>

<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>

[Documentation](https://wiseupdata.github.io/pysparkplus/index.html)  🚀

<br>

## Features ✨️

- Wrapper Class!
- Simple use!
- Made with A.I. contribution 🤖 

<br>
</a>

<br>
<br>
<br>

* [Documentation and examples! ](https://wiseupdata.github.io/pysparkplus/index.html)! 
<br>
<br>


<br>

### Development on go!


<br>

# References 🌍 🗄️

1. [Pyspark+](https://wiseupdata.github.io/pysparkplus/index.html)
1. [Wise Up Data](https://github.com/wiseupdata)
1. [Emojis](https://github.com/wiseupdata/emojis)

<br><br>
---

#### Maintainer 🤗 👨‍💻

Sivio Liborio

📧 silvio.liborio@wiseupdata.com

<a href="https://www.linkedin.com/in/silvio-de-melo-liborio">silvio-de-melo-liborio <img align="left" alt="LinkedIN" width="18px" src="https://raw.githubusercontent.com/wiseupdata/wsl-latest/main/assets/linkedin.svg" />
</a>