ellpy package¶
Subpackages¶
- ellpy.oracles package
- Submodules
- ellpy.oracles.chol_ext module
- ellpy.oracles.cholutil module
- ellpy.oracles.corr_bspline_oracle module
- ellpy.oracles.corr_oracle module
- ellpy.oracles.csdlowpass_oracle module
- ellpy.oracles.cycle_ratio_oracle module
- ellpy.oracles.gmi_oracle module
- ellpy.oracles.lmi0_oracle module
- ellpy.oracles.lmi_old_oracle module
- ellpy.oracles.lmi_oracle module
- ellpy.oracles.lowpass_oracle module
- ellpy.oracles.lsq_corr_oracle module
- ellpy.oracles.mle_corr_oracle module
- ellpy.oracles.network_oracle module
- ellpy.oracles.optscaling_oracle module
- ellpy.oracles.profit_oracle module
- ellpy.oracles.qmi_oracle module
- ellpy.oracles.setup module
- ellpy.oracles.spectral_fact module
- Module contents
Submodules¶
ellpy.cutting_plane module¶
- class ellpy.cutting_plane.CInfo(feasible: bool, num_iters: int, status: CUTStatus)[source]¶
Bases:
object
- class ellpy.cutting_plane.CUTStatus(value)[source]¶
Bases:
Enum
An enumeration.
- noeffect = 3¶
- nosoln = 1¶
- smallenough = 2¶
- success = 0¶
- ellpy.cutting_plane.bsearch(Omega: ~typing.Callable[[~typing.Any], bool], Interval: ~typing.Tuple, options=<ellpy.cutting_plane.Options object>) Tuple[Any, CInfo] [source]¶
[summary]
- class ellpy.cutting_plane.bsearch_adaptor(P, S, options=<ellpy.cutting_plane.Options object>)[source]¶
Bases:
object
- ellpy.cutting_plane.cutting_plane_dc(Omega: ~typing.Callable[[~typing.Any, ~typing.Any], ~typing.Any], S, t, options=<ellpy.cutting_plane.Options object>) Tuple[Any, Any, CInfo] [source]¶
Cutting-plane method for solving convex optimization problem
- ellpy.cutting_plane.cutting_plane_feas(Omega: ~typing.Callable[[~typing.Any], ~typing.Any], S, options=<ellpy.cutting_plane.Options object>) CInfo [source]¶
Find a point in a convex set (defined through a cutting-plane oracle).
- Description:
A function f(x) is convex if there always exist a g(x) such that f(z) >= f(x) + g(x)’ * (z - x), forall z, x in dom f. Note that dom f does not need to be a convex set in our definition. The affine function g’ (x - xc) + beta is called a cutting-plane, or a ``cut’’ for short. This algorithm solves the following feasibility problem:
find x s.t. f(x) <= 0,
A separation oracle asserts that an evalution point x0 is feasible, or provide a cut that separates the feasible region and x0.
- ellpy.cutting_plane.cutting_plane_q(Omega, S, t, options=<ellpy.cutting_plane.Options object>)[source]¶
Cutting-plane method for solving convex discrete optimization problem
ellpy.ell module¶
ellpy.problem module¶
- class ellpy.problem.Problem(S, oracle, options=<ellpy.cutting_plane.Options object>)[source]¶
Bases:
object
- property optim_value¶
The optimal value from the last time the problem was solved.
- Return type
float or None
- property optim_var¶
The optimal value from the last time the problem was solved.
- Return type
x_best or None
- solve(*args, **kwargs)[source]¶
Solves the problem using the specified method.
- Parameters
method (function) – The solve method to use.
solver (str, optional) – The solver to use.
verbose (bool, optional) – Overrides the default of hiding solver output.
solver_specific_opts (dict, optional) – A dict of options that will be passed to the specific solver. In general, these options will override any default settings imposed by cvxpy.
- Returns
The optimal value for the problem, or a string indicating why the problem could not be solved.
- Return type
- property solver_stats¶
Returns an object containing additional information returned by the solver.
ellpy.skeleton module¶
This is a skeleton file that can serve as a starting point for a Python
console script. To run this script uncomment the following lines in the
[options.entry_points]
section in setup.cfg
:
console_scripts =
fibonacci = ellpy.skeleton:run
Then run pip install .
(or pip install -e .
for editable mode)
which will install the command fibonacci
inside your current environment.
Besides console scripts, the header (i.e. until _logger
…) of this file can
also be used as template for Python modules.
Note
This skeleton file can be safely removed if not needed!
References
- ellpy.skeleton.main(args)[source]¶
Wrapper allowing
fib()
to be called with string arguments in a CLI fashionInstead of returning the value from
fib()
, it prints the result to thestdout
in a nicely formatted message.- Parameters
args (List[str]) – command line parameters as list of strings (for example
["--verbose", "42"]
).
- ellpy.skeleton.parse_args(args)[source]¶
Parse command line parameters
- Parameters
args (List[str]) – command line parameters as list of strings (for example
["--help"]
).- Returns
command line parameters namespace
- Return type