feat: iterative LLM feature engineering with fit_selective()#32
Merged
RobertoCorti merged 8 commits intomainfrom Mar 9, 2026
Merged
feat: iterative LLM feature engineering with fit_selective()#32RobertoCorti merged 8 commits intomainfrom
RobertoCorti merged 8 commits intomainfrom
Conversation
…gineering Adds the feedback prompt template used to close the generate→select→refine loop in the upcoming fit_selective() method. The prompt is selector-agnostic and uses raw scores in markdown tables.
Adds multi-turn conversation support to LLMInterface. The method accepts a prompt context, conversation history, and optional feedback context to drive the generate→select→refine loop for fit_selective().
…feedback Adds fit_selective(), _run_selector(), and _build_feedback_context() to LLMFeatureEngineer. The selector is fit on all features (original + new) and a sub-mask is extracted for new features only, so selection reflects each feature's value in full context.
…text, and generate_engineered_features_iterative
… fit_selective example - Add verbose=0/1/2 to LLMFeatureEngineer for fit_selective() progress output - Add sub-step messages in _run_selector (applying transformations, running selector) - Remove BinTransformation (binning.py, imports, tests, docs references) - Add fit_selective() section to tutorial notebook
- Rename generated_features_ideas to generated_features_ideas_ (trailing underscore marks fitted attributes per sklearn convention) - Add skfeaturellm/exceptions.py with custom NotFittedError (inherits ValueError + AttributeError like sklearn) - Add skfeaturellm/utils/validation.py with check_is_fitted(), replacing ad-hoc hasattr checks - Extract _format_dataset_statistics and generate_prompt_context from LLMInterface into skfeaturellm/prompts/utils module - Move feature_evaluator from instance attribute to local variable in evaluate_features
…res_ideas_ directly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
generate_engineered_features_iterative()toLLMInterface— generates feature ideas informed by a previous selection feedback contextSELECTION_FEEDBACK_PROMPTto guide the LLM with feedback on which prior features were selected/rejectedfit_selective()toLLMFeatureEngineer— runs multiple generate → evaluate → select → feedback rounds automatically, with an optionalverboseflaggenerated_features_ideas_(trailing underscore) and remove the redundantgenerated_featuresintermediate attributefit_selective,_run_selector,_build_feedback_context, andgenerate_engineered_features_iterativefit_selective()exampleNotes
bindiscretization transformation is removed from docs/examples (was never fully supported)generated_features_ideas_is now the single source of truth for fitted ideas, replacing the oldgenerated_featuresfiltered list