Selection#
- pylit.core.selection.heuristic(config, prep, has_sigma)#
Perform parameter selection using a heuristic approach.
- Parameters:
config (
Configuration
) – Configuration object.prep (
Preparation
) – Preparation object.has_sigma (
bool
) – Whether the model uses kernel widths as parameters.
- Return type:
Tuple
[ndarray
,ndarray
]- Returns:
The heuristic kernel centers and, if applicable, the kernel widths.
- pylit.core.selection.simulated_annealing(config, prep, has_sigma, max_iter=1000)#
Perform parameter selection using simulated annealing.
This method optimizes kernel centers and widths by iteratively proposing new parameter values and accepting them based on a Metropolis–Hastings acceptance criterion.
- Parameters:
config (
Configuration
) – Configuration object.prep (
Preparation
) – Preparation object.has_sigma (
bool
) – Whether the model uses kernel widths as parameters.max_iter (
int
) – Maximum number of iterations performed during the optimization procedure.
- Return type:
ndarray
- Returns:
The optimized kernel centers and, if available, the optimized kernel widths.