optimization-0.1.3: Numerical optimization

Synopsis

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

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

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

Arguments

 :: a The step size -> StepSched f a

Constant step size schedule

Arguments

 :: Floating a => a The size of the first step -> StepSched f a

A non-summable step size schedule

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 a, Show (f a)) => Show (Constraint f a)

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