Evaluate the fitness of an individual

evaluate_fitness(
  ind,
  data,
  target_col,
  task = "classification",
  cv_folds = 3,
  evaluation_strategy = "cv",
  split_ids = NULL,
  shared_splits = NULL,
  evaluator = "lightgbm",
  fold_ids = NULL,
  shared_folds = NULL,
  shared_full = NULL,
  state_cache = NULL,
  threads = 8
)

Arguments

ind

An evo_individual object.

data

A data.frame or data.table containing the dataset.

target_col

Name of the target column.

task

"classification" or "regression".

cv_folds

Number of cross-validation folds.

evaluation_strategy

Character string, either "cv" (cross-validation) or "split" (train/validation split).

split_ids

Optional vector of pre-defined split assignments (e.g. "train", "val", "holdout").

shared_splits

Optional list of shared data.table splits for in-place caching.

evaluator

The ML model to use ("lightgbm" or "xgboost").

fold_ids

Optional vector of pre-defined fold assignments.

shared_folds

Optional list of shared data.table CV folds for in-place caching.

shared_full

Optional data.table of the full dataset for in-place caching.

state_cache

Optional environment to cache full-dataset fitted states of stateful transformers.

threads

Number of threads to use for parallel execution (default 8)