TRUST-GFS feature selection for tabular classification
Project description
trustgfs
trustgfs packages the TRUST-GFS feature selector for tabular classification.
It supports two input modes:
-
fit(X_train, y_train)- the package creates an outer train/validation split internally
- then runs TRUST-GFS on the recombined outer split, matching the locked script behavior
-
fit(X_train, y_train, X_val, y_val)- the package directly combines train and validation
- then runs TRUST-GFS on that combined data
The implementation preserves the locked TRUST-GFS-only logic, including:
- Stage 1 bootstrap evidence scoring
- null-threshold zoning into Strong / Mid / Weak
- Soft-Weak rescue against Strong anchors
- Stage 2 occlusion energy/support analysis
- feasible add-on pool selection
- genetic search over add-on subsets
- final selected subset output
Installation
Local editable install
pip install -e .
From GitHub later
pip install "trustgfs @ git+https://github.com/YOUR_USERNAME/trustgfs.git"
From PyPI later
pip install trustgfs
Quick usage
from trustgfs import TRUSTGFSSelector
selector = TRUSTGFSSelector(feature_names=feature_names)
selector.fit(X_train, y_train)
print(selector.selected_features_)
X_selected = selector.transform(X_train)
With explicit validation data:
from trustgfs import TRUSTGFSSelector
selector = TRUSTGFSSelector(feature_names=feature_names)
selector.fit(X_train, y_train, X_val=X_val, y_val=y_val)
print(selector.selected_features_)
Convenience function
from trustgfs import run_trust_gfs
selected_idx, info = run_trust_gfs(
X_train=X_train,
y_train=y_train,
feature_names=feature_names,
)
This prints only:
TRUST_GFS_STAGE1_FLOW_COUNTSTRUST_GFS_STAGE1_GROUP_FEATURESTRUST_GFS_FINAL_SELECTED_FEATURES
Notes
- For exact old TRUST-GFS behavior,
yshould already be integer-encoded as0..C-1. transform()returns the selected columns from the given matrix.- The package does not include the older benchmark feature selectors or model-comparison loop.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file trustgfs-0.1.0.tar.gz.
File metadata
- Download URL: trustgfs-0.1.0.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a516fbb6bee646efb45fd245609a7a81118a8ad9b62566df59ccd7a70e8843b
|
|
| MD5 |
138ed50c0011f0f173d575bd7b08a03f
|
|
| BLAKE2b-256 |
6162c71891f78abbffcefa305e4109437d749f7a7de8e4188db0d4658a90889c
|
File details
Details for the file trustgfs-0.1.0-py3-none-any.whl.
File metadata
- Download URL: trustgfs-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f2d46e597c78ba256d02281c2b3c3beb3f81cf9fd42824e090fab01bb369adb
|
|
| MD5 |
d814590f5fe3989dfc1ed834b05488e1
|
|
| BLAKE2b-256 |
34d6c892695f249c21526126c9539781281137d7cdf1b0830b90d1d4c8fcf80a
|