Configuration#

class pylit.core.data_classes.Configuration(path_F, path_D, path_S=None, path_L_S=None, path_prep=None, path_res=None, selection_name='simulated_annealing', n=100, window=5, widths=5, non_negative=True, detailed_balance=True, model_name='Gauss', method_name='l1_reg', lambd=None, optimizer_name='nesterov', tol=1e-15, maxiter=1000, adaptive=False, adaptive_residuum_mode=False, c0=None, svd=False, protocol=False)#

Bases: object

Represents the configuration of an optimization problem.

This dataclass stores all paths, numerical parameters, and algorithmic options required to run the solver.

Parameters:
  • path_F (Path) – Input path of the Laplace transformed data. (required)

  • path_D (Path) – Input path of the Default model. (required)

  • path_S (Path | None) – Output path of the model. | None = None

  • path_L_S (Path | None) – Output path of the laplace transformed model. | None = None

  • path_prep (Path | None) – Output path of the Preparation dataclass. | None = None

  • path_res (Path | None) – Output path of the Result dataclass. | None = None

  • selection_name (Literal['simulated_annealing', 'heuristic']) – Strategy for selecting the models parameters. Choices include simulated_annealing (default) and heuristic.

  • n (int) – Number of support points in the frequency domain \(\omega\).

  • window (int) – The window size when searching for the optimal kernel widths. Only used in heuristic.

  • widths (int) – The total number of kernel widths.

  • non_negative (bool) – Enforces non-negativity for the Default model.

  • detailed_balance (bool) – If True, imposes the detailed balance condition.

  • model_name (Literal['Gauss', 'Laplace', 'Cauchy', 'Uniform']) – Name of the kernel model to use for optimization.

  • method_name (Literal['l1_reg', 'l2_reg', 'tv_reg', 'var_reg', 'l2_fit', 'max_entropy_fit', 'cdf_l2_fit']) – Optimization method to be applied. Choices include regularization- and fit-based approaches.

  • lambd (ndarray | float | None) – Regularization parameter. Can be a scalar, an array of values, or None.

  • optimizer_name (Literal['nnls', 'nesterov', 'adam']) – The numerical optimizer used to solve the problem.

  • tol (float) – Convergence tolerance for the optimizer.

  • maxiter (int) – Maximum number of iterations allowed for the optimization.

  • adaptive (bool) – Whether to use the decorator function adaptive().

  • adaptive_residuum_mode (bool) – If True, the residuum_mode in adaptive() is enabled.

  • c0 (ndarray | None) – Initial guess for the solution. If None, a default (zeros) is used.

  • svd (bool) – Whether to apply SVD-based dimensionality reduction before solving. Should be only applied to regularization methods l1_reg and l2_reg.

  • protocol (bool) – If True, prints a protocol of the optimization run.