nomoselect
Task-aware dimensionality reduction with exact diagnostics.
PCA keeps what is biggest. nomoselect keeps what matters.
Documentation: docs.nomogenetics.com/nomoselect
What it does
nomoselect finds the lowest-dimensional view of your data that preserves the structure you actually care about. It tells you exactly what was kept and what was lost — not as a heuristic, but as an exact certificate.
Install
pip install nomoselect
Requires Python >= 3.10, numpy, scikit-learn, and nomogeo >= 0.4.0.
Quickstart
from sklearn.datasets import load_iris
from nomoselect import GeometricSubspaceSelector, ObserverReport
X, y = load_iris(return_X_y=True)
# Fit: 2 dimensions, preserving class separation
sel = GeometricSubspaceSelector(n_components=2, task="fisher")
X_proj = sel.fit_transform(X, y)
# Diagnostics: what was kept?
report = ObserverReport.from_selector(sel)
print(report.summary())
Output:
nomoselect report (2 dimensions kept)
Target structure retained : 100.0%
Target structure lost : 0.0%
Per-class retention:
0 retained 100.0% (weight=0.333)
1 retained 100.0% (weight=0.333)
2 retained 100.0% (weight=0.333)
Note: these diagnostics are exact for the task you
declared. They do not prove the task itself is valid.
Cross-validation or permutation tests are still needed
to confirm that the structure is real.
Task families
nomoselect supports multiple ways to declare what structure matters:
| Task | What it preserves | When to use |
|---|---|---|
"fisher" |
Sample-weighted class separation | Default; equivalent to Fisher/LDA |
"equal_weight" |
Equal importance per class | Unbalanced class sizes |
"minority" |
Inverse-frequency weighting | Rare-class detection |
"pairwise" |
Every class pair equally | Fine-grained separation |
Results
Task-aware observer beats PCA consistently:
| Dataset | Advantage over PCA |
|---|---|
| Iris | +0.32 |
| Wine | +1.00 (maximum possible) |
| Breast Cancer | +0.15 |
| Digits | +0.09 |
The biggest gains appear when variance and task structure point in different directions. On well-separated data where PCA already aligns with the class boundary, both methods agree.
Beyond selection: diagnostics
from nomoselect import RegularisationAudit, DimensionCostLadder
# Is my result stable across regularisation choices?
audit = RegularisationAudit.run(X, y, n_components=2)
print(audit.summary())
# How many dimensions do I actually need?
ladder = DimensionCostLadder.build(X, y)
print(ladder.summary())
How it relates to PCA and LDA
nomoselect includes Fisher/LDA as a special case. When task="fisher" and regularisation is matched, it recovers the same subspace as sklearn's LinearDiscriminantAnalysis. The difference is that nomoselect:
- tells you exactly how much target structure each dimension captures
- lets you declare alternative tasks (equal-weight, minority, pairwise)
- provides exact certificates for what was kept and what leaked
- gives you a task-aware rank selection diagram instead of a scree plot
For high-dimensional data (features >> samples), apply PCA pre-reduction first, then nomoselect.
License
BSD-3-Clause. See LICENSE.
Metadata
Release files for nomoselect 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nomoselect-0.2.0.tar.gz | 26.5 kB | Without provenance | Details for nomoselect-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nomoselect-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for nomoselect-0.2.0-py3-none-any.whl |
Total release size: 48.2 kB
Release files / nomoselect-0.2.0.tar.gz
| Download URL | nomoselect-0.2.0.tar.gz |
|---|---|
| Size | 26.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0d46003deafc9962ae4572240a0c6dc877bb6916980d35f90626183d10093cdb
|
|
BLAKE2b-256 checksum How to use checksums |
f60aafeb3e2c15b89385700e1de481ea448d79722f0f560649b0036b6858c2a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Release files / nomoselect-0.2.0-py3-none-any.whl
| Download URL | nomoselect-0.2.0-py3-none-any.whl |
|---|---|
| Size | 21.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8c00ea6b9cb3c62e90cab75d024ef06917300066e145739b16805bdd5cb7211a
|
|
BLAKE2b-256 checksum How to use checksums |
008dda58c4315502729026c09e2351ae2918222d402c850b723b299350c28360
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Security for nomoselect 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.