Object OptimUtils

  • All Implemented Interfaces:

    
    public class OptimUtils
    
                        

    Optimization utilities for inference algorithms.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final static OptimUtils INSTANCE
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • fmincon

         final static Pair<DoubleArray, Double> fmincon(Function1<DoubleArray, Double> objFun, DoubleArray x0, DoubleArray lb, DoubleArray ub, Integer maxIter)

        Bound-constrained minimization using BOBYQA (derivative-free). Equivalent to MATLAB's fmincon with box constraints.

        Parameters:
        objFun - objective function to minimize
        x0 - initial point
        lb - lower bounds
        ub - upper bounds
        maxIter - maximum iterations
        Returns:

        pair of (optimal point, objective value)

      • quadprog

         final static Pair<Matrix, Double> quadprog(Matrix H, Matrix f, Matrix lb)

        Quadratic program solver with non-negative constraints. Solves: min 0.5 x'Hx + f'x subject to x >= lb

        Uses Cholesky decomposition to convert to NNLS problem.

        Parameters:
        H - positive definite Hessian matrix (n x n)
        f - linear term (n x 1)
        lb - lower bounds (n x 1), typically zeros
        Returns:

        solution vector (n x 1)