libmoon.solver
GradBaseSolver
- class GradBaseSolver
Base:
objectAll gradient solvers should implement the methods in the base class
GradBaseSolver- __init__(self, step_size, n_iter, tol)
- Parameters:
step_size (int) – The step size for updating directions.
n_iter (int) – Maximal iterations.
tol (float) – Stop when the norm of gradients is less than the value of tol.
- solve(self, x, prefs)
- Parameters:
x (ndarray (K, n)) – The initial solution.
prefs (ndarray (K, m)) – The preference matrix.
- class GradAggSolver
Base:
GradBaseSolver- __init__(self, problem, step_size, n_iter, tol, agg_fun)
- Parameters:
problem (str) – Existing problems or the given n_obj.
agg_fun (str) – agg_fun from ls, mtche, tche, pbi, cosmos, invagg, softtche, softmtche
- solve(self, x, prefs)
- MOO-SVGDSolver
Base:
GradBaseSolverMOO-SVGDSolver, published in: “Profiling Pareto Front With Multi-Objective Stein Variational Gradient Descent”
- solve(self, x, prefs, problem, n_prob, n_obj)
- Parameters:
n_obj (int) – The number of objectives.
n_prob (float) – The number of problems.
- class MGDAUBSolver
Base:
GradBaseSolverMGDAUBSolver, published in:
- solve(self, x, prefs, problem, n_prob, n_obj)
- class PMGDASolver
Base:
GradBaseSolverPMGDASolver, published in:
“PMGDA: A Preference-based Multiple Gradient Descent Algorithm.”
- solve(self, x, prefs)
SimplePSLSolver
- class SimplePSLSolver
Base:
objectAll pareto set learning solvers should implement the methods in the base class
SimplePSLSolver- __init__(self, n_obj, n_var, lr=1e-3)
- Parameters:
n_obj (int) – Number of objectives.
n_var (int) – Number of variables.
lr (float) – Learning rate. Default is
1e-3.
- forward(self, prefs)
- Parameters:
prefs (ndarray (n_prob, n_obj)) – The preference matrix.
- Returns:
The
solutionmatrix of shape(n_prob, n_var).
- optimize(self, problem, epoch)
- Parameters:
problem (ProblemClass) – The problem class instance to optimize.
epoch (int) – Number of epochs for optimization.
- evaluate(self, prefs)
- Parameters:
prefs (ndarray (n_prob, n_obj)) – The preference matrix.
- Returns:
The
decision_variablesmatrix of shape(n_prob, n_var).
- class SimplePSLLoRAModel
Base:
SimplePSLModel