Trace Norm / Nuclear Norm: How to verify? The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)How is the nuclear norm convex whereas the weighted nuclear norm is not?How close is Cartesian product of unit orthogonal bases of SVD to identity matrix?How to define the nuclear norm of a tensor?Variational characterization of nuclear normDistributive property on trace normInequality of square root inside trace normShow that $mathbfX_tr leq sqrtnm f(mathbfX)$computing dual matrix trace norm and tensor gradient in pythonDerivative of the nuclear norm $left$ with respect to $X$Additivity of nuclear norm for projections
Nested ellipses in tikzpicture: Chomsky hierarchy
Using dividends to reduce short term capital gains?
Single author papers against my advisor's will?
What force causes entropy to increase?
Why can I use a list index as an indexing variable in a for loop?
Why are PDP-7-style microprogrammed instructions out of vogue?
Did the UK government pay "millions and millions of dollars" to try to snag Julian Assange?
What to do when moving next to a bird sanctuary with a loosely-domesticated cat?
Deal with toxic manager when you can't quit
Windows 10: How to Lock (not sleep) laptop on lid close?
How to create a folder symlink that has a different name?
How do spell lists change if the party levels up without taking a long rest?
Did the new image of black hole confirm the general theory of relativity?
How to determine omitted units in a publication
Am I ethically obligated to go into work on an off day if the reason is sudden?
how can a perfect fourth interval be considered either consonant or dissonant?
What aspect of planet earth must be changed to prevent the industrial revolution?
ELI5: Why do they say that Israel would have been the fourth country to land a spacecraft on the Moon and why do they call it low cost?
Why can't wing-mounted spoilers be used to steepen approaches?
Fixing different display colors within string
Voltage transmission
Is an up-to-date browser secure on an out-of-date OS?
Do I have Disadvantage attacking with an off-hand weapon?
What happens to a Warlock's expended Spell Slots when they gain a Level?
Trace Norm / Nuclear Norm: How to verify?
The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)How is the nuclear norm convex whereas the weighted nuclear norm is not?How close is Cartesian product of unit orthogonal bases of SVD to identity matrix?How to define the nuclear norm of a tensor?Variational characterization of nuclear normDistributive property on trace normInequality of square root inside trace normShow that $mathbfX_tr leq sqrtnm f(mathbfX)$computing dual matrix trace norm and tensor gradient in pythonDerivative of the nuclear norm $_*$ with respect to $X$Additivity of nuclear norm for projections
$begingroup$
The nuclear norm is defined by this [from wikipedia]:
$$|A|_* = texttrace(sqrtA^*A) = sum_i=i^minm,nsigma_i(A)$$
I get the derivation of this equation. However, I wanted to test it in MATLAB. So used this script:
clc;
clear;
close all;
P = rand([3,4]);
PTP = P'*P;
%compute trace(P'*P)
B = sqrt(P'*P);
S1 = trace(B)
%Compute sum of sigma_i(P)
E = svd(P);
S2 = sum(E)
%Do the same for eigenvalues
E3 = sqrt(eig(P*P'));
S3 = sum(E3)
But for some reason, the values inside S1 and S2 does not match. I do not understand where I did wrong. Could anybody help?
linear-algebra norm svd
$endgroup$
add a comment |
$begingroup$
The nuclear norm is defined by this [from wikipedia]:
$$|A|_* = texttrace(sqrtA^*A) = sum_i=i^minm,nsigma_i(A)$$
I get the derivation of this equation. However, I wanted to test it in MATLAB. So used this script:
clc;
clear;
close all;
P = rand([3,4]);
PTP = P'*P;
%compute trace(P'*P)
B = sqrt(P'*P);
S1 = trace(B)
%Compute sum of sigma_i(P)
E = svd(P);
S2 = sum(E)
%Do the same for eigenvalues
E3 = sqrt(eig(P*P'));
S3 = sum(E3)
But for some reason, the values inside S1 and S2 does not match. I do not understand where I did wrong. Could anybody help?
linear-algebra norm svd
$endgroup$
$begingroup$
Welcome to the site by the way. It can be good to learn mathjax typesetting for this site. I helped you turn the wikipedia equation into mathjax code. I think there is a tutorial somewhere. math.meta.stackexchange.com/questions/5020/…
$endgroup$
– mathreadler
Apr 9 at 7:34
add a comment |
$begingroup$
The nuclear norm is defined by this [from wikipedia]:
$$|A|_* = texttrace(sqrtA^*A) = sum_i=i^minm,nsigma_i(A)$$
I get the derivation of this equation. However, I wanted to test it in MATLAB. So used this script:
clc;
clear;
close all;
P = rand([3,4]);
PTP = P'*P;
%compute trace(P'*P)
B = sqrt(P'*P);
S1 = trace(B)
%Compute sum of sigma_i(P)
E = svd(P);
S2 = sum(E)
%Do the same for eigenvalues
E3 = sqrt(eig(P*P'));
S3 = sum(E3)
But for some reason, the values inside S1 and S2 does not match. I do not understand where I did wrong. Could anybody help?
linear-algebra norm svd
$endgroup$
The nuclear norm is defined by this [from wikipedia]:
$$|A|_* = texttrace(sqrtA^*A) = sum_i=i^minm,nsigma_i(A)$$
I get the derivation of this equation. However, I wanted to test it in MATLAB. So used this script:
clc;
clear;
close all;
P = rand([3,4]);
PTP = P'*P;
%compute trace(P'*P)
B = sqrt(P'*P);
S1 = trace(B)
%Compute sum of sigma_i(P)
E = svd(P);
S2 = sum(E)
%Do the same for eigenvalues
E3 = sqrt(eig(P*P'));
S3 = sum(E3)
But for some reason, the values inside S1 and S2 does not match. I do not understand where I did wrong. Could anybody help?
linear-algebra norm svd
linear-algebra norm svd
edited Apr 9 at 7:32
mathreadler
15.5k72263
15.5k72263
asked Apr 8 at 5:57
ponirponir
528
528
$begingroup$
Welcome to the site by the way. It can be good to learn mathjax typesetting for this site. I helped you turn the wikipedia equation into mathjax code. I think there is a tutorial somewhere. math.meta.stackexchange.com/questions/5020/…
$endgroup$
– mathreadler
Apr 9 at 7:34
add a comment |
$begingroup$
Welcome to the site by the way. It can be good to learn mathjax typesetting for this site. I helped you turn the wikipedia equation into mathjax code. I think there is a tutorial somewhere. math.meta.stackexchange.com/questions/5020/…
$endgroup$
– mathreadler
Apr 9 at 7:34
$begingroup$
Welcome to the site by the way. It can be good to learn mathjax typesetting for this site. I helped you turn the wikipedia equation into mathjax code. I think there is a tutorial somewhere. math.meta.stackexchange.com/questions/5020/…
$endgroup$
– mathreadler
Apr 9 at 7:34
$begingroup$
Welcome to the site by the way. It can be good to learn mathjax typesetting for this site. I helped you turn the wikipedia equation into mathjax code. I think there is a tutorial somewhere. math.meta.stackexchange.com/questions/5020/…
$endgroup$
– mathreadler
Apr 9 at 7:34
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
On the line
B = sqrt(P'*P);
"sqrt" in Matlab calculates element-wise square root.
You probably want to use "sqrtm" : matrix square root instead.
$endgroup$
$begingroup$
That solves the problem! I forgot that it does element wise square root! :(
$endgroup$
– ponir
Apr 9 at 0:22
$begingroup$
@ponir It is good because it meant you did not misunderstand something. It is same with other matrix functions in Matlab, they end with letter "m", for example expm for matrix exponential function. If you are happy with answer please press accept answer button. :)
$endgroup$
– mathreadler
Apr 9 at 7:30
add a comment |
Your Answer
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%2f3179218%2ftrace-norm-nuclear-norm-how-to-verify%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$
On the line
B = sqrt(P'*P);
"sqrt" in Matlab calculates element-wise square root.
You probably want to use "sqrtm" : matrix square root instead.
$endgroup$
$begingroup$
That solves the problem! I forgot that it does element wise square root! :(
$endgroup$
– ponir
Apr 9 at 0:22
$begingroup$
@ponir It is good because it meant you did not misunderstand something. It is same with other matrix functions in Matlab, they end with letter "m", for example expm for matrix exponential function. If you are happy with answer please press accept answer button. :)
$endgroup$
– mathreadler
Apr 9 at 7:30
add a comment |
$begingroup$
On the line
B = sqrt(P'*P);
"sqrt" in Matlab calculates element-wise square root.
You probably want to use "sqrtm" : matrix square root instead.
$endgroup$
$begingroup$
That solves the problem! I forgot that it does element wise square root! :(
$endgroup$
– ponir
Apr 9 at 0:22
$begingroup$
@ponir It is good because it meant you did not misunderstand something. It is same with other matrix functions in Matlab, they end with letter "m", for example expm for matrix exponential function. If you are happy with answer please press accept answer button. :)
$endgroup$
– mathreadler
Apr 9 at 7:30
add a comment |
$begingroup$
On the line
B = sqrt(P'*P);
"sqrt" in Matlab calculates element-wise square root.
You probably want to use "sqrtm" : matrix square root instead.
$endgroup$
On the line
B = sqrt(P'*P);
"sqrt" in Matlab calculates element-wise square root.
You probably want to use "sqrtm" : matrix square root instead.
answered Apr 8 at 6:06
mathreadlermathreadler
15.5k72263
15.5k72263
$begingroup$
That solves the problem! I forgot that it does element wise square root! :(
$endgroup$
– ponir
Apr 9 at 0:22
$begingroup$
@ponir It is good because it meant you did not misunderstand something. It is same with other matrix functions in Matlab, they end with letter "m", for example expm for matrix exponential function. If you are happy with answer please press accept answer button. :)
$endgroup$
– mathreadler
Apr 9 at 7:30
add a comment |
$begingroup$
That solves the problem! I forgot that it does element wise square root! :(
$endgroup$
– ponir
Apr 9 at 0:22
$begingroup$
@ponir It is good because it meant you did not misunderstand something. It is same with other matrix functions in Matlab, they end with letter "m", for example expm for matrix exponential function. If you are happy with answer please press accept answer button. :)
$endgroup$
– mathreadler
Apr 9 at 7:30
$begingroup$
That solves the problem! I forgot that it does element wise square root! :(
$endgroup$
– ponir
Apr 9 at 0:22
$begingroup$
That solves the problem! I forgot that it does element wise square root! :(
$endgroup$
– ponir
Apr 9 at 0:22
$begingroup$
@ponir It is good because it meant you did not misunderstand something. It is same with other matrix functions in Matlab, they end with letter "m", for example expm for matrix exponential function. If you are happy with answer please press accept answer button. :)
$endgroup$
– mathreadler
Apr 9 at 7:30
$begingroup$
@ponir It is good because it meant you did not misunderstand something. It is same with other matrix functions in Matlab, they end with letter "m", for example expm for matrix exponential function. If you are happy with answer please press accept answer button. :)
$endgroup$
– mathreadler
Apr 9 at 7:30
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%2f3179218%2ftrace-norm-nuclear-norm-how-to-verify%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$
Welcome to the site by the way. It can be good to learn mathjax typesetting for this site. I helped you turn the wikipedia equation into mathjax code. I think there is a tutorial somewhere. math.meta.stackexchange.com/questions/5020/…
$endgroup$
– mathreadler
Apr 9 at 7:34