Approximate function by stacking building blocks
$begingroup$
I need some help with a 'generalised Lego problem':
Given a function $f(x)geq 0$ on an interval $[a,b]$, and a 'building block' function $p(x)geq 0$ with compact support. The maximum of f shall be larger than the maximum of p. Think of $[a,b]=[-5, 5]$ and the support of $p$ shall be $[-.2, .2]$.
My goal is to approximate $f$ by stacking translations of $p$ (i.e. local copies of the form $p(x-x^{ast})$ for given grid points $x^{ast}$).
My approach so far: Given a grid ${x_i}_{i=1,dots,n}$, I am looking for non-negative integer coefficients ${a_i}_{i=1,dots,n}$, such that the following is minimal:
$$
|f-sum_{i}a_i ,p(cdot-x_i)|_{L^2}^2 := int_a^b left|f(x)-sum_{i}a_ip(x-x_i)right|^2,dx;.
$$
It is straightforward to reformulate this problem as
$$
frac{1}{2}cdot mathbf{a}^topmathbf{Q}mathbf{a} + mathbf{b}^{top}mathbf{a} to min;,
$$
with a symmetric matrix $mathbf{Q}$ and a vector $mathbf{b}$.
(Up to constant factors, $mathbf{Q}$ and $mathbf{f}$ have entries $left(p(cdot-x_i), p(cdot-x_jright)_{L^2}$ and $left(p(cdot-x_i), fright)_{L^2}$, respectively. )
I am aware that if the coefficients were to be allowed to be arbitrarily real, this is standard. How do I tackle this problem with integer and non-negative solutions without having to buy a huge and expensive black-box optimisation software? Or am I following the wrong approach at all? Would it be even possible to optimise for the grid as well?
approximation integer-programming discrete-optimization quadratic-programming
$endgroup$
add a comment |
$begingroup$
I need some help with a 'generalised Lego problem':
Given a function $f(x)geq 0$ on an interval $[a,b]$, and a 'building block' function $p(x)geq 0$ with compact support. The maximum of f shall be larger than the maximum of p. Think of $[a,b]=[-5, 5]$ and the support of $p$ shall be $[-.2, .2]$.
My goal is to approximate $f$ by stacking translations of $p$ (i.e. local copies of the form $p(x-x^{ast})$ for given grid points $x^{ast}$).
My approach so far: Given a grid ${x_i}_{i=1,dots,n}$, I am looking for non-negative integer coefficients ${a_i}_{i=1,dots,n}$, such that the following is minimal:
$$
|f-sum_{i}a_i ,p(cdot-x_i)|_{L^2}^2 := int_a^b left|f(x)-sum_{i}a_ip(x-x_i)right|^2,dx;.
$$
It is straightforward to reformulate this problem as
$$
frac{1}{2}cdot mathbf{a}^topmathbf{Q}mathbf{a} + mathbf{b}^{top}mathbf{a} to min;,
$$
with a symmetric matrix $mathbf{Q}$ and a vector $mathbf{b}$.
(Up to constant factors, $mathbf{Q}$ and $mathbf{f}$ have entries $left(p(cdot-x_i), p(cdot-x_jright)_{L^2}$ and $left(p(cdot-x_i), fright)_{L^2}$, respectively. )
I am aware that if the coefficients were to be allowed to be arbitrarily real, this is standard. How do I tackle this problem with integer and non-negative solutions without having to buy a huge and expensive black-box optimisation software? Or am I following the wrong approach at all? Would it be even possible to optimise for the grid as well?
approximation integer-programming discrete-optimization quadratic-programming
$endgroup$
$begingroup$
What about using a free/open-source solver?
$endgroup$
– prubin
Jan 12 at 0:48
$begingroup$
Open for suggestions. Octave has one in principle, but it is buggy and does not work.
$endgroup$
– Marc Mingoulis
Jan 14 at 10:21
add a comment |
$begingroup$
I need some help with a 'generalised Lego problem':
Given a function $f(x)geq 0$ on an interval $[a,b]$, and a 'building block' function $p(x)geq 0$ with compact support. The maximum of f shall be larger than the maximum of p. Think of $[a,b]=[-5, 5]$ and the support of $p$ shall be $[-.2, .2]$.
My goal is to approximate $f$ by stacking translations of $p$ (i.e. local copies of the form $p(x-x^{ast})$ for given grid points $x^{ast}$).
My approach so far: Given a grid ${x_i}_{i=1,dots,n}$, I am looking for non-negative integer coefficients ${a_i}_{i=1,dots,n}$, such that the following is minimal:
$$
|f-sum_{i}a_i ,p(cdot-x_i)|_{L^2}^2 := int_a^b left|f(x)-sum_{i}a_ip(x-x_i)right|^2,dx;.
$$
It is straightforward to reformulate this problem as
$$
frac{1}{2}cdot mathbf{a}^topmathbf{Q}mathbf{a} + mathbf{b}^{top}mathbf{a} to min;,
$$
with a symmetric matrix $mathbf{Q}$ and a vector $mathbf{b}$.
(Up to constant factors, $mathbf{Q}$ and $mathbf{f}$ have entries $left(p(cdot-x_i), p(cdot-x_jright)_{L^2}$ and $left(p(cdot-x_i), fright)_{L^2}$, respectively. )
I am aware that if the coefficients were to be allowed to be arbitrarily real, this is standard. How do I tackle this problem with integer and non-negative solutions without having to buy a huge and expensive black-box optimisation software? Or am I following the wrong approach at all? Would it be even possible to optimise for the grid as well?
approximation integer-programming discrete-optimization quadratic-programming
$endgroup$
I need some help with a 'generalised Lego problem':
Given a function $f(x)geq 0$ on an interval $[a,b]$, and a 'building block' function $p(x)geq 0$ with compact support. The maximum of f shall be larger than the maximum of p. Think of $[a,b]=[-5, 5]$ and the support of $p$ shall be $[-.2, .2]$.
My goal is to approximate $f$ by stacking translations of $p$ (i.e. local copies of the form $p(x-x^{ast})$ for given grid points $x^{ast}$).
My approach so far: Given a grid ${x_i}_{i=1,dots,n}$, I am looking for non-negative integer coefficients ${a_i}_{i=1,dots,n}$, such that the following is minimal:
$$
|f-sum_{i}a_i ,p(cdot-x_i)|_{L^2}^2 := int_a^b left|f(x)-sum_{i}a_ip(x-x_i)right|^2,dx;.
$$
It is straightforward to reformulate this problem as
$$
frac{1}{2}cdot mathbf{a}^topmathbf{Q}mathbf{a} + mathbf{b}^{top}mathbf{a} to min;,
$$
with a symmetric matrix $mathbf{Q}$ and a vector $mathbf{b}$.
(Up to constant factors, $mathbf{Q}$ and $mathbf{f}$ have entries $left(p(cdot-x_i), p(cdot-x_jright)_{L^2}$ and $left(p(cdot-x_i), fright)_{L^2}$, respectively. )
I am aware that if the coefficients were to be allowed to be arbitrarily real, this is standard. How do I tackle this problem with integer and non-negative solutions without having to buy a huge and expensive black-box optimisation software? Or am I following the wrong approach at all? Would it be even possible to optimise for the grid as well?
approximation integer-programming discrete-optimization quadratic-programming
approximation integer-programming discrete-optimization quadratic-programming
edited Jan 16 at 14:48
Marc Mingoulis
asked Jan 10 at 9:03
Marc MingoulisMarc Mingoulis
437
437
$begingroup$
What about using a free/open-source solver?
$endgroup$
– prubin
Jan 12 at 0:48
$begingroup$
Open for suggestions. Octave has one in principle, but it is buggy and does not work.
$endgroup$
– Marc Mingoulis
Jan 14 at 10:21
add a comment |
$begingroup$
What about using a free/open-source solver?
$endgroup$
– prubin
Jan 12 at 0:48
$begingroup$
Open for suggestions. Octave has one in principle, but it is buggy and does not work.
$endgroup$
– Marc Mingoulis
Jan 14 at 10:21
$begingroup$
What about using a free/open-source solver?
$endgroup$
– prubin
Jan 12 at 0:48
$begingroup$
What about using a free/open-source solver?
$endgroup$
– prubin
Jan 12 at 0:48
$begingroup$
Open for suggestions. Octave has one in principle, but it is buggy and does not work.
$endgroup$
– Marc Mingoulis
Jan 14 at 10:21
$begingroup$
Open for suggestions. Octave has one in principle, but it is buggy and does not work.
$endgroup$
– Marc Mingoulis
Jan 14 at 10:21
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
There are a number of open-source solvers available from COIN-OR. I'm not a MATLAB user, but a quick search turned up the OPTI Toolbox for MATLAB, which includes several of the COIN-OR projects.
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3068409%2fapproximate-function-by-stacking-building-blocks%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
There are a number of open-source solvers available from COIN-OR. I'm not a MATLAB user, but a quick search turned up the OPTI Toolbox for MATLAB, which includes several of the COIN-OR projects.
$endgroup$
add a comment |
$begingroup$
There are a number of open-source solvers available from COIN-OR. I'm not a MATLAB user, but a quick search turned up the OPTI Toolbox for MATLAB, which includes several of the COIN-OR projects.
$endgroup$
add a comment |
$begingroup$
There are a number of open-source solvers available from COIN-OR. I'm not a MATLAB user, but a quick search turned up the OPTI Toolbox for MATLAB, which includes several of the COIN-OR projects.
$endgroup$
There are a number of open-source solvers available from COIN-OR. I'm not a MATLAB user, but a quick search turned up the OPTI Toolbox for MATLAB, which includes several of the COIN-OR projects.
answered Jan 15 at 18:14
prubinprubin
1,490125
1,490125
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3068409%2fapproximate-function-by-stacking-building-blocks%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
What about using a free/open-source solver?
$endgroup$
– prubin
Jan 12 at 0:48
$begingroup$
Open for suggestions. Octave has one in principle, but it is buggy and does not work.
$endgroup$
– Marc Mingoulis
Jan 14 at 10:21