optimization-0.1.9: Numerical optimization

Safe HaskellNone
LanguageHaskell2010

Optimization.Constrained.ProjectedSubgradient

Contents

Synopsis

Projected subgradient method

projSubgrad Source #

Arguments

:: (Additive f, Traversable f, Metric f, Ord a, Fractional a) 
=> StepSched f a

A step size schedule

-> (f a -> f a)

Function projecting into the feasible space

-> (f a -> f a)

Gradient of objective function

-> (f a -> a)

The objective function

-> f a

Initial solution

-> [f a] 

projSubgrad stepSizes proj a b x0 minimizes the objective A x - b potentially projecting iterates into a feasible space with proj with the given step-size schedule

linearProjSubgrad Source #

Arguments

:: (Additive f, Traversable f, Metric f, Ord a, Fractional a) 
=> StepSched f a

A step size schedule

-> (f a -> f a)

Function projecting into the feasible space

-> f a

Coefficient vector A of objective

-> a

Constant b of objective

-> f a

Initial solution

-> [f a] 

linearProjSubgrad stepSizes proj a b x0 minimizes the objective A x - b potentially projecting iterates into a feasible space with proj with the given step-size schedule

Step schedules

type StepSched f a = [f a -> a -> a] Source #

A step size schedule A list of functions (one per step) which, given a function's gradient and value, will provide a size for the next step

optimalStepSched Source #

Arguments

:: (Fractional a, Metric f) 
=> a

The optimal value of the objective

-> StepSched f a 

The optimal step size schedule when the optimal value of the objective is known

constStepSched Source #

Arguments

:: a

The step size

-> StepSched f a 

Constant step size schedule

sqrtKStepSched Source #

Arguments

:: Floating a 
=> a

The size of the first step

-> StepSched f a 

A non-summable step size schedule

invKStepSched Source #

Arguments

:: Fractional a 
=> a

The size of the first step

-> StepSched f a 

A square-summable step size schedule

Linear constraints

data Constraint f a Source #

A linear constraint. For instance, Constr LT 2 (V2 1 3) defines the constraint x_1 + 3 x_2 <= 2

Constructors

Constr Ordering a (f a) 

Instances

(Show (f a), Show a) => Show (Constraint f a) Source # 

Methods

showsPrec :: Int -> Constraint f a -> ShowS #

show :: Constraint f a -> String #

showList :: [Constraint f a] -> ShowS #

linearProjection Source #

Arguments

:: (Fractional a, Ord a, RealFloat a, Metric f) 
=> [Constraint f a]

A set of linear constraints

-> f a 
-> f a 

Project onto a the space of feasible solutions defined by a set of linear constraints