rllm.llm.FeatLLMEngineer¶
- class rllm.llm.FeatLLMEngineer(file_path: str, metadata_path: str, task_info_path: str, llm: BaseChatModel | BaseLLM | None = None, *, query_num: int = 5, shots: int = 4, test_size: float | int = 0.2, target_column: str | None = None, seed: int = 0)[source]¶
Bases:
objectA feature engineering class that leverages a language model to generate feature extraction rules and functions based on input data, metadata, and task descriptions.
- df¶
The input dataset loaded from a CSV file.
- Type:
pd.DataFrame
- data_name¶
The name of the dataset (derived from the file name).
- Type:
str
- metadata¶
Metadata information loaded from a JSON file.
- Type:
dict
- task_info¶
Task description loaded from a TXT file.
- Type:
str
- llm¶
The language model used for querying.
- Type:
Union[LC.BaseChatModel, LC.BaseLLM]
- query_num¶
Number of queries to generate for the language model.
- Type:
int
- shots¶
Number of examples to use for few-shot learning.
- Type:
int
- test_size¶
Proportion or number of test samples.
- Type:
Union[float, int]
- target_column¶
The target column in the dataset.
- Type:
str
- seed¶
Random seed for reproducibility.
- Type:
int