Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Agentic Feature Selector

An autonomous agent loop for feature subset selection. Inspired by work done at INADS, Inc., where a similar RL + evolutionary approach was used to automate dataset and feature selection for downstream fine-tuning regression tasks on fMRI biomarker data — removing human trial-and-error from the ML pipeline.

The pattern

This implements the auto-research loop: a self-improving agent that iterates against a metric, keeps what works, discards what doesn't, and converges without human intervention.

seed population → evaluate (parallel) → rank → keep survivors → mutate → repeat

Each round, agents evaluate candidate feature subsets concurrently using a thread pool. The loop selects survivors, breeds a new generation through mutation, and stops when improvement drops below a threshold or the round limit is reached.

Usage

from agent import run, Config

result = run(
    features=["age", "bmi", "glucose", "insulin", "bp"],
    evaluate=your_scoring_function,   # frozenset[str] → float
    config=Config(population_size=8, max_rounds=10),
)

print(result.best_features)  # optimal subset found
print(result.best_score)
print(result.history)        # per-round trace

The evaluate function is the only thing you supply — the agent handles everything else.

Demo

python agent.py

Runs against a synthetic regression problem with a known optimal feature subset. Typically converges in 5–8 rounds.

Why this matters for agentic systems

Feature/dataset selection is one of the highest-leverage places to remove humans from the ML loop. Automating it as an agent — rather than a grid search script — means it can be composed into larger pipelines, handed context from upstream agents, and report results to downstream consumers without synchronous human review.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages