Skip to main content

Estimate the optimal number of components or clusters.

Project description

Module of functions for estimating the optimal number of components or clusters.

PCA

Selects the number of components based on comparing eigenvectors between split-halves of the data. I.e., this doesn't use the shape of the eigenvalue curve, but makes a split between components with high versus low split-half similarity.

Usage:

O = teg_get_best_n.get_n_components(X)

This returns a dictionary with the estimated number of components in O['nComponents'], as well as the eigenvalues (O['eigenvalues']) and eigenvectors (O['eigenvectors']).

The file example.py contains tests with simulated data to check how well the true number of latent variables is recovered.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

teg_get_best_n-0.0.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

teg_get_best_n-0.0.1-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file teg_get_best_n-0.0.1.tar.gz.

File metadata

  • Download URL: teg_get_best_n-0.0.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.5

File hashes

Hashes for teg_get_best_n-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ccf17a1d771ccbf4f14c88c978289acb0308acc1309a1dc4a5a7f576fe58afa2
MD5 a1632945428a883ad2a4a82cf4a6ce27
BLAKE2b-256 8e237d4bf57783254bf01e53eb80c0bf2f36b41570d0ff62c059ee94b4d87ab5

See more details on using hashes here.

File details

Details for the file teg_get_best_n-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for teg_get_best_n-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c72d5f8902d78f51b47aa339dbed46ab06df22381d69e5b6fc1e3256b626edd5
MD5 e3653f0a3964fb73908fc4ea379078cd
BLAKE2b-256 5199ff6eea65a5c34a90c252b8feff4cc40ffcf803022d9243500fd76bc32cb8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page