uo.algorithm.metaheuristic.maml_metaheuristic package

Submodules

uo.algorithm.metaheuristic.maml_metaheuristic.maml_metaheuristic module

class uo.algorithm.metaheuristic.maml_metaheuristic.maml_metaheuristic.DummyProblem

Bases: Problem

copy()

Copy the current object

Returns:

new instance with the same properties

Return type:

Problem

class uo.algorithm.metaheuristic.maml_metaheuristic.maml_metaheuristic.MAMLMetaheuristic(tasks: Sequence[Callable[[ndarray], float]], alpha: float = 0.01, beta: float = 0.001, inner_steps: int = 1, outer_steps: int = 1000, seed: int | None = None)

Bases: PopulationBasedMetaheuristic

Model-Agnostic Meta-Learning (MAML) metaheuristic for few-shot optimization. Learns initialization parameters that can be quickly adapted to new tasks.

copy() MAMLMetaheuristic

Return a shallow copy of this instance.

init() None

Initialize global parameters (theta).

main_loop_iteration() None

Perform one outer loop iteration over all tasks.

run(dim: int = 1) ndarray

Run MAML metaheuristic optimization. Returns learned initialization vector.

Module contents