Skip to main content

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)

Source distribution for nomoselect 0.2.0
File Size Uploaded
nomoselect-0.2.0.tar.gz 26.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nomoselect 0.2.0
File Interpreter ABI Platform
nomoselect-0.2.0-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page