Safe Haskell | None |
---|---|

Language | Haskell2010 |

- projSubgrad :: (Additive f, Traversable f, Metric f, Ord a, Fractional a) => StepSched f a -> (f a -> f a) -> (f a -> f a) -> (f a -> a) -> f a -> [f a]
- linearProjSubgrad :: (Additive f, Traversable f, Metric f, Ord a, Fractional a) => StepSched f a -> (f a -> f a) -> f a -> a -> f a -> [f a]
- type StepSched f a = [f a -> a -> a]
- optimalStepSched :: (Fractional a, Metric f) => a -> StepSched f a
- constStepSched :: a -> StepSched f a
- sqrtKStepSched :: Floating a => a -> StepSched f a
- invKStepSched :: Fractional a => a -> StepSched f a
- data Constraint f a = Constr Ordering a (f a)
- linearProjection :: (Fractional a, Ord a, RealFloat a, Metric f) => [Constraint f a] -> f a -> f a

# Projected subgradient method

:: (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

:: (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 | Constant |

-> 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

:: (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

A non-summable step size schedule

:: 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`

(Show a, Show (f a)) => Show (Constraint f a) |

:: (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