.. _solver-ref: ================ libmoon.solver ================ GradBaseSolver ============== .. py:class:: GradBaseSolver Base: ``object`` All gradient solvers should implement the methods in the base class ``GradBaseSolver`` .. py:method:: __init__(self, step_size, n_iter, tol) :param int step_size: The step size for updating directions. :param int n_iter: Maximal iterations. :param float tol: Stop when the norm of gradients is less than the value of tol. .. py:method:: solve(self, x, prefs) :param ndarray (K, n) x: The initial solution. :param ndarray (K, m) prefs: The preference matrix. .. py:class:: GradAggSolver Base: ``GradBaseSolver`` .. py:method:: __init__(self, problem, step_size, n_iter, tol, agg_fun) :param str problem: Existing problems or the given n_obj. :param str agg_fun: agg_fun from ls, mtche, tche, pbi, cosmos, invagg, softtche, softmtche .. py:method:: solve(self, x, prefs) .. py:class:: EPOSolver Base: ``GradBaseSolver`` EPOSolver, published in: 1. `"Multi-Task Learning with User Preferences: Gradient Descent with Controlled Ascent in Pareto Optimization" `_ 2. `"Controllable Pareto Multi-Task Learning" `_ .. py:method:: solve(self, x, prefs) .. py:class:: MOO-SVGDSolver Base: ``GradBaseSolver`` MOO-SVGDSolver, published in: `"Profiling Pareto Front With Multi-Objective Stein Variational Gradient Descent" `_ .. py:method:: solve(self, x, prefs, problem, n_prob, n_obj) :param int n_obj: The number of objectives. :param float n_prob: The number of problems. .. py:class:: MGDAUBSolver Base: ``GradBaseSolver`` MGDAUBSolver, published in: 1. `"Multiple-gradient descent algorithm (MGDA) for multiobjective optimizationAlgorithme de descente à gradients multiples pour lʼoptimisation multiobjectif" `_ 2. `"Multi-task learning as multimnist-objective optimization." `_ .. py:method:: solve(self, x, prefs, problem, n_prob, n_obj) .. py:class:: PMGDASolver Base: ``GradBaseSolver`` PMGDASolver, published in: `"PMGDA: A Preference-based Multiple Gradient Descent Algorithm." `_ .. py:method:: solve(self, x, prefs) .. py:class:: PMTLSolver Base: ``GradBaseSolver`` .. py:method:: solve(self, x, prefs, problem, n_prob, n_obj) .. py:class:: HVGradSolver Base: ``GradBaseSolver`` .. py:method:: solve(self, x, prefs, problem, n_prob, n_obj) SimplePSLSolver =============== .. py:class:: SimplePSLSolver Base: ``object`` All pareto set learning solvers should implement the methods in the base class ``SimplePSLSolver`` .. py:method:: __init__(self, n_obj, n_var, lr=1e-3) :param int n_obj: Number of objectives. :param int n_var: Number of variables. :param float lr: Learning rate. Default is ``1e-3``. .. py:method:: forward(self, prefs) :param ndarray (n_prob, n_obj) prefs: The preference matrix. :return: The ``solution`` matrix of shape ``(n_prob, n_var)``. .. py:method:: optimize(self, problem, epoch) :param ProblemClass problem: The problem class instance to optimize. :param int epoch: Number of epochs for optimization. .. py:method:: evaluate(self, prefs) :param ndarray (n_prob, n_obj) prefs: The preference matrix. :return: The ``decision_variables`` matrix of shape ``(n_prob, n_var)``. .. py:class:: SimplePSLLoRAModel Base: ``SimplePSLModel``